diff --git a/.gitignore b/.gitignore index 6b8637e01fc0..8bd08dcd00d9 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,10 @@ MANIFEST .flattened-pom.xml +# Vim files +*.swp +*.swo + # Python utilities __pycache__/ *.py[cod] diff --git a/generation_config.yaml b/generation_config.yaml index 89fe8e87958e..f03239e7a11d 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ gapic_generator_version: 2.41.0 protoc_version: '25.3' -googleapis_commitish: ede5e02ad747c9199a7953b222b85715e097189c +googleapis_commitish: ac90fa9958bd6f7622674f52f77e4dc01d98bee8 libraries_bom_version: 26.40.0 template_excludes: - .github/* diff --git a/java-batch/README.md b/java-batch/README.md index 1aee59f1a5a6..fe6017132e60 100644 --- a/java-batch/README.md +++ b/java-batch/README.md @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-batch.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-batch/0.44.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-batch/0.45.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java index d51c91a201c7..286eddb0360f 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java @@ -8507,9 +8507,9 @@ public interface InstancePolicyOrTemplateOrBuilder * * *
-     * Set this field true if users want Batch to help fetch drivers from a
-     * third party location and install them for GPUs specified in
-     * policy.accelerators or instance_template on their behalf. Default is
+     * Set this field true if you want Batch to help fetch drivers from a third
+     * party location and install them for GPUs specified in
+     * `policy.accelerators` or `instance_template` on your behalf. Default is
      * false.
      *
      * For Container-Optimized Image cases, Batch will install the
@@ -8755,9 +8755,9 @@ public com.google.protobuf.ByteString getInstanceTemplateBytes() {
      *
      *
      * 
-     * Set this field true if users want Batch to help fetch drivers from a
-     * third party location and install them for GPUs specified in
-     * policy.accelerators or instance_template on their behalf. Default is
+     * Set this field true if you want Batch to help fetch drivers from a third
+     * party location and install them for GPUs specified in
+     * `policy.accelerators` or `instance_template` on your behalf. Default is
      * false.
      *
      * For Container-Optimized Image cases, Batch will install the
@@ -9594,9 +9594,9 @@ public Builder setInstanceTemplateBytes(com.google.protobuf.ByteString value) {
        *
        *
        * 
-       * Set this field true if users want Batch to help fetch drivers from a
-       * third party location and install them for GPUs specified in
-       * policy.accelerators or instance_template on their behalf. Default is
+       * Set this field true if you want Batch to help fetch drivers from a third
+       * party location and install them for GPUs specified in
+       * `policy.accelerators` or `instance_template` on your behalf. Default is
        * false.
        *
        * For Container-Optimized Image cases, Batch will install the
@@ -9618,9 +9618,9 @@ public boolean getInstallGpuDrivers() {
        *
        *
        * 
-       * Set this field true if users want Batch to help fetch drivers from a
-       * third party location and install them for GPUs specified in
-       * policy.accelerators or instance_template on their behalf. Default is
+       * Set this field true if you want Batch to help fetch drivers from a third
+       * party location and install them for GPUs specified in
+       * `policy.accelerators` or `instance_template` on your behalf. Default is
        * false.
        *
        * For Container-Optimized Image cases, Batch will install the
@@ -9646,9 +9646,9 @@ public Builder setInstallGpuDrivers(boolean value) {
        *
        *
        * 
-       * Set this field true if users want Batch to help fetch drivers from a
-       * third party location and install them for GPUs specified in
-       * policy.accelerators or instance_template on their behalf. Default is
+       * Set this field true if you want Batch to help fetch drivers from a third
+       * party location and install them for GPUs specified in
+       * `policy.accelerators` or `instance_template` on your behalf. Default is
        * false.
        *
        * For Container-Optimized Image cases, Batch will install the
diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecution.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecution.java
index 31a5835cb532..149d6dc0b186 100644
--- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecution.java
+++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecution.java
@@ -74,12 +74,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    * due to the following reasons, the exit code will be 50000.
    *
    * Otherwise, it can be from different sources:
-   * - Batch known failures as
+   * * Batch known failures:
    * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
-   * - Batch runnable execution failures: You can rely on Batch logs for further
-   * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
-   * If there are multiple runnables failures, Batch only exposes the first
-   * error caught for now.
+   * * Batch runnable execution failures; you can rely on Batch logs to further
+   * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If
+   * there are multiple runnables failures, Batch only exposes the first error.
    * 
* * int32 exit_code = 1; @@ -441,12 +440,11 @@ public Builder mergeFrom( * due to the following reasons, the exit code will be 50000. * * Otherwise, it can be from different sources: - * - Batch known failures as + * * Batch known failures: * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. - * - Batch runnable execution failures: You can rely on Batch logs for further - * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. - * If there are multiple runnables failures, Batch only exposes the first - * error caught for now. + * * Batch runnable execution failures; you can rely on Batch logs to further + * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + * there are multiple runnables failures, Batch only exposes the first error. *
* * int32 exit_code = 1; @@ -467,12 +465,11 @@ public int getExitCode() { * due to the following reasons, the exit code will be 50000. * * Otherwise, it can be from different sources: - * - Batch known failures as + * * Batch known failures: * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. - * - Batch runnable execution failures: You can rely on Batch logs for further - * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. - * If there are multiple runnables failures, Batch only exposes the first - * error caught for now. + * * Batch runnable execution failures; you can rely on Batch logs to further + * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + * there are multiple runnables failures, Batch only exposes the first error. *
* * int32 exit_code = 1; @@ -497,12 +494,11 @@ public Builder setExitCode(int value) { * due to the following reasons, the exit code will be 50000. * * Otherwise, it can be from different sources: - * - Batch known failures as + * * Batch known failures: * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. - * - Batch runnable execution failures: You can rely on Batch logs for further - * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. - * If there are multiple runnables failures, Batch only exposes the first - * error caught for now. + * * Batch runnable execution failures; you can rely on Batch logs to further + * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + * there are multiple runnables failures, Batch only exposes the first error. *
* * int32 exit_code = 1; diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecutionOrBuilder.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecutionOrBuilder.java index d49b68bb2d37..945532e6767e 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecutionOrBuilder.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecutionOrBuilder.java @@ -34,12 +34,11 @@ public interface TaskExecutionOrBuilder * due to the following reasons, the exit code will be 50000. * * Otherwise, it can be from different sources: - * - Batch known failures as + * * Batch known failures: * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. - * - Batch runnable execution failures: You can rely on Batch logs for further - * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. - * If there are multiple runnables failures, Batch only exposes the first - * error caught for now. + * * Batch runnable execution failures; you can rely on Batch logs to further + * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + * there are multiple runnables failures, Batch only exposes the first error. *
* * int32 exit_code = 1; diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpec.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpec.java index 39385786d54a..88d4ee1f721d 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpec.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpec.java @@ -250,10 +250,15 @@ public com.google.cloud.batch.v1.ComputeResourceOrBuilder getComputeResourceOrBu * * *
-   * Maximum duration the task should run.
-   * The task will be killed and marked as FAILED if over this limit.
-   * The valid value range for max_run_duration in seconds is [0,
-   * 315576000000.999999999],
+   * Maximum duration the task should run before being automatically retried
+   * (if enabled) or automatically failed. Format the value of this field
+   * as a time limit in seconds followed by `s`—for example, `3600s`
+   * for 1 hour. The field accepts any value between 0 and the maximum listed
+   * for the `Duration` field type at
+   * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+   * the actual maximum run time for a job will be limited to the maximum run
+   * time for a job listed at
+   * https://cloud.google.com/batch/quotas#max-job-duration.
    * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -268,10 +273,15 @@ public boolean hasMaxRunDuration() { * * *
-   * Maximum duration the task should run.
-   * The task will be killed and marked as FAILED if over this limit.
-   * The valid value range for max_run_duration in seconds is [0,
-   * 315576000000.999999999],
+   * Maximum duration the task should run before being automatically retried
+   * (if enabled) or automatically failed. Format the value of this field
+   * as a time limit in seconds followed by `s`—for example, `3600s`
+   * for 1 hour. The field accepts any value between 0 and the maximum listed
+   * for the `Duration` field type at
+   * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+   * the actual maximum run time for a job will be limited to the maximum run
+   * time for a job listed at
+   * https://cloud.google.com/batch/quotas#max-job-duration.
    * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -288,10 +298,15 @@ public com.google.protobuf.Duration getMaxRunDuration() { * * *
-   * Maximum duration the task should run.
-   * The task will be killed and marked as FAILED if over this limit.
-   * The valid value range for max_run_duration in seconds is [0,
-   * 315576000000.999999999],
+   * Maximum duration the task should run before being automatically retried
+   * (if enabled) or automatically failed. Format the value of this field
+   * as a time limit in seconds followed by `s`—for example, `3600s`
+   * for 1 hour. The field accepts any value between 0 and the maximum listed
+   * for the `Duration` field type at
+   * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+   * the actual maximum run time for a job will be limited to the maximum run
+   * time for a job listed at
+   * https://cloud.google.com/batch/quotas#max-job-duration.
    * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2080,10 +2095,15 @@ public com.google.cloud.batch.v1.ComputeResourceOrBuilder getComputeResourceOrBu * * *
-     * Maximum duration the task should run.
-     * The task will be killed and marked as FAILED if over this limit.
-     * The valid value range for max_run_duration in seconds is [0,
-     * 315576000000.999999999],
+     * Maximum duration the task should run before being automatically retried
+     * (if enabled) or automatically failed. Format the value of this field
+     * as a time limit in seconds followed by `s`—for example, `3600s`
+     * for 1 hour. The field accepts any value between 0 and the maximum listed
+     * for the `Duration` field type at
+     * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+     * the actual maximum run time for a job will be limited to the maximum run
+     * time for a job listed at
+     * https://cloud.google.com/batch/quotas#max-job-duration.
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2097,10 +2117,15 @@ public boolean hasMaxRunDuration() { * * *
-     * Maximum duration the task should run.
-     * The task will be killed and marked as FAILED if over this limit.
-     * The valid value range for max_run_duration in seconds is [0,
-     * 315576000000.999999999],
+     * Maximum duration the task should run before being automatically retried
+     * (if enabled) or automatically failed. Format the value of this field
+     * as a time limit in seconds followed by `s`—for example, `3600s`
+     * for 1 hour. The field accepts any value between 0 and the maximum listed
+     * for the `Duration` field type at
+     * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+     * the actual maximum run time for a job will be limited to the maximum run
+     * time for a job listed at
+     * https://cloud.google.com/batch/quotas#max-job-duration.
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2120,10 +2145,15 @@ public com.google.protobuf.Duration getMaxRunDuration() { * * *
-     * Maximum duration the task should run.
-     * The task will be killed and marked as FAILED if over this limit.
-     * The valid value range for max_run_duration in seconds is [0,
-     * 315576000000.999999999],
+     * Maximum duration the task should run before being automatically retried
+     * (if enabled) or automatically failed. Format the value of this field
+     * as a time limit in seconds followed by `s`—for example, `3600s`
+     * for 1 hour. The field accepts any value between 0 and the maximum listed
+     * for the `Duration` field type at
+     * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+     * the actual maximum run time for a job will be limited to the maximum run
+     * time for a job listed at
+     * https://cloud.google.com/batch/quotas#max-job-duration.
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2145,10 +2175,15 @@ public Builder setMaxRunDuration(com.google.protobuf.Duration value) { * * *
-     * Maximum duration the task should run.
-     * The task will be killed and marked as FAILED if over this limit.
-     * The valid value range for max_run_duration in seconds is [0,
-     * 315576000000.999999999],
+     * Maximum duration the task should run before being automatically retried
+     * (if enabled) or automatically failed. Format the value of this field
+     * as a time limit in seconds followed by `s`—for example, `3600s`
+     * for 1 hour. The field accepts any value between 0 and the maximum listed
+     * for the `Duration` field type at
+     * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+     * the actual maximum run time for a job will be limited to the maximum run
+     * time for a job listed at
+     * https://cloud.google.com/batch/quotas#max-job-duration.
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2167,10 +2202,15 @@ public Builder setMaxRunDuration(com.google.protobuf.Duration.Builder builderFor * * *
-     * Maximum duration the task should run.
-     * The task will be killed and marked as FAILED if over this limit.
-     * The valid value range for max_run_duration in seconds is [0,
-     * 315576000000.999999999],
+     * Maximum duration the task should run before being automatically retried
+     * (if enabled) or automatically failed. Format the value of this field
+     * as a time limit in seconds followed by `s`—for example, `3600s`
+     * for 1 hour. The field accepts any value between 0 and the maximum listed
+     * for the `Duration` field type at
+     * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+     * the actual maximum run time for a job will be limited to the maximum run
+     * time for a job listed at
+     * https://cloud.google.com/batch/quotas#max-job-duration.
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2197,10 +2237,15 @@ public Builder mergeMaxRunDuration(com.google.protobuf.Duration value) { * * *
-     * Maximum duration the task should run.
-     * The task will be killed and marked as FAILED if over this limit.
-     * The valid value range for max_run_duration in seconds is [0,
-     * 315576000000.999999999],
+     * Maximum duration the task should run before being automatically retried
+     * (if enabled) or automatically failed. Format the value of this field
+     * as a time limit in seconds followed by `s`—for example, `3600s`
+     * for 1 hour. The field accepts any value between 0 and the maximum listed
+     * for the `Duration` field type at
+     * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+     * the actual maximum run time for a job will be limited to the maximum run
+     * time for a job listed at
+     * https://cloud.google.com/batch/quotas#max-job-duration.
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2219,10 +2264,15 @@ public Builder clearMaxRunDuration() { * * *
-     * Maximum duration the task should run.
-     * The task will be killed and marked as FAILED if over this limit.
-     * The valid value range for max_run_duration in seconds is [0,
-     * 315576000000.999999999],
+     * Maximum duration the task should run before being automatically retried
+     * (if enabled) or automatically failed. Format the value of this field
+     * as a time limit in seconds followed by `s`—for example, `3600s`
+     * for 1 hour. The field accepts any value between 0 and the maximum listed
+     * for the `Duration` field type at
+     * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+     * the actual maximum run time for a job will be limited to the maximum run
+     * time for a job listed at
+     * https://cloud.google.com/batch/quotas#max-job-duration.
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2236,10 +2286,15 @@ public com.google.protobuf.Duration.Builder getMaxRunDurationBuilder() { * * *
-     * Maximum duration the task should run.
-     * The task will be killed and marked as FAILED if over this limit.
-     * The valid value range for max_run_duration in seconds is [0,
-     * 315576000000.999999999],
+     * Maximum duration the task should run before being automatically retried
+     * (if enabled) or automatically failed. Format the value of this field
+     * as a time limit in seconds followed by `s`—for example, `3600s`
+     * for 1 hour. The field accepts any value between 0 and the maximum listed
+     * for the `Duration` field type at
+     * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+     * the actual maximum run time for a job will be limited to the maximum run
+     * time for a job listed at
+     * https://cloud.google.com/batch/quotas#max-job-duration.
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2257,10 +2312,15 @@ public com.google.protobuf.DurationOrBuilder getMaxRunDurationOrBuilder() { * * *
-     * Maximum duration the task should run.
-     * The task will be killed and marked as FAILED if over this limit.
-     * The valid value range for max_run_duration in seconds is [0,
-     * 315576000000.999999999],
+     * Maximum duration the task should run before being automatically retried
+     * (if enabled) or automatically failed. Format the value of this field
+     * as a time limit in seconds followed by `s`—for example, `3600s`
+     * for 1 hour. The field accepts any value between 0 and the maximum listed
+     * for the `Duration` field type at
+     * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+     * the actual maximum run time for a job will be limited to the maximum run
+     * time for a job listed at
+     * https://cloud.google.com/batch/quotas#max-job-duration.
      * 
* * .google.protobuf.Duration max_run_duration = 4; diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpecOrBuilder.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpecOrBuilder.java index 7b35f2ab6c2c..555f21daf2a1 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpecOrBuilder.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpecOrBuilder.java @@ -159,10 +159,15 @@ public interface TaskSpecOrBuilder * * *
-   * Maximum duration the task should run.
-   * The task will be killed and marked as FAILED if over this limit.
-   * The valid value range for max_run_duration in seconds is [0,
-   * 315576000000.999999999],
+   * Maximum duration the task should run before being automatically retried
+   * (if enabled) or automatically failed. Format the value of this field
+   * as a time limit in seconds followed by `s`—for example, `3600s`
+   * for 1 hour. The field accepts any value between 0 and the maximum listed
+   * for the `Duration` field type at
+   * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+   * the actual maximum run time for a job will be limited to the maximum run
+   * time for a job listed at
+   * https://cloud.google.com/batch/quotas#max-job-duration.
    * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -174,10 +179,15 @@ public interface TaskSpecOrBuilder * * *
-   * Maximum duration the task should run.
-   * The task will be killed and marked as FAILED if over this limit.
-   * The valid value range for max_run_duration in seconds is [0,
-   * 315576000000.999999999],
+   * Maximum duration the task should run before being automatically retried
+   * (if enabled) or automatically failed. Format the value of this field
+   * as a time limit in seconds followed by `s`—for example, `3600s`
+   * for 1 hour. The field accepts any value between 0 and the maximum listed
+   * for the `Duration` field type at
+   * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+   * the actual maximum run time for a job will be limited to the maximum run
+   * time for a job listed at
+   * https://cloud.google.com/batch/quotas#max-job-duration.
    * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -189,10 +199,15 @@ public interface TaskSpecOrBuilder * * *
-   * Maximum duration the task should run.
-   * The task will be killed and marked as FAILED if over this limit.
-   * The valid value range for max_run_duration in seconds is [0,
-   * 315576000000.999999999],
+   * Maximum duration the task should run before being automatically retried
+   * (if enabled) or automatically failed. Format the value of this field
+   * as a time limit in seconds followed by `s`—for example, `3600s`
+   * for 1 hour. The field accepts any value between 0 and the maximum listed
+   * for the `Duration` field type at
+   * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+   * the actual maximum run time for a job will be limited to the maximum run
+   * time for a job listed at
+   * https://cloud.google.com/batch/quotas#max-job-duration.
    * 
* * .google.protobuf.Duration max_run_duration = 4; diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/job.proto b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/job.proto index 67b486d3e58e..b7d0729895a4 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/job.proto +++ b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/job.proto @@ -419,9 +419,9 @@ message AllocationPolicy { string instance_template = 2; } - // Set this field true if users want Batch to help fetch drivers from a - // third party location and install them for GPUs specified in - // policy.accelerators or instance_template on their behalf. Default is + // Set this field true if you want Batch to help fetch drivers from a third + // party location and install them for GPUs specified in + // `policy.accelerators` or `instance_template` on your behalf. Default is // false. // // For Container-Optimized Image cases, Batch will install the diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto index 3b5f6d03fa94..f38d7c0c2478 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto +++ b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto @@ -108,12 +108,11 @@ message TaskExecution { // due to the following reasons, the exit code will be 50000. // // Otherwise, it can be from different sources: - // - Batch known failures as + // * Batch known failures: // https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. - // - Batch runnable execution failures: You can rely on Batch logs for further - // diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. - // If there are multiple runnables failures, Batch only exposes the first - // error caught for now. + // * Batch runnable execution failures; you can rely on Batch logs to further + // diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + // there are multiple runnables failures, Batch only exposes the first error. int32 exit_code = 1; } @@ -341,10 +340,15 @@ message TaskSpec { // ComputeResource requirements. ComputeResource compute_resource = 3; - // Maximum duration the task should run. - // The task will be killed and marked as FAILED if over this limit. - // The valid value range for max_run_duration in seconds is [0, - // 315576000000.999999999], + // Maximum duration the task should run before being automatically retried + // (if enabled) or automatically failed. Format the value of this field + // as a time limit in seconds followed by `s`—for example, `3600s` + // for 1 hour. The field accepts any value between 0 and the maximum listed + // for the `Duration` field type at + // https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, + // the actual maximum run time for a job will be limited to the maximum run + // time for a job listed at + // https://cloud.google.com/batch/quotas#max-job-duration. google.protobuf.Duration max_run_duration = 4; // Maximum number of retries on failures. diff --git a/java-container/.repo-metadata.json b/java-container/.repo-metadata.json index 75f37f17de23..6b45faa41e86 100644 --- a/java-container/.repo-metadata.json +++ b/java-container/.repo-metadata.json @@ -5,7 +5,7 @@ "api_description": "is an enterprise-grade platform for containerized applications, including stateful and stateless, AI and ML, Linux and Windows, complex and simple web apps, API, and backend services. Leverage industry-first features like four-way auto-scaling and no-stress management. Optimize GPU and TPU provisioning, use integrated developer tools, and get multi-cluster support from SREs.", "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-container/latest/overview", "release_level": "stable", - "transport": "grpc", + "transport": "both", "language": "java", "repo": "googleapis/google-cloud-java", "repo_short": "java-container", diff --git a/java-container/README.md b/java-container/README.md index 182ee3a4542a..4936efdaaf5e 100644 --- a/java-container/README.md +++ b/java-container/README.md @@ -101,7 +101,7 @@ To get help, follow the instructions in the [shared Troubleshooting document][tr ## Transport -Kubernetes Engine uses gRPC for the transport layer. +Kubernetes Engine uses both gRPC and HTTP/JSON for the transport layer. ## Supported Java Versions @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-container.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-container/2.47.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-container/2.48.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-container/google-cloud-container/pom.xml b/java-container/google-cloud-container/pom.xml index 3614ff104e0f..3b1dbe8d85f4 100644 --- a/java-container/google-cloud-container/pom.xml +++ b/java-container/google-cloud-container/pom.xml @@ -60,6 +60,10 @@ com.google.api gax-grpc + + com.google.api + gax-httpjson + org.threeten threetenbp @@ -88,11 +92,23 @@ test + + com.google.api + gax + testlib + test + com.google.api gax-grpc testlib test + + com.google.api + gax-httpjson + testlib + test + diff --git a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java index dc5c7205d70c..5c589a5fe7db 100644 --- a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java +++ b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java @@ -358,6 +358,7 @@ * *

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

* *

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

@@ -751,6 +752,20 @@ * ClusterManagerClient clusterManagerClient = ClusterManagerClient.create(clusterManagerSettings); * } * + *

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ClusterManagerSettings clusterManagerSettings =
+ *     ClusterManagerSettings.newHttpJsonBuilder().build();
+ * ClusterManagerClient clusterManagerClient = ClusterManagerClient.create(clusterManagerSettings);
+ * }
+ * *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @Generated("by gapic-generator-java") @@ -1406,10 +1421,12 @@ public final UnaryCallable updateClusterCallabl * .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build()) * .setResourceLabels(ResourceLabels.newBuilder().build()) * .setWindowsNodeConfig(WindowsNodeConfig.newBuilder().build()) + * .addAllAccelerators(new ArrayList()) * .setMachineType("machineType-218117087") * .setDiskType("diskType279771767") * .setDiskSizeGb(-757478089) * .setResourceManagerTags(ResourceManagerTags.newBuilder().build()) + * .setContainerdConfig(ContainerdConfig.newBuilder().build()) * .setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build()) * .build(); * Operation response = clusterManagerClient.updateNodePool(request); @@ -1462,10 +1479,12 @@ public final Operation updateNodePool(UpdateNodePoolRequest request) { * .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build()) * .setResourceLabels(ResourceLabels.newBuilder().build()) * .setWindowsNodeConfig(WindowsNodeConfig.newBuilder().build()) + * .addAllAccelerators(new ArrayList()) * .setMachineType("machineType-218117087") * .setDiskType("diskType279771767") * .setDiskSizeGb(-757478089) * .setResourceManagerTags(ResourceManagerTags.newBuilder().build()) + * .setContainerdConfig(ContainerdConfig.newBuilder().build()) * .setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build()) * .build(); * ApiFuture future = @@ -2545,6 +2564,34 @@ public final UnaryCallable deleteClusterCallabl return stub.deleteClusterCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all operations in a project in a specific zone or all zones. + * + *

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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+   *   String parent = "parent-995424086";
+   *   ListOperationsResponse response = clusterManagerClient.listOperations(parent);
+   * }
+   * }
+ * + * @param parent The parent (project and location) where the operations will be listed. Specified + * in the format `projects/*/locations/*`. Location "-" matches all zones and all + * regions. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOperationsResponse listOperations(String parent) { + ListOperationsRequest request = ListOperationsRequest.newBuilder().setParent(parent).build(); + return listOperations(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all operations in a project in a specific zone or all zones. diff --git a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerSettings.java b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerSettings.java index 322f5918be50..563850dba3d7 100644 --- a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerSettings.java +++ b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerSettings.java @@ -19,9 +19,11 @@ import static com.google.cloud.container.v1.ClusterManagerClient.ListUsableSubnetworksPagedResponse; import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; @@ -327,11 +329,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde return ClusterManagerStubSettings.defaultCredentialsProviderBuilder(); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return ClusterManagerStubSettings.defaultGrpcTransportProviderBuilder(); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ClusterManagerStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return ClusterManagerStubSettings.defaultTransportChannelProvider(); } @@ -340,11 +349,16 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil return ClusterManagerStubSettings.defaultApiClientHeaderProviderBuilder(); } - /** Returns a new builder for this class. */ + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -382,6 +396,10 @@ private static Builder createDefault() { return new Builder(ClusterManagerStubSettings.newBuilder()); } + private static Builder createHttpJsonDefault() { + return new Builder(ClusterManagerStubSettings.newHttpJsonBuilder()); + } + public ClusterManagerStubSettings.Builder getStubSettingsBuilder() { return ((ClusterManagerStubSettings.Builder) getStubSettings()); } diff --git a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/gapic_metadata.json b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/gapic_metadata.json index fc131da80f5a..a286c1fc5868 100644 --- a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/gapic_metadata.json +++ b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/gapic_metadata.json @@ -56,7 +56,7 @@ "methods": ["listNodePools", "listNodePools", "listNodePools", "listNodePoolsCallable"] }, "ListOperations": { - "methods": ["listOperations", "listOperations", "listOperationsCallable"] + "methods": ["listOperations", "listOperations", "listOperations", "listOperationsCallable"] }, "ListUsableSubnetworks": { "methods": ["listUsableSubnetworks", "listUsableSubnetworksPagedCallable", "listUsableSubnetworksCallable"] diff --git a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/ClusterManagerStubSettings.java b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/ClusterManagerStubSettings.java index 0f4bb76c1b0f..03c7bdaf9f4c 100644 --- a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/ClusterManagerStubSettings.java +++ b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/ClusterManagerStubSettings.java @@ -20,12 +20,16 @@ import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; import com.google.api.gax.core.GaxProperties; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.GrpcTransportChannel; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiClientHeaderProvider; @@ -442,6 +446,11 @@ public ClusterManagerStub createStub() throws IOException { .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcClusterManagerStub.create(this); } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonClusterManagerStub.create(this); + } throw new UnsupportedOperationException( String.format( "Transport not supported: %s", getTransportChannelProvider().getTransportName())); @@ -480,17 +489,24 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde .setUseJwtAccessWithScope(true); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(Integer.MAX_VALUE); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return defaultGrpcTransportProviderBuilder().build(); } - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( "gapic", GaxProperties.getLibraryVersion(ClusterManagerStubSettings.class)) @@ -498,11 +514,29 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - /** Returns a new builder for this class. */ + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ClusterManagerStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ClusterManagerStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -833,6 +867,18 @@ private static Builder createDefault() { return initDefaults(builder); } + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + private static Builder initDefaults(Builder builder) { builder .listClustersSettings() diff --git a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/HttpJsonClusterManagerCallableFactory.java b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/HttpJsonClusterManagerCallableFactory.java new file mode 100644 index 000000000000..aa118d6b269c --- /dev/null +++ b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/HttpJsonClusterManagerCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.container.v1.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the ClusterManager service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonClusterManagerCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/HttpJsonClusterManagerStub.java b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/HttpJsonClusterManagerStub.java new file mode 100644 index 000000000000..a13851cf751a --- /dev/null +++ b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/HttpJsonClusterManagerStub.java @@ -0,0 +1,2621 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.container.v1.stub; + +import static com.google.cloud.container.v1.ClusterManagerClient.ListUsableSubnetworksPagedResponse; + +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.container.v1.CancelOperationRequest; +import com.google.container.v1.CheckAutopilotCompatibilityRequest; +import com.google.container.v1.CheckAutopilotCompatibilityResponse; +import com.google.container.v1.Cluster; +import com.google.container.v1.CompleteIPRotationRequest; +import com.google.container.v1.CompleteNodePoolUpgradeRequest; +import com.google.container.v1.CreateClusterRequest; +import com.google.container.v1.CreateNodePoolRequest; +import com.google.container.v1.DeleteClusterRequest; +import com.google.container.v1.DeleteNodePoolRequest; +import com.google.container.v1.GetClusterRequest; +import com.google.container.v1.GetJSONWebKeysRequest; +import com.google.container.v1.GetJSONWebKeysResponse; +import com.google.container.v1.GetNodePoolRequest; +import com.google.container.v1.GetOperationRequest; +import com.google.container.v1.GetServerConfigRequest; +import com.google.container.v1.ListClustersRequest; +import com.google.container.v1.ListClustersResponse; +import com.google.container.v1.ListNodePoolsRequest; +import com.google.container.v1.ListNodePoolsResponse; +import com.google.container.v1.ListOperationsRequest; +import com.google.container.v1.ListOperationsResponse; +import com.google.container.v1.ListUsableSubnetworksRequest; +import com.google.container.v1.ListUsableSubnetworksResponse; +import com.google.container.v1.NodePool; +import com.google.container.v1.Operation; +import com.google.container.v1.RollbackNodePoolUpgradeRequest; +import com.google.container.v1.ServerConfig; +import com.google.container.v1.SetAddonsConfigRequest; +import com.google.container.v1.SetLabelsRequest; +import com.google.container.v1.SetLegacyAbacRequest; +import com.google.container.v1.SetLocationsRequest; +import com.google.container.v1.SetLoggingServiceRequest; +import com.google.container.v1.SetMaintenancePolicyRequest; +import com.google.container.v1.SetMasterAuthRequest; +import com.google.container.v1.SetMonitoringServiceRequest; +import com.google.container.v1.SetNetworkPolicyRequest; +import com.google.container.v1.SetNodePoolAutoscalingRequest; +import com.google.container.v1.SetNodePoolManagementRequest; +import com.google.container.v1.SetNodePoolSizeRequest; +import com.google.container.v1.StartIPRotationRequest; +import com.google.container.v1.UpdateClusterRequest; +import com.google.container.v1.UpdateMasterRequest; +import com.google.container.v1.UpdateNodePoolRequest; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the ClusterManager service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonClusterManagerStub extends ClusterManagerStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + listClustersMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/ListClusters") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/clusters", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths("/v1/projects/{projectId}/zones/{zone}/clusters") + .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(ListClustersResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/GetCluster") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths("/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") + .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(Cluster.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/CreateCluster") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/clusters", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths("/v1/projects/{projectId}/zones/{zone}/clusters") + .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() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/UpdateCluster") + .setHttpMethod("PUT") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") + .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() + .clearClusterId() + .clearName() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateNodePoolMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/UpdateNodePool") + .setHttpMethod("PUT") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "nodePoolId", request.getNodePoolId()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update") + .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() + .clearClusterId() + .clearName() + .clearNodePoolId() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setNodePoolAutoscalingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/SetNodePoolAutoscaling") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "nodePoolId", request.getNodePoolId()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling") + .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() + .clearClusterId() + .clearName() + .clearNodePoolId() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setLoggingServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/SetLoggingService") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}:setLogging", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging") + .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() + .clearClusterId() + .clearName() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setMonitoringServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/SetMonitoringService") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}:setMonitoring", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring") + .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() + .clearClusterId() + .clearName() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setAddonsConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/SetAddonsConfig") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}:setAddons", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons") + .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() + .clearClusterId() + .clearName() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/SetLocations") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}:setLocations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations") + .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() + .clearClusterId() + .clearName() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateMasterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/UpdateMaster") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}:updateMaster", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master") + .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() + .clearClusterId() + .clearName() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setMasterAuthMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/SetMasterAuth") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}:setMasterAuth", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth") + .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() + .clearClusterId() + .clearName() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/DeleteCluster") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listOperationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/ListOperations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/operations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths("/v1/projects/{projectId}/zones/{zone}/operations") + .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(ListOperationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getOperationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/GetOperation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/operations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam( + fields, "operationId", request.getOperationId()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/operations/{operationId}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + cancelOperationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/CancelOperation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/operations/*}:cancel", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam( + fields, "operationId", request.getOperationId()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel") + .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() + .clearOperationId() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getServerConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/GetServerConfig") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}/serverConfig", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths("/v1/projects/{projectId}/zones/{zone}/serverconfig") + .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(ServerConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getJSONWebKeysMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/GetJSONWebKeys") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/clusters/*}/jwks", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GetJSONWebKeysResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listNodePoolsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/ListNodePools") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") + .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(ListNodePoolsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getNodePoolMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/GetNodePool") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "nodePoolId", request.getNodePoolId()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") + .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(NodePool.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createNodePoolMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/CreateNodePool") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") + .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() + .clearClusterId() + .clearParent() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteNodePoolMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/DeleteNodePool") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "nodePoolId", request.getNodePoolId()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + completeNodePoolUpgradeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/CompleteNodePoolUpgrade") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade", + 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(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + rollbackNodePoolUpgradeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/RollbackNodePoolUpgrade") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "nodePoolId", request.getNodePoolId()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback") + .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() + .clearClusterId() + .clearName() + .clearNodePoolId() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setNodePoolManagementMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/SetNodePoolManagement") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "nodePoolId", request.getNodePoolId()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement") + .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() + .clearClusterId() + .clearName() + .clearNodePoolId() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor setLabelsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/SetLabels") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels") + .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() + .clearClusterId() + .clearName() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setLegacyAbacMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/SetLegacyAbac") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac") + .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() + .clearClusterId() + .clearName() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + startIPRotationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/StartIPRotation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}:startIpRotation", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation") + .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() + .clearClusterId() + .clearName() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + completeIPRotationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/CompleteIPRotation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}:completeIpRotation", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation") + .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() + .clearClusterId() + .clearName() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setNodePoolSizeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/SetNodePoolSize") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "nodePoolId", request.getNodePoolId()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize") + .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() + .clearClusterId() + .clearName() + .clearNodePoolId() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setNetworkPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/SetNetworkPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy") + .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() + .clearClusterId() + .clearName() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setMaintenancePolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/SetMaintenancePolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "clusterId", request.getClusterId()); + serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "projectId", request.getProjectId()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setAdditionalPaths( + "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy") + .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() + .clearClusterId() + .clearName() + .clearProjectId() + .clearZone() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListUsableSubnetworksRequest, ListUsableSubnetworksResponse> + listUsableSubnetworksMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/ListUsableSubnetworks") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*}/aggregated/usableSubnetworks", + 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(ListUsableSubnetworksResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + CheckAutopilotCompatibilityRequest, CheckAutopilotCompatibilityResponse> + checkAutopilotCompatibilityMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.container.v1.ClusterManager/CheckAutopilotCompatibility") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}:checkAutopilotCompatibility", + 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(CheckAutopilotCompatibilityResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable listClustersCallable; + private final UnaryCallable getClusterCallable; + private final UnaryCallable createClusterCallable; + private final UnaryCallable updateClusterCallable; + private final UnaryCallable updateNodePoolCallable; + private final UnaryCallable + setNodePoolAutoscalingCallable; + private final UnaryCallable setLoggingServiceCallable; + private final UnaryCallable setMonitoringServiceCallable; + private final UnaryCallable setAddonsConfigCallable; + private final UnaryCallable setLocationsCallable; + private final UnaryCallable updateMasterCallable; + private final UnaryCallable setMasterAuthCallable; + private final UnaryCallable deleteClusterCallable; + private final UnaryCallable listOperationsCallable; + private final UnaryCallable getOperationCallable; + private final UnaryCallable cancelOperationCallable; + private final UnaryCallable getServerConfigCallable; + private final UnaryCallable getJSONWebKeysCallable; + private final UnaryCallable listNodePoolsCallable; + private final UnaryCallable getNodePoolCallable; + private final UnaryCallable createNodePoolCallable; + private final UnaryCallable deleteNodePoolCallable; + private final UnaryCallable + completeNodePoolUpgradeCallable; + private final UnaryCallable + rollbackNodePoolUpgradeCallable; + private final UnaryCallable + setNodePoolManagementCallable; + private final UnaryCallable setLabelsCallable; + private final UnaryCallable setLegacyAbacCallable; + private final UnaryCallable startIPRotationCallable; + private final UnaryCallable completeIPRotationCallable; + private final UnaryCallable setNodePoolSizeCallable; + private final UnaryCallable setNetworkPolicyCallable; + private final UnaryCallable setMaintenancePolicyCallable; + private final UnaryCallable + listUsableSubnetworksCallable; + private final UnaryCallable + listUsableSubnetworksPagedCallable; + private final UnaryCallable< + CheckAutopilotCompatibilityRequest, CheckAutopilotCompatibilityResponse> + checkAutopilotCompatibilityCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonClusterManagerStub create(ClusterManagerStubSettings settings) + throws IOException { + return new HttpJsonClusterManagerStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonClusterManagerStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonClusterManagerStub( + ClusterManagerStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonClusterManagerStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonClusterManagerStub( + ClusterManagerStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonClusterManagerStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonClusterManagerStub( + ClusterManagerStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonClusterManagerCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonClusterManagerStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonClusterManagerStub( + ClusterManagerStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings listClustersTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listClustersMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateNodePoolTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateNodePoolMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("node_pool_id", String.valueOf(request.getNodePoolId())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + setNodePoolAutoscalingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setNodePoolAutoscalingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("node_pool_id", String.valueOf(request.getNodePoolId())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings setLoggingServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setLoggingServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + setMonitoringServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setMonitoringServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings setAddonsConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setAddonsConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings setLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateMasterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateMasterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings setMasterAuthTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setMasterAuthMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listOperationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listOperationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getOperationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getOperationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + builder.add("operation_id", String.valueOf(request.getOperationId())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings cancelOperationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(cancelOperationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + builder.add("operation_id", String.valueOf(request.getOperationId())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getServerConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getServerConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getJSONWebKeysTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getJSONWebKeysMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listNodePoolsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listNodePoolsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("parent", String.valueOf(request.getParent())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getNodePoolTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getNodePoolMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("node_pool_id", String.valueOf(request.getNodePoolId())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createNodePoolTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createNodePoolMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("parent", String.valueOf(request.getParent())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteNodePoolTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteNodePoolMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("node_pool_id", String.valueOf(request.getNodePoolId())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + completeNodePoolUpgradeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(completeNodePoolUpgradeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + rollbackNodePoolUpgradeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(rollbackNodePoolUpgradeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("node_pool_id", String.valueOf(request.getNodePoolId())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + setNodePoolManagementTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setNodePoolManagementMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("node_pool_id", String.valueOf(request.getNodePoolId())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings setLabelsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setLabelsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings setLegacyAbacTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setLegacyAbacMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings startIPRotationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(startIPRotationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings completeIPRotationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(completeIPRotationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings setNodePoolSizeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setNodePoolSizeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("node_pool_id", String.valueOf(request.getNodePoolId())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings setNetworkPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setNetworkPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + setMaintenancePolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setMaintenancePolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster_id", String.valueOf(request.getClusterId())); + builder.add("name", String.valueOf(request.getName())); + builder.add("project_id", String.valueOf(request.getProjectId())); + builder.add("zone", String.valueOf(request.getZone())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listUsableSubnetworksTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listUsableSubnetworksMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + checkAutopilotCompatibilityTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(checkAutopilotCompatibilityMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listClustersCallable = + callableFactory.createUnaryCallable( + listClustersTransportSettings, settings.listClustersSettings(), clientContext); + this.getClusterCallable = + callableFactory.createUnaryCallable( + getClusterTransportSettings, settings.getClusterSettings(), clientContext); + this.createClusterCallable = + callableFactory.createUnaryCallable( + createClusterTransportSettings, settings.createClusterSettings(), clientContext); + this.updateClusterCallable = + callableFactory.createUnaryCallable( + updateClusterTransportSettings, settings.updateClusterSettings(), clientContext); + this.updateNodePoolCallable = + callableFactory.createUnaryCallable( + updateNodePoolTransportSettings, settings.updateNodePoolSettings(), clientContext); + this.setNodePoolAutoscalingCallable = + callableFactory.createUnaryCallable( + setNodePoolAutoscalingTransportSettings, + settings.setNodePoolAutoscalingSettings(), + clientContext); + this.setLoggingServiceCallable = + callableFactory.createUnaryCallable( + setLoggingServiceTransportSettings, + settings.setLoggingServiceSettings(), + clientContext); + this.setMonitoringServiceCallable = + callableFactory.createUnaryCallable( + setMonitoringServiceTransportSettings, + settings.setMonitoringServiceSettings(), + clientContext); + this.setAddonsConfigCallable = + callableFactory.createUnaryCallable( + setAddonsConfigTransportSettings, settings.setAddonsConfigSettings(), clientContext); + this.setLocationsCallable = + callableFactory.createUnaryCallable( + setLocationsTransportSettings, settings.setLocationsSettings(), clientContext); + this.updateMasterCallable = + callableFactory.createUnaryCallable( + updateMasterTransportSettings, settings.updateMasterSettings(), clientContext); + this.setMasterAuthCallable = + callableFactory.createUnaryCallable( + setMasterAuthTransportSettings, settings.setMasterAuthSettings(), clientContext); + this.deleteClusterCallable = + callableFactory.createUnaryCallable( + deleteClusterTransportSettings, settings.deleteClusterSettings(), clientContext); + this.listOperationsCallable = + callableFactory.createUnaryCallable( + listOperationsTransportSettings, settings.listOperationsSettings(), clientContext); + this.getOperationCallable = + callableFactory.createUnaryCallable( + getOperationTransportSettings, settings.getOperationSettings(), clientContext); + this.cancelOperationCallable = + callableFactory.createUnaryCallable( + cancelOperationTransportSettings, settings.cancelOperationSettings(), clientContext); + this.getServerConfigCallable = + callableFactory.createUnaryCallable( + getServerConfigTransportSettings, settings.getServerConfigSettings(), clientContext); + this.getJSONWebKeysCallable = + callableFactory.createUnaryCallable( + getJSONWebKeysTransportSettings, settings.getJSONWebKeysSettings(), clientContext); + this.listNodePoolsCallable = + callableFactory.createUnaryCallable( + listNodePoolsTransportSettings, settings.listNodePoolsSettings(), clientContext); + this.getNodePoolCallable = + callableFactory.createUnaryCallable( + getNodePoolTransportSettings, settings.getNodePoolSettings(), clientContext); + this.createNodePoolCallable = + callableFactory.createUnaryCallable( + createNodePoolTransportSettings, settings.createNodePoolSettings(), clientContext); + this.deleteNodePoolCallable = + callableFactory.createUnaryCallable( + deleteNodePoolTransportSettings, settings.deleteNodePoolSettings(), clientContext); + this.completeNodePoolUpgradeCallable = + callableFactory.createUnaryCallable( + completeNodePoolUpgradeTransportSettings, + settings.completeNodePoolUpgradeSettings(), + clientContext); + this.rollbackNodePoolUpgradeCallable = + callableFactory.createUnaryCallable( + rollbackNodePoolUpgradeTransportSettings, + settings.rollbackNodePoolUpgradeSettings(), + clientContext); + this.setNodePoolManagementCallable = + callableFactory.createUnaryCallable( + setNodePoolManagementTransportSettings, + settings.setNodePoolManagementSettings(), + clientContext); + this.setLabelsCallable = + callableFactory.createUnaryCallable( + setLabelsTransportSettings, settings.setLabelsSettings(), clientContext); + this.setLegacyAbacCallable = + callableFactory.createUnaryCallable( + setLegacyAbacTransportSettings, settings.setLegacyAbacSettings(), clientContext); + this.startIPRotationCallable = + callableFactory.createUnaryCallable( + startIPRotationTransportSettings, settings.startIPRotationSettings(), clientContext); + this.completeIPRotationCallable = + callableFactory.createUnaryCallable( + completeIPRotationTransportSettings, + settings.completeIPRotationSettings(), + clientContext); + this.setNodePoolSizeCallable = + callableFactory.createUnaryCallable( + setNodePoolSizeTransportSettings, settings.setNodePoolSizeSettings(), clientContext); + this.setNetworkPolicyCallable = + callableFactory.createUnaryCallable( + setNetworkPolicyTransportSettings, settings.setNetworkPolicySettings(), clientContext); + this.setMaintenancePolicyCallable = + callableFactory.createUnaryCallable( + setMaintenancePolicyTransportSettings, + settings.setMaintenancePolicySettings(), + clientContext); + this.listUsableSubnetworksCallable = + callableFactory.createUnaryCallable( + listUsableSubnetworksTransportSettings, + settings.listUsableSubnetworksSettings(), + clientContext); + this.listUsableSubnetworksPagedCallable = + callableFactory.createPagedCallable( + listUsableSubnetworksTransportSettings, + settings.listUsableSubnetworksSettings(), + clientContext); + this.checkAutopilotCompatibilityCallable = + callableFactory.createUnaryCallable( + checkAutopilotCompatibilityTransportSettings, + settings.checkAutopilotCompatibilitySettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listClustersMethodDescriptor); + methodDescriptors.add(getClusterMethodDescriptor); + methodDescriptors.add(createClusterMethodDescriptor); + methodDescriptors.add(updateClusterMethodDescriptor); + methodDescriptors.add(updateNodePoolMethodDescriptor); + methodDescriptors.add(setNodePoolAutoscalingMethodDescriptor); + methodDescriptors.add(setLoggingServiceMethodDescriptor); + methodDescriptors.add(setMonitoringServiceMethodDescriptor); + methodDescriptors.add(setAddonsConfigMethodDescriptor); + methodDescriptors.add(setLocationsMethodDescriptor); + methodDescriptors.add(updateMasterMethodDescriptor); + methodDescriptors.add(setMasterAuthMethodDescriptor); + methodDescriptors.add(deleteClusterMethodDescriptor); + methodDescriptors.add(listOperationsMethodDescriptor); + methodDescriptors.add(getOperationMethodDescriptor); + methodDescriptors.add(cancelOperationMethodDescriptor); + methodDescriptors.add(getServerConfigMethodDescriptor); + methodDescriptors.add(getJSONWebKeysMethodDescriptor); + methodDescriptors.add(listNodePoolsMethodDescriptor); + methodDescriptors.add(getNodePoolMethodDescriptor); + methodDescriptors.add(createNodePoolMethodDescriptor); + methodDescriptors.add(deleteNodePoolMethodDescriptor); + methodDescriptors.add(completeNodePoolUpgradeMethodDescriptor); + methodDescriptors.add(rollbackNodePoolUpgradeMethodDescriptor); + methodDescriptors.add(setNodePoolManagementMethodDescriptor); + methodDescriptors.add(setLabelsMethodDescriptor); + methodDescriptors.add(setLegacyAbacMethodDescriptor); + methodDescriptors.add(startIPRotationMethodDescriptor); + methodDescriptors.add(completeIPRotationMethodDescriptor); + methodDescriptors.add(setNodePoolSizeMethodDescriptor); + methodDescriptors.add(setNetworkPolicyMethodDescriptor); + methodDescriptors.add(setMaintenancePolicyMethodDescriptor); + methodDescriptors.add(listUsableSubnetworksMethodDescriptor); + methodDescriptors.add(checkAutopilotCompatibilityMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable listClustersCallable() { + return listClustersCallable; + } + + @Override + public UnaryCallable getClusterCallable() { + return getClusterCallable; + } + + @Override + public UnaryCallable createClusterCallable() { + return createClusterCallable; + } + + @Override + public UnaryCallable updateClusterCallable() { + return updateClusterCallable; + } + + @Override + public UnaryCallable updateNodePoolCallable() { + return updateNodePoolCallable; + } + + @Override + public UnaryCallable setNodePoolAutoscalingCallable() { + return setNodePoolAutoscalingCallable; + } + + @Override + public UnaryCallable setLoggingServiceCallable() { + return setLoggingServiceCallable; + } + + @Override + public UnaryCallable setMonitoringServiceCallable() { + return setMonitoringServiceCallable; + } + + @Override + public UnaryCallable setAddonsConfigCallable() { + return setAddonsConfigCallable; + } + + @Override + public UnaryCallable setLocationsCallable() { + return setLocationsCallable; + } + + @Override + public UnaryCallable updateMasterCallable() { + return updateMasterCallable; + } + + @Override + public UnaryCallable setMasterAuthCallable() { + return setMasterAuthCallable; + } + + @Override + public UnaryCallable deleteClusterCallable() { + return deleteClusterCallable; + } + + @Override + public UnaryCallable listOperationsCallable() { + return listOperationsCallable; + } + + @Override + public UnaryCallable getOperationCallable() { + return getOperationCallable; + } + + @Override + public UnaryCallable cancelOperationCallable() { + return cancelOperationCallable; + } + + @Override + public UnaryCallable getServerConfigCallable() { + return getServerConfigCallable; + } + + @Override + public UnaryCallable getJSONWebKeysCallable() { + return getJSONWebKeysCallable; + } + + @Override + public UnaryCallable listNodePoolsCallable() { + return listNodePoolsCallable; + } + + @Override + public UnaryCallable getNodePoolCallable() { + return getNodePoolCallable; + } + + @Override + public UnaryCallable createNodePoolCallable() { + return createNodePoolCallable; + } + + @Override + public UnaryCallable deleteNodePoolCallable() { + return deleteNodePoolCallable; + } + + @Override + public UnaryCallable completeNodePoolUpgradeCallable() { + return completeNodePoolUpgradeCallable; + } + + @Override + public UnaryCallable + rollbackNodePoolUpgradeCallable() { + return rollbackNodePoolUpgradeCallable; + } + + @Override + public UnaryCallable setNodePoolManagementCallable() { + return setNodePoolManagementCallable; + } + + @Override + public UnaryCallable setLabelsCallable() { + return setLabelsCallable; + } + + @Override + public UnaryCallable setLegacyAbacCallable() { + return setLegacyAbacCallable; + } + + @Override + public UnaryCallable startIPRotationCallable() { + return startIPRotationCallable; + } + + @Override + public UnaryCallable completeIPRotationCallable() { + return completeIPRotationCallable; + } + + @Override + public UnaryCallable setNodePoolSizeCallable() { + return setNodePoolSizeCallable; + } + + @Override + public UnaryCallable setNetworkPolicyCallable() { + return setNetworkPolicyCallable; + } + + @Override + public UnaryCallable setMaintenancePolicyCallable() { + return setMaintenancePolicyCallable; + } + + @Override + public UnaryCallable + listUsableSubnetworksCallable() { + return listUsableSubnetworksCallable; + } + + @Override + public UnaryCallable + listUsableSubnetworksPagedCallable() { + return listUsableSubnetworksPagedCallable; + } + + @Override + public UnaryCallable + checkAutopilotCompatibilityCallable() { + return checkAutopilotCompatibilityCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-container/google-cloud-container/src/main/resources/META-INF/native-image/com.google.cloud.container.v1/reflect-config.json b/java-container/google-cloud-container/src/main/resources/META-INF/native-image/com.google.cloud.container.v1/reflect-config.json index 84e2f2358c88..c58c0959d821 100644 --- a/java-container/google-cloud-container/src/main/resources/META-INF/native-image/com.google.cloud.container.v1/reflect-config.json +++ b/java-container/google-cloud-container/src/main/resources/META-INF/native-image/com.google.cloud.container.v1/reflect-config.json @@ -935,6 +935,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.container.v1.ContainerdConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.container.v1.ContainerdConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.container.v1.ContainerdConfig$PrivateRegistryAccessConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.container.v1.ContainerdConfig$PrivateRegistryAccessConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.container.v1.ContainerdConfig$PrivateRegistryAccessConfig$CertificateAuthorityDomainConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.container.v1.ContainerdConfig$PrivateRegistryAccessConfig$CertificateAuthorityDomainConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.container.v1.ContainerdConfig$PrivateRegistryAccessConfig$CertificateAuthorityDomainConfig$GCPSecretManagerCertificateConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.container.v1.ContainerdConfig$PrivateRegistryAccessConfig$CertificateAuthorityDomainConfig$GCPSecretManagerCertificateConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.container.v1.CostManagementConfig", "queryAllDeclaredConstructors": true, @@ -1799,6 +1871,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.container.v1.LinuxNodeConfig$HugepagesConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.container.v1.LinuxNodeConfig$HugepagesConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.container.v1.ListClustersRequest", "queryAllDeclaredConstructors": true, diff --git a/java-container/google-cloud-container/src/test/java/com/google/cloud/container/v1/ClusterManagerClientHttpJsonTest.java b/java-container/google-cloud-container/src/test/java/com/google/cloud/container/v1/ClusterManagerClientHttpJsonTest.java new file mode 100644 index 000000000000..68187946c25b --- /dev/null +++ b/java-container/google-cloud-container/src/test/java/com/google/cloud/container/v1/ClusterManagerClientHttpJsonTest.java @@ -0,0 +1,3699 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.container.v1; + +import static com.google.cloud.container.v1.ClusterManagerClient.ListUsableSubnetworksPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.container.v1.stub.HttpJsonClusterManagerStub; +import com.google.common.collect.Lists; +import com.google.container.v1.AcceleratorConfig; +import com.google.container.v1.AddonsConfig; +import com.google.container.v1.AuthenticatorGroupsConfig; +import com.google.container.v1.Autopilot; +import com.google.container.v1.AutopilotCompatibilityIssue; +import com.google.container.v1.BestEffortProvisioning; +import com.google.container.v1.BinaryAuthorization; +import com.google.container.v1.CheckAutopilotCompatibilityRequest; +import com.google.container.v1.CheckAutopilotCompatibilityResponse; +import com.google.container.v1.Cluster; +import com.google.container.v1.ClusterAutoscaling; +import com.google.container.v1.ClusterUpdate; +import com.google.container.v1.CompleteNodePoolUpgradeRequest; +import com.google.container.v1.ConfidentialNodes; +import com.google.container.v1.ContainerdConfig; +import com.google.container.v1.CostManagementConfig; +import com.google.container.v1.DatabaseEncryption; +import com.google.container.v1.EnterpriseConfig; +import com.google.container.v1.FastSocket; +import com.google.container.v1.Fleet; +import com.google.container.v1.GcfsConfig; +import com.google.container.v1.GetJSONWebKeysRequest; +import com.google.container.v1.GetJSONWebKeysResponse; +import com.google.container.v1.IPAllocationPolicy; +import com.google.container.v1.IdentityServiceConfig; +import com.google.container.v1.Jwk; +import com.google.container.v1.K8sBetaAPIConfig; +import com.google.container.v1.LegacyAbac; +import com.google.container.v1.LinuxNodeConfig; +import com.google.container.v1.ListClustersResponse; +import com.google.container.v1.ListNodePoolsResponse; +import com.google.container.v1.ListOperationsResponse; +import com.google.container.v1.ListUsableSubnetworksRequest; +import com.google.container.v1.ListUsableSubnetworksResponse; +import com.google.container.v1.LoggingConfig; +import com.google.container.v1.MaintenancePolicy; +import com.google.container.v1.MasterAuth; +import com.google.container.v1.MasterAuthorizedNetworksConfig; +import com.google.container.v1.MaxPodsConstraint; +import com.google.container.v1.MeshCertificates; +import com.google.container.v1.MonitoringConfig; +import com.google.container.v1.NetworkConfig; +import com.google.container.v1.NetworkPolicy; +import com.google.container.v1.NetworkTags; +import com.google.container.v1.NodeConfig; +import com.google.container.v1.NodeKubeletConfig; +import com.google.container.v1.NodeLabels; +import com.google.container.v1.NodeManagement; +import com.google.container.v1.NodeNetworkConfig; +import com.google.container.v1.NodePool; +import com.google.container.v1.NodePoolAutoConfig; +import com.google.container.v1.NodePoolAutoscaling; +import com.google.container.v1.NodePoolDefaults; +import com.google.container.v1.NodePoolLoggingConfig; +import com.google.container.v1.NodeTaints; +import com.google.container.v1.NotificationConfig; +import com.google.container.v1.Operation; +import com.google.container.v1.OperationProgress; +import com.google.container.v1.PrivateClusterConfig; +import com.google.container.v1.ReleaseChannel; +import com.google.container.v1.ResourceLabels; +import com.google.container.v1.ResourceManagerTags; +import com.google.container.v1.ResourceUsageExportConfig; +import com.google.container.v1.SecurityPostureConfig; +import com.google.container.v1.ServerConfig; +import com.google.container.v1.SetLabelsRequest; +import com.google.container.v1.SetMasterAuthRequest; +import com.google.container.v1.SetNodePoolAutoscalingRequest; +import com.google.container.v1.SetNodePoolManagementRequest; +import com.google.container.v1.SetNodePoolSizeRequest; +import com.google.container.v1.ShieldedNodes; +import com.google.container.v1.StatusCondition; +import com.google.container.v1.UpdateNodePoolRequest; +import com.google.container.v1.UsableSubnetwork; +import com.google.container.v1.VerticalPodAutoscaling; +import com.google.container.v1.VirtualNIC; +import com.google.container.v1.WindowsNodeConfig; +import com.google.container.v1.WorkloadIdentityConfig; +import com.google.container.v1.WorkloadMetadataConfig; +import com.google.protobuf.Empty; +import com.google.rpc.Status; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ClusterManagerClientHttpJsonTest { + private static MockHttpService mockService; + private static ClusterManagerClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonClusterManagerStub.getMethodDescriptors(), + ClusterManagerSettings.getDefaultEndpoint()); + ClusterManagerSettings settings = + ClusterManagerSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ClusterManagerSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ClusterManagerClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listClustersTest() throws Exception { + ListClustersResponse expectedResponse = + ListClustersResponse.newBuilder() + .addAllClusters(new ArrayList()) + .addAllMissingZones(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListClustersResponse actualResponse = client.listClusters(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listClustersExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listClustersTest2() throws Exception { + ListClustersResponse expectedResponse = + ListClustersResponse.newBuilder() + .addAllClusters(new ArrayList()) + .addAllMissingZones(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + + ListClustersResponse actualResponse = client.listClusters(projectId, zone); + 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 listClustersExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + client.listClusters(projectId, zone); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName("name3373707") + .setDescription("description-1724546052") + .setInitialNodeCount(1682564205) + .setNodeConfig(NodeConfig.newBuilder().build()) + .setMasterAuth(MasterAuth.newBuilder().build()) + .setLoggingService("loggingService1098570326") + .setMonitoringService("monitoringService-1431578291") + .setNetwork("network1843485230") + .setClusterIpv4Cidr("clusterIpv4Cidr-277423341") + .setAddonsConfig(AddonsConfig.newBuilder().build()) + .setSubnetwork("subnetwork-1302785042") + .addAllNodePools(new ArrayList()) + .addAllLocations(new ArrayList()) + .setEnableKubernetesAlpha(true) + .putAllResourceLabels(new HashMap()) + .setLabelFingerprint("labelFingerprint379449680") + .setLegacyAbac(LegacyAbac.newBuilder().build()) + .setNetworkPolicy(NetworkPolicy.newBuilder().build()) + .setIpAllocationPolicy(IPAllocationPolicy.newBuilder().build()) + .setMasterAuthorizedNetworksConfig(MasterAuthorizedNetworksConfig.newBuilder().build()) + .setMaintenancePolicy(MaintenancePolicy.newBuilder().build()) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setAutoscaling(ClusterAutoscaling.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setDefaultMaxPodsConstraint(MaxPodsConstraint.newBuilder().build()) + .setResourceUsageExportConfig(ResourceUsageExportConfig.newBuilder().build()) + .setAuthenticatorGroupsConfig(AuthenticatorGroupsConfig.newBuilder().build()) + .setPrivateClusterConfig(PrivateClusterConfig.newBuilder().build()) + .setDatabaseEncryption(DatabaseEncryption.newBuilder().build()) + .setVerticalPodAutoscaling(VerticalPodAutoscaling.newBuilder().build()) + .setShieldedNodes(ShieldedNodes.newBuilder().build()) + .setReleaseChannel(ReleaseChannel.newBuilder().build()) + .setWorkloadIdentityConfig(WorkloadIdentityConfig.newBuilder().build()) + .setMeshCertificates(MeshCertificates.newBuilder().build()) + .setCostManagementConfig(CostManagementConfig.newBuilder().build()) + .setNotificationConfig(NotificationConfig.newBuilder().build()) + .setConfidentialNodes(ConfidentialNodes.newBuilder().build()) + .setIdentityServiceConfig(IdentityServiceConfig.newBuilder().build()) + .setSelfLink("selfLink1191800166") + .setZone("zone3744684") + .setEndpoint("endpoint1741102485") + .setInitialClusterVersion("initialClusterVersion-1547734558") + .setCurrentMasterVersion("currentMasterVersion1871927069") + .setCurrentNodeVersion("currentNodeVersion373921085") + .setCreateTime("createTime1369213417") + .setStatusMessage("statusMessage-958704715") + .setNodeIpv4CidrSize(1181176815) + .setServicesIpv4Cidr("servicesIpv4Cidr-1785842313") + .addAllInstanceGroupUrls(new ArrayList()) + .setCurrentNodeCount(178977560) + .setExpireTime("expireTime-834724724") + .setLocation("location1901043637") + .setEnableTpu(true) + .setTpuIpv4CidrBlock("tpuIpv4CidrBlock997172251") + .addAllConditions(new ArrayList()) + .setAutopilot(Autopilot.newBuilder().build()) + .setId("id3355") + .setNodePoolDefaults(NodePoolDefaults.newBuilder().build()) + .setLoggingConfig(LoggingConfig.newBuilder().build()) + .setMonitoringConfig(MonitoringConfig.newBuilder().build()) + .setNodePoolAutoConfig(NodePoolAutoConfig.newBuilder().build()) + .setEtag("etag3123477") + .setFleet(Fleet.newBuilder().build()) + .setSecurityPostureConfig(SecurityPostureConfig.newBuilder().build()) + .setEnableK8SBetaApis(K8sBetaAPIConfig.newBuilder().build()) + .setEnterpriseConfig(EnterpriseConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + + Cluster actualResponse = client.getCluster(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 getClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + client.getCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterTest2() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName("name3373707") + .setDescription("description-1724546052") + .setInitialNodeCount(1682564205) + .setNodeConfig(NodeConfig.newBuilder().build()) + .setMasterAuth(MasterAuth.newBuilder().build()) + .setLoggingService("loggingService1098570326") + .setMonitoringService("monitoringService-1431578291") + .setNetwork("network1843485230") + .setClusterIpv4Cidr("clusterIpv4Cidr-277423341") + .setAddonsConfig(AddonsConfig.newBuilder().build()) + .setSubnetwork("subnetwork-1302785042") + .addAllNodePools(new ArrayList()) + .addAllLocations(new ArrayList()) + .setEnableKubernetesAlpha(true) + .putAllResourceLabels(new HashMap()) + .setLabelFingerprint("labelFingerprint379449680") + .setLegacyAbac(LegacyAbac.newBuilder().build()) + .setNetworkPolicy(NetworkPolicy.newBuilder().build()) + .setIpAllocationPolicy(IPAllocationPolicy.newBuilder().build()) + .setMasterAuthorizedNetworksConfig(MasterAuthorizedNetworksConfig.newBuilder().build()) + .setMaintenancePolicy(MaintenancePolicy.newBuilder().build()) + .setBinaryAuthorization(BinaryAuthorization.newBuilder().build()) + .setAutoscaling(ClusterAutoscaling.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setDefaultMaxPodsConstraint(MaxPodsConstraint.newBuilder().build()) + .setResourceUsageExportConfig(ResourceUsageExportConfig.newBuilder().build()) + .setAuthenticatorGroupsConfig(AuthenticatorGroupsConfig.newBuilder().build()) + .setPrivateClusterConfig(PrivateClusterConfig.newBuilder().build()) + .setDatabaseEncryption(DatabaseEncryption.newBuilder().build()) + .setVerticalPodAutoscaling(VerticalPodAutoscaling.newBuilder().build()) + .setShieldedNodes(ShieldedNodes.newBuilder().build()) + .setReleaseChannel(ReleaseChannel.newBuilder().build()) + .setWorkloadIdentityConfig(WorkloadIdentityConfig.newBuilder().build()) + .setMeshCertificates(MeshCertificates.newBuilder().build()) + .setCostManagementConfig(CostManagementConfig.newBuilder().build()) + .setNotificationConfig(NotificationConfig.newBuilder().build()) + .setConfidentialNodes(ConfidentialNodes.newBuilder().build()) + .setIdentityServiceConfig(IdentityServiceConfig.newBuilder().build()) + .setSelfLink("selfLink1191800166") + .setZone("zone3744684") + .setEndpoint("endpoint1741102485") + .setInitialClusterVersion("initialClusterVersion-1547734558") + .setCurrentMasterVersion("currentMasterVersion1871927069") + .setCurrentNodeVersion("currentNodeVersion373921085") + .setCreateTime("createTime1369213417") + .setStatusMessage("statusMessage-958704715") + .setNodeIpv4CidrSize(1181176815) + .setServicesIpv4Cidr("servicesIpv4Cidr-1785842313") + .addAllInstanceGroupUrls(new ArrayList()) + .setCurrentNodeCount(178977560) + .setExpireTime("expireTime-834724724") + .setLocation("location1901043637") + .setEnableTpu(true) + .setTpuIpv4CidrBlock("tpuIpv4CidrBlock997172251") + .addAllConditions(new ArrayList()) + .setAutopilot(Autopilot.newBuilder().build()) + .setId("id3355") + .setNodePoolDefaults(NodePoolDefaults.newBuilder().build()) + .setLoggingConfig(LoggingConfig.newBuilder().build()) + .setMonitoringConfig(MonitoringConfig.newBuilder().build()) + .setNodePoolAutoConfig(NodePoolAutoConfig.newBuilder().build()) + .setEtag("etag3123477") + .setFleet(Fleet.newBuilder().build()) + .setSecurityPostureConfig(SecurityPostureConfig.newBuilder().build()) + .setEnableK8SBetaApis(K8sBetaAPIConfig.newBuilder().build()) + .setEnterpriseConfig(EnterpriseConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + + Cluster actualResponse = client.getCluster(projectId, zone, clusterId); + 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 getClusterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + client.getCluster(projectId, zone, clusterId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createClusterTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + Cluster cluster = Cluster.newBuilder().build(); + + Operation actualResponse = client.createCluster(parent, cluster); + 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 createClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Cluster cluster = Cluster.newBuilder().build(); + client.createCluster(parent, cluster); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createClusterTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + Cluster cluster = Cluster.newBuilder().build(); + + Operation actualResponse = client.createCluster(projectId, zone, cluster); + 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 createClusterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + Cluster cluster = Cluster.newBuilder().build(); + client.createCluster(projectId, zone, cluster); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateClusterTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + ClusterUpdate update = ClusterUpdate.newBuilder().build(); + + Operation actualResponse = client.updateCluster(name, update); + 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 updateClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + ClusterUpdate update = ClusterUpdate.newBuilder().build(); + client.updateCluster(name, update); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateClusterTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + ClusterUpdate update = ClusterUpdate.newBuilder().build(); + + Operation actualResponse = client.updateCluster(projectId, zone, clusterId, update); + 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 updateClusterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + ClusterUpdate update = ClusterUpdate.newBuilder().build(); + client.updateCluster(projectId, zone, clusterId, update); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateNodePoolTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + UpdateNodePoolRequest request = + UpdateNodePoolRequest.newBuilder() + .setProjectId("projectId-894832108") + .setZone("zone3744684") + .setClusterId("clusterId561939637") + .setNodePoolId("nodePoolId1121557241") + .setNodeVersion("nodeVersion1155309686") + .setImageType("imageType-878147787") + .setName( + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330") + .addAllLocations(new ArrayList()) + .setWorkloadMetadataConfig(WorkloadMetadataConfig.newBuilder().build()) + .setUpgradeSettings(NodePool.UpgradeSettings.newBuilder().build()) + .setTags(NetworkTags.newBuilder().build()) + .setTaints(NodeTaints.newBuilder().build()) + .setLabels(NodeLabels.newBuilder().build()) + .setLinuxNodeConfig(LinuxNodeConfig.newBuilder().build()) + .setKubeletConfig(NodeKubeletConfig.newBuilder().build()) + .setNodeNetworkConfig(NodeNetworkConfig.newBuilder().build()) + .setGcfsConfig(GcfsConfig.newBuilder().build()) + .setConfidentialNodes(ConfidentialNodes.newBuilder().build()) + .setGvnic(VirtualNIC.newBuilder().build()) + .setEtag("etag3123477") + .setFastSocket(FastSocket.newBuilder().build()) + .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build()) + .setResourceLabels(ResourceLabels.newBuilder().build()) + .setWindowsNodeConfig(WindowsNodeConfig.newBuilder().build()) + .addAllAccelerators(new ArrayList()) + .setMachineType("machineType-218117087") + .setDiskType("diskType279771767") + .setDiskSizeGb(-757478089) + .setResourceManagerTags(ResourceManagerTags.newBuilder().build()) + .setContainerdConfig(ContainerdConfig.newBuilder().build()) + .setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build()) + .build(); + + Operation actualResponse = client.updateNodePool(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 updateNodePoolExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UpdateNodePoolRequest request = + UpdateNodePoolRequest.newBuilder() + .setProjectId("projectId-894832108") + .setZone("zone3744684") + .setClusterId("clusterId561939637") + .setNodePoolId("nodePoolId1121557241") + .setNodeVersion("nodeVersion1155309686") + .setImageType("imageType-878147787") + .setName( + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330") + .addAllLocations(new ArrayList()) + .setWorkloadMetadataConfig(WorkloadMetadataConfig.newBuilder().build()) + .setUpgradeSettings(NodePool.UpgradeSettings.newBuilder().build()) + .setTags(NetworkTags.newBuilder().build()) + .setTaints(NodeTaints.newBuilder().build()) + .setLabels(NodeLabels.newBuilder().build()) + .setLinuxNodeConfig(LinuxNodeConfig.newBuilder().build()) + .setKubeletConfig(NodeKubeletConfig.newBuilder().build()) + .setNodeNetworkConfig(NodeNetworkConfig.newBuilder().build()) + .setGcfsConfig(GcfsConfig.newBuilder().build()) + .setConfidentialNodes(ConfidentialNodes.newBuilder().build()) + .setGvnic(VirtualNIC.newBuilder().build()) + .setEtag("etag3123477") + .setFastSocket(FastSocket.newBuilder().build()) + .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build()) + .setResourceLabels(ResourceLabels.newBuilder().build()) + .setWindowsNodeConfig(WindowsNodeConfig.newBuilder().build()) + .addAllAccelerators(new ArrayList()) + .setMachineType("machineType-218117087") + .setDiskType("diskType279771767") + .setDiskSizeGb(-757478089) + .setResourceManagerTags(ResourceManagerTags.newBuilder().build()) + .setContainerdConfig(ContainerdConfig.newBuilder().build()) + .setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build()) + .build(); + client.updateNodePool(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setNodePoolAutoscalingTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + SetNodePoolAutoscalingRequest request = + SetNodePoolAutoscalingRequest.newBuilder() + .setProjectId("projectId-894832108") + .setZone("zone3744684") + .setClusterId("clusterId561939637") + .setNodePoolId("nodePoolId1121557241") + .setAutoscaling(NodePoolAutoscaling.newBuilder().build()) + .setName( + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330") + .build(); + + Operation actualResponse = client.setNodePoolAutoscaling(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 setNodePoolAutoscalingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetNodePoolAutoscalingRequest request = + SetNodePoolAutoscalingRequest.newBuilder() + .setProjectId("projectId-894832108") + .setZone("zone3744684") + .setClusterId("clusterId561939637") + .setNodePoolId("nodePoolId1121557241") + .setAutoscaling(NodePoolAutoscaling.newBuilder().build()) + .setName( + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330") + .build(); + client.setNodePoolAutoscaling(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setLoggingServiceTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + String loggingService = "loggingService1098570326"; + + Operation actualResponse = client.setLoggingService(name, loggingService); + 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 setLoggingServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + String loggingService = "loggingService1098570326"; + client.setLoggingService(name, loggingService); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setLoggingServiceTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + String loggingService = "loggingService1098570326"; + + Operation actualResponse = client.setLoggingService(projectId, zone, clusterId, loggingService); + 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 setLoggingServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + String loggingService = "loggingService1098570326"; + client.setLoggingService(projectId, zone, clusterId, loggingService); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setMonitoringServiceTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + String monitoringService = "monitoringService-1431578291"; + + Operation actualResponse = client.setMonitoringService(name, monitoringService); + 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 setMonitoringServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + String monitoringService = "monitoringService-1431578291"; + client.setMonitoringService(name, monitoringService); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setMonitoringServiceTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + String monitoringService = "monitoringService-1431578291"; + + Operation actualResponse = + client.setMonitoringService(projectId, zone, clusterId, monitoringService); + 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 setMonitoringServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + String monitoringService = "monitoringService-1431578291"; + client.setMonitoringService(projectId, zone, clusterId, monitoringService); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setAddonsConfigTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + AddonsConfig addonsConfig = AddonsConfig.newBuilder().build(); + + Operation actualResponse = client.setAddonsConfig(name, addonsConfig); + 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 setAddonsConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + AddonsConfig addonsConfig = AddonsConfig.newBuilder().build(); + client.setAddonsConfig(name, addonsConfig); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setAddonsConfigTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + AddonsConfig addonsConfig = AddonsConfig.newBuilder().build(); + + Operation actualResponse = client.setAddonsConfig(projectId, zone, clusterId, addonsConfig); + 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 setAddonsConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + AddonsConfig addonsConfig = AddonsConfig.newBuilder().build(); + client.setAddonsConfig(projectId, zone, clusterId, addonsConfig); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setLocationsTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + List locations = new ArrayList<>(); + + Operation actualResponse = client.setLocations(name, locations); + 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 setLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + List locations = new ArrayList<>(); + client.setLocations(name, locations); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setLocationsTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + List locations = new ArrayList<>(); + + Operation actualResponse = client.setLocations(projectId, zone, clusterId, locations); + 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 setLocationsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + List locations = new ArrayList<>(); + client.setLocations(projectId, zone, clusterId, locations); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateMasterTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + String masterVersion = "masterVersion1167095830"; + + Operation actualResponse = client.updateMaster(name, masterVersion); + 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 updateMasterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + String masterVersion = "masterVersion1167095830"; + client.updateMaster(name, masterVersion); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateMasterTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + String masterVersion = "masterVersion1167095830"; + + Operation actualResponse = client.updateMaster(projectId, zone, clusterId, masterVersion); + 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 updateMasterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + String masterVersion = "masterVersion1167095830"; + client.updateMaster(projectId, zone, clusterId, masterVersion); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setMasterAuthTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + SetMasterAuthRequest request = + SetMasterAuthRequest.newBuilder() + .setProjectId("projectId-894832108") + .setZone("zone3744684") + .setClusterId("clusterId561939637") + .setUpdate(MasterAuth.newBuilder().build()) + .setName("projects/project-6537/locations/location-6537/clusters/cluster-6537") + .build(); + + Operation actualResponse = client.setMasterAuth(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 setMasterAuthExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetMasterAuthRequest request = + SetMasterAuthRequest.newBuilder() + .setProjectId("projectId-894832108") + .setZone("zone3744684") + .setClusterId("clusterId561939637") + .setUpdate(MasterAuth.newBuilder().build()) + .setName("projects/project-6537/locations/location-6537/clusters/cluster-6537") + .build(); + client.setMasterAuth(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteClusterTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + + Operation actualResponse = client.deleteCluster(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 deleteClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + client.deleteCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteClusterTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + + Operation actualResponse = client.deleteCluster(projectId, zone, clusterId); + 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 deleteClusterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + client.deleteCluster(projectId, zone, clusterId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOperationsTest() throws Exception { + ListOperationsResponse expectedResponse = + ListOperationsResponse.newBuilder() + .addAllOperations(new ArrayList()) + .addAllMissingZones(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListOperationsResponse actualResponse = client.listOperations(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listOperationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listOperations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOperationsTest2() throws Exception { + ListOperationsResponse expectedResponse = + ListOperationsResponse.newBuilder() + .addAllOperations(new ArrayList()) + .addAllMissingZones(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + + ListOperationsResponse actualResponse = client.listOperations(projectId, zone); + 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 listOperationsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + client.listOperations(projectId, zone); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOperationTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-5676/locations/location-5676/operations/operation-5676"; + + Operation actualResponse = client.getOperation(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 getOperationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-5676/locations/location-5676/operations/operation-5676"; + client.getOperation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOperationTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String operationId = "operationId129704162"; + + Operation actualResponse = client.getOperation(projectId, zone, operationId); + 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 getOperationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String operationId = "operationId129704162"; + client.getOperation(projectId, zone, operationId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelOperationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-5676/locations/location-5676/operations/operation-5676"; + + client.cancelOperation(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 cancelOperationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-5676/locations/location-5676/operations/operation-5676"; + client.cancelOperation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelOperationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String operationId = "operationId129704162"; + + client.cancelOperation(projectId, zone, operationId); + + 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 cancelOperationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String operationId = "operationId129704162"; + client.cancelOperation(projectId, zone, operationId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServerConfigTest() throws Exception { + ServerConfig expectedResponse = + ServerConfig.newBuilder() + .setDefaultClusterVersion("defaultClusterVersion-2007666145") + .addAllValidNodeVersions(new ArrayList()) + .setDefaultImageType("defaultImageType933054964") + .addAllValidImageTypes(new ArrayList()) + .addAllValidMasterVersions(new ArrayList()) + .addAllChannels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-9062/locations/location-9062"; + + ServerConfig actualResponse = client.getServerConfig(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 getServerConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9062/locations/location-9062"; + client.getServerConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServerConfigTest2() throws Exception { + ServerConfig expectedResponse = + ServerConfig.newBuilder() + .setDefaultClusterVersion("defaultClusterVersion-2007666145") + .addAllValidNodeVersions(new ArrayList()) + .setDefaultImageType("defaultImageType933054964") + .addAllValidImageTypes(new ArrayList()) + .addAllValidMasterVersions(new ArrayList()) + .addAllChannels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + + ServerConfig actualResponse = client.getServerConfig(projectId, zone); + 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 getServerConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + client.getServerConfig(projectId, zone); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getJSONWebKeysTest() throws Exception { + GetJSONWebKeysResponse expectedResponse = + GetJSONWebKeysResponse.newBuilder().addAllKeys(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + GetJSONWebKeysRequest request = + GetJSONWebKeysRequest.newBuilder() + .setParent("projects/project-9466/locations/location-9466/clusters/cluster-9466") + .build(); + + GetJSONWebKeysResponse actualResponse = client.getJSONWebKeys(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 getJSONWebKeysExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetJSONWebKeysRequest request = + GetJSONWebKeysRequest.newBuilder() + .setParent("projects/project-9466/locations/location-9466/clusters/cluster-9466") + .build(); + client.getJSONWebKeys(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNodePoolsTest() throws Exception { + ListNodePoolsResponse expectedResponse = + ListNodePoolsResponse.newBuilder().addAllNodePools(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + + ListNodePoolsResponse actualResponse = client.listNodePools(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listNodePoolsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + client.listNodePools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNodePoolsTest2() throws Exception { + ListNodePoolsResponse expectedResponse = + ListNodePoolsResponse.newBuilder().addAllNodePools(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + + ListNodePoolsResponse actualResponse = client.listNodePools(projectId, zone, clusterId); + 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 listNodePoolsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + client.listNodePools(projectId, zone, clusterId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNodePoolTest() throws Exception { + NodePool expectedResponse = + NodePool.newBuilder() + .setName("name3373707") + .setConfig(NodeConfig.newBuilder().build()) + .setInitialNodeCount(1682564205) + .addAllLocations(new ArrayList()) + .setNetworkConfig(NodeNetworkConfig.newBuilder().build()) + .setSelfLink("selfLink1191800166") + .setVersion("version351608024") + .addAllInstanceGroupUrls(new ArrayList()) + .setStatusMessage("statusMessage-958704715") + .setAutoscaling(NodePoolAutoscaling.newBuilder().build()) + .setManagement(NodeManagement.newBuilder().build()) + .setMaxPodsConstraint(MaxPodsConstraint.newBuilder().build()) + .addAllConditions(new ArrayList()) + .setPodIpv4CidrSize(1098768716) + .setUpgradeSettings(NodePool.UpgradeSettings.newBuilder().build()) + .setPlacementPolicy(NodePool.PlacementPolicy.newBuilder().build()) + .setUpdateInfo(NodePool.UpdateInfo.newBuilder().build()) + .setEtag("etag3123477") + .setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build()) + .setBestEffortProvisioning(BestEffortProvisioning.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330"; + + NodePool actualResponse = client.getNodePool(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 getNodePoolExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330"; + client.getNodePool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNodePoolTest2() throws Exception { + NodePool expectedResponse = + NodePool.newBuilder() + .setName("name3373707") + .setConfig(NodeConfig.newBuilder().build()) + .setInitialNodeCount(1682564205) + .addAllLocations(new ArrayList()) + .setNetworkConfig(NodeNetworkConfig.newBuilder().build()) + .setSelfLink("selfLink1191800166") + .setVersion("version351608024") + .addAllInstanceGroupUrls(new ArrayList()) + .setStatusMessage("statusMessage-958704715") + .setAutoscaling(NodePoolAutoscaling.newBuilder().build()) + .setManagement(NodeManagement.newBuilder().build()) + .setMaxPodsConstraint(MaxPodsConstraint.newBuilder().build()) + .addAllConditions(new ArrayList()) + .setPodIpv4CidrSize(1098768716) + .setUpgradeSettings(NodePool.UpgradeSettings.newBuilder().build()) + .setPlacementPolicy(NodePool.PlacementPolicy.newBuilder().build()) + .setUpdateInfo(NodePool.UpdateInfo.newBuilder().build()) + .setEtag("etag3123477") + .setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build()) + .setBestEffortProvisioning(BestEffortProvisioning.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + String nodePoolId = "nodePoolId1121557241"; + + NodePool actualResponse = client.getNodePool(projectId, zone, clusterId, nodePoolId); + 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 getNodePoolExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + String nodePoolId = "nodePoolId1121557241"; + client.getNodePool(projectId, zone, clusterId, nodePoolId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNodePoolTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + NodePool nodePool = NodePool.newBuilder().build(); + + Operation actualResponse = client.createNodePool(parent, nodePool); + 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 createNodePoolExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + NodePool nodePool = NodePool.newBuilder().build(); + client.createNodePool(parent, nodePool); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNodePoolTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + NodePool nodePool = NodePool.newBuilder().build(); + + Operation actualResponse = client.createNodePool(projectId, zone, clusterId, nodePool); + 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 createNodePoolExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + NodePool nodePool = NodePool.newBuilder().build(); + client.createNodePool(projectId, zone, clusterId, nodePool); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteNodePoolTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330"; + + Operation actualResponse = client.deleteNodePool(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 deleteNodePoolExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330"; + client.deleteNodePool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteNodePoolTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + String nodePoolId = "nodePoolId1121557241"; + + Operation actualResponse = client.deleteNodePool(projectId, zone, clusterId, nodePoolId); + 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 deleteNodePoolExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + String nodePoolId = "nodePoolId1121557241"; + client.deleteNodePool(projectId, zone, clusterId, nodePoolId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void completeNodePoolUpgradeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + CompleteNodePoolUpgradeRequest request = + CompleteNodePoolUpgradeRequest.newBuilder() + .setName( + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330") + .build(); + + client.completeNodePoolUpgrade(request); + + 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 completeNodePoolUpgradeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CompleteNodePoolUpgradeRequest request = + CompleteNodePoolUpgradeRequest.newBuilder() + .setName( + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330") + .build(); + client.completeNodePoolUpgrade(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void rollbackNodePoolUpgradeTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330"; + + Operation actualResponse = client.rollbackNodePoolUpgrade(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 rollbackNodePoolUpgradeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330"; + client.rollbackNodePoolUpgrade(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void rollbackNodePoolUpgradeTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + String nodePoolId = "nodePoolId1121557241"; + + Operation actualResponse = + client.rollbackNodePoolUpgrade(projectId, zone, clusterId, nodePoolId); + 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 rollbackNodePoolUpgradeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + String nodePoolId = "nodePoolId1121557241"; + client.rollbackNodePoolUpgrade(projectId, zone, clusterId, nodePoolId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setNodePoolManagementTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + SetNodePoolManagementRequest request = + SetNodePoolManagementRequest.newBuilder() + .setProjectId("projectId-894832108") + .setZone("zone3744684") + .setClusterId("clusterId561939637") + .setNodePoolId("nodePoolId1121557241") + .setManagement(NodeManagement.newBuilder().build()) + .setName( + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330") + .build(); + + Operation actualResponse = client.setNodePoolManagement(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 setNodePoolManagementExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetNodePoolManagementRequest request = + SetNodePoolManagementRequest.newBuilder() + .setProjectId("projectId-894832108") + .setZone("zone3744684") + .setClusterId("clusterId561939637") + .setNodePoolId("nodePoolId1121557241") + .setManagement(NodeManagement.newBuilder().build()) + .setName( + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330") + .build(); + client.setNodePoolManagement(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setLabelsTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + SetLabelsRequest request = + SetLabelsRequest.newBuilder() + .setProjectId("projectId-894832108") + .setZone("zone3744684") + .setClusterId("clusterId561939637") + .putAllResourceLabels(new HashMap()) + .setLabelFingerprint("labelFingerprint379449680") + .setName("projects/project-6537/locations/location-6537/clusters/cluster-6537") + .build(); + + Operation actualResponse = client.setLabels(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 setLabelsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetLabelsRequest request = + SetLabelsRequest.newBuilder() + .setProjectId("projectId-894832108") + .setZone("zone3744684") + .setClusterId("clusterId561939637") + .putAllResourceLabels(new HashMap()) + .setLabelFingerprint("labelFingerprint379449680") + .setName("projects/project-6537/locations/location-6537/clusters/cluster-6537") + .build(); + client.setLabels(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setLegacyAbacTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + boolean enabled = true; + + Operation actualResponse = client.setLegacyAbac(name, enabled); + 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 setLegacyAbacExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + boolean enabled = true; + client.setLegacyAbac(name, enabled); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setLegacyAbacTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + boolean enabled = true; + + Operation actualResponse = client.setLegacyAbac(projectId, zone, clusterId, enabled); + 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 setLegacyAbacExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + boolean enabled = true; + client.setLegacyAbac(projectId, zone, clusterId, enabled); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void startIPRotationTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + + Operation actualResponse = client.startIPRotation(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 startIPRotationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + client.startIPRotation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void startIPRotationTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + + Operation actualResponse = client.startIPRotation(projectId, zone, clusterId); + 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 startIPRotationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + client.startIPRotation(projectId, zone, clusterId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void completeIPRotationTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + + Operation actualResponse = client.completeIPRotation(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 completeIPRotationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + client.completeIPRotation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void completeIPRotationTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + + Operation actualResponse = client.completeIPRotation(projectId, zone, clusterId); + 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 completeIPRotationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + client.completeIPRotation(projectId, zone, clusterId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setNodePoolSizeTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + SetNodePoolSizeRequest request = + SetNodePoolSizeRequest.newBuilder() + .setProjectId("projectId-894832108") + .setZone("zone3744684") + .setClusterId("clusterId561939637") + .setNodePoolId("nodePoolId1121557241") + .setNodeCount(1539922066) + .setName( + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330") + .build(); + + Operation actualResponse = client.setNodePoolSize(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 setNodePoolSizeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetNodePoolSizeRequest request = + SetNodePoolSizeRequest.newBuilder() + .setProjectId("projectId-894832108") + .setZone("zone3744684") + .setClusterId("clusterId561939637") + .setNodePoolId("nodePoolId1121557241") + .setNodeCount(1539922066) + .setName( + "projects/project-6330/locations/location-6330/clusters/cluster-6330/nodePools/nodePool-6330") + .build(); + client.setNodePoolSize(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setNetworkPolicyTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + NetworkPolicy networkPolicy = NetworkPolicy.newBuilder().build(); + + Operation actualResponse = client.setNetworkPolicy(name, networkPolicy); + 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 setNetworkPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + NetworkPolicy networkPolicy = NetworkPolicy.newBuilder().build(); + client.setNetworkPolicy(name, networkPolicy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setNetworkPolicyTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + NetworkPolicy networkPolicy = NetworkPolicy.newBuilder().build(); + + Operation actualResponse = client.setNetworkPolicy(projectId, zone, clusterId, networkPolicy); + 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 setNetworkPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + NetworkPolicy networkPolicy = NetworkPolicy.newBuilder().build(); + client.setNetworkPolicy(projectId, zone, clusterId, networkPolicy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setMaintenancePolicyTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + MaintenancePolicy maintenancePolicy = MaintenancePolicy.newBuilder().build(); + + Operation actualResponse = client.setMaintenancePolicy(name, maintenancePolicy); + 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 setMaintenancePolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + MaintenancePolicy maintenancePolicy = MaintenancePolicy.newBuilder().build(); + client.setMaintenancePolicy(name, maintenancePolicy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setMaintenancePolicyTest2() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setName("name3373707") + .setZone("zone3744684") + .setDetail("detail-1335224239") + .setStatusMessage("statusMessage-958704715") + .setSelfLink("selfLink1191800166") + .setTargetLink("targetLink486368555") + .setLocation("location1901043637") + .setStartTime("startTime-2129294769") + .setEndTime("endTime-1607243192") + .setProgress(OperationProgress.newBuilder().build()) + .addAllClusterConditions(new ArrayList()) + .addAllNodepoolConditions(new ArrayList()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + MaintenancePolicy maintenancePolicy = MaintenancePolicy.newBuilder().build(); + + Operation actualResponse = + client.setMaintenancePolicy(projectId, zone, clusterId, maintenancePolicy); + 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 setMaintenancePolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String projectId = "projectId-894832108"; + String zone = "zone3744684"; + String clusterId = "clusterId561939637"; + MaintenancePolicy maintenancePolicy = MaintenancePolicy.newBuilder().build(); + client.setMaintenancePolicy(projectId, zone, clusterId, maintenancePolicy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUsableSubnetworksTest() throws Exception { + UsableSubnetwork responsesElement = UsableSubnetwork.newBuilder().build(); + ListUsableSubnetworksResponse expectedResponse = + ListUsableSubnetworksResponse.newBuilder() + .setNextPageToken("") + .addAllSubnetworks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListUsableSubnetworksRequest request = + ListUsableSubnetworksRequest.newBuilder() + .setParent("projects/project-2353") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListUsableSubnetworksPagedResponse pagedListResponse = client.listUsableSubnetworks(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSubnetworksList().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 listUsableSubnetworksExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListUsableSubnetworksRequest request = + ListUsableSubnetworksRequest.newBuilder() + .setParent("projects/project-2353") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listUsableSubnetworks(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void checkAutopilotCompatibilityTest() throws Exception { + CheckAutopilotCompatibilityResponse expectedResponse = + CheckAutopilotCompatibilityResponse.newBuilder() + .addAllIssues(new ArrayList()) + .setSummary("summary-1857640538") + .build(); + mockService.addResponse(expectedResponse); + + CheckAutopilotCompatibilityRequest request = + CheckAutopilotCompatibilityRequest.newBuilder() + .setName("projects/project-6537/locations/location-6537/clusters/cluster-6537") + .build(); + + CheckAutopilotCompatibilityResponse actualResponse = + client.checkAutopilotCompatibility(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 checkAutopilotCompatibilityExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CheckAutopilotCompatibilityRequest request = + CheckAutopilotCompatibilityRequest.newBuilder() + .setName("projects/project-6537/locations/location-6537/clusters/cluster-6537") + .build(); + client.checkAutopilotCompatibility(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-container/google-cloud-container/src/test/java/com/google/cloud/container/v1/ClusterManagerClientTest.java b/java-container/google-cloud-container/src/test/java/com/google/cloud/container/v1/ClusterManagerClientTest.java index 25e862f14f57..681f583c56c7 100644 --- a/java-container/google-cloud-container/src/test/java/com/google/cloud/container/v1/ClusterManagerClientTest.java +++ b/java-container/google-cloud-container/src/test/java/com/google/cloud/container/v1/ClusterManagerClientTest.java @@ -26,6 +26,7 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; import com.google.common.collect.Lists; +import com.google.container.v1.AcceleratorConfig; import com.google.container.v1.AddonsConfig; import com.google.container.v1.AuthenticatorGroupsConfig; import com.google.container.v1.Autopilot; @@ -41,6 +42,7 @@ import com.google.container.v1.CompleteIPRotationRequest; import com.google.container.v1.CompleteNodePoolUpgradeRequest; import com.google.container.v1.ConfidentialNodes; +import com.google.container.v1.ContainerdConfig; import com.google.container.v1.CostManagementConfig; import com.google.container.v1.CreateClusterRequest; import com.google.container.v1.CreateNodePoolRequest; @@ -334,6 +336,8 @@ public void getClusterTest() throws Exception { .setSecurityPostureConfig(SecurityPostureConfig.newBuilder().build()) .setEnableK8SBetaApis(K8sBetaAPIConfig.newBuilder().build()) .setEnterpriseConfig(EnterpriseConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) .build(); mockClusterManager.addResponse(expectedResponse); @@ -437,6 +441,8 @@ public void getClusterTest2() throws Exception { .setSecurityPostureConfig(SecurityPostureConfig.newBuilder().build()) .setEnableK8SBetaApis(K8sBetaAPIConfig.newBuilder().build()) .setEnterpriseConfig(EnterpriseConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) .build(); mockClusterManager.addResponse(expectedResponse); @@ -743,10 +749,12 @@ public void updateNodePoolTest() throws Exception { .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build()) .setResourceLabels(ResourceLabels.newBuilder().build()) .setWindowsNodeConfig(WindowsNodeConfig.newBuilder().build()) + .addAllAccelerators(new ArrayList()) .setMachineType("machineType-218117087") .setDiskType("diskType279771767") .setDiskSizeGb(-757478089) .setResourceManagerTags(ResourceManagerTags.newBuilder().build()) + .setContainerdConfig(ContainerdConfig.newBuilder().build()) .setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build()) .build(); @@ -782,10 +790,12 @@ public void updateNodePoolTest() throws Exception { Assert.assertEquals(request.getLoggingConfig(), actualRequest.getLoggingConfig()); Assert.assertEquals(request.getResourceLabels(), actualRequest.getResourceLabels()); Assert.assertEquals(request.getWindowsNodeConfig(), actualRequest.getWindowsNodeConfig()); + Assert.assertEquals(request.getAcceleratorsList(), actualRequest.getAcceleratorsList()); Assert.assertEquals(request.getMachineType(), actualRequest.getMachineType()); Assert.assertEquals(request.getDiskType(), actualRequest.getDiskType()); Assert.assertEquals(request.getDiskSizeGb(), actualRequest.getDiskSizeGb()); Assert.assertEquals(request.getResourceManagerTags(), actualRequest.getResourceManagerTags()); + Assert.assertEquals(request.getContainerdConfig(), actualRequest.getContainerdConfig()); Assert.assertEquals(request.getQueuedProvisioning(), actualRequest.getQueuedProvisioning()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -825,10 +835,12 @@ public void updateNodePoolExceptionTest() throws Exception { .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build()) .setResourceLabels(ResourceLabels.newBuilder().build()) .setWindowsNodeConfig(WindowsNodeConfig.newBuilder().build()) + .addAllAccelerators(new ArrayList()) .setMachineType("machineType-218117087") .setDiskType("diskType279771767") .setDiskSizeGb(-757478089) .setResourceManagerTags(ResourceManagerTags.newBuilder().build()) + .setContainerdConfig(ContainerdConfig.newBuilder().build()) .setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build()) .build(); client.updateNodePool(request); @@ -1657,6 +1669,45 @@ public void listOperationsTest() throws Exception { .build(); mockClusterManager.addResponse(expectedResponse); + String parent = "parent-995424086"; + + ListOperationsResponse actualResponse = client.listOperations(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockClusterManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOperationsRequest actualRequest = ((ListOperationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOperationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockClusterManager.addException(exception); + + try { + String parent = "parent-995424086"; + client.listOperations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOperationsTest2() throws Exception { + ListOperationsResponse expectedResponse = + ListOperationsResponse.newBuilder() + .addAllOperations(new ArrayList()) + .addAllMissingZones(new ArrayList()) + .build(); + mockClusterManager.addResponse(expectedResponse); + String projectId = "projectId-894832108"; String zone = "zone3744684"; @@ -1676,7 +1727,7 @@ public void listOperationsTest() throws Exception { } @Test - public void listOperationsExceptionTest() throws Exception { + public void listOperationsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockClusterManager.addException(exception); diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AddonsConfig.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AddonsConfig.java index bbc2adb58961..2118f74946ad 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AddonsConfig.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AddonsConfig.java @@ -190,7 +190,7 @@ public com.google.container.v1.HorizontalPodAutoscaling getHorizontalPodAutoscal * * * @deprecated google.container.v1.AddonsConfig.kubernetes_dashboard is deprecated. See - * google/container/v1/cluster_service.proto;l=1207 + * google/container/v1/cluster_service.proto;l=1274 * @return Whether the kubernetesDashboard field is set. */ @java.lang.Override @@ -213,7 +213,7 @@ public boolean hasKubernetesDashboard() { * * * @deprecated google.container.v1.AddonsConfig.kubernetes_dashboard is deprecated. See - * google/container/v1/cluster_service.proto;l=1207 + * google/container/v1/cluster_service.proto;l=1274 * @return The kubernetesDashboard. */ @java.lang.Override @@ -1928,7 +1928,7 @@ public Builder clearHorizontalPodAutoscaling() { * * * @deprecated google.container.v1.AddonsConfig.kubernetes_dashboard is deprecated. See - * google/container/v1/cluster_service.proto;l=1207 + * google/container/v1/cluster_service.proto;l=1274 * @return Whether the kubernetesDashboard field is set. */ @java.lang.Deprecated @@ -1950,7 +1950,7 @@ public boolean hasKubernetesDashboard() { * * * @deprecated google.container.v1.AddonsConfig.kubernetes_dashboard is deprecated. See - * google/container/v1/cluster_service.proto;l=1207 + * google/container/v1/cluster_service.proto;l=1274 * @return The kubernetesDashboard. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AddonsConfigOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AddonsConfigOrBuilder.java index 025d22055d6e..3d911d360e5f 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AddonsConfigOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AddonsConfigOrBuilder.java @@ -118,7 +118,7 @@ public interface AddonsConfigOrBuilder * * * @deprecated google.container.v1.AddonsConfig.kubernetes_dashboard is deprecated. See - * google/container/v1/cluster_service.proto;l=1207 + * google/container/v1/cluster_service.proto;l=1274 * @return Whether the kubernetesDashboard field is set. */ @java.lang.Deprecated @@ -138,7 +138,7 @@ public interface AddonsConfigOrBuilder * * * @deprecated google.container.v1.AddonsConfig.kubernetes_dashboard is deprecated. See - * google/container/v1/cluster_service.proto;l=1207 + * google/container/v1/cluster_service.proto;l=1274 * @return The kubernetesDashboard. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AdvancedMachineFeatures.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AdvancedMachineFeatures.java index a3a4c060b309..4ab90b69a795 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AdvancedMachineFeatures.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AdvancedMachineFeatures.java @@ -99,6 +99,39 @@ public long getThreadsPerCore() { return threadsPerCore_; } + public static final int ENABLE_NESTED_VIRTUALIZATION_FIELD_NUMBER = 2; + private boolean enableNestedVirtualization_ = false; + /** + * + * + *

+   * Whether or not to enable nested virtualization (defaults to false).
+   * 
+ * + * optional bool enable_nested_virtualization = 2; + * + * @return Whether the enableNestedVirtualization field is set. + */ + @java.lang.Override + public boolean hasEnableNestedVirtualization() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Whether or not to enable nested virtualization (defaults to false).
+   * 
+ * + * optional bool enable_nested_virtualization = 2; + * + * @return The enableNestedVirtualization. + */ + @java.lang.Override + public boolean getEnableNestedVirtualization() { + return enableNestedVirtualization_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -116,6 +149,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt64(1, threadsPerCore_); } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeBool(2, enableNestedVirtualization_); + } getUnknownFields().writeTo(output); } @@ -128,6 +164,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, threadsPerCore_); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableNestedVirtualization_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -148,6 +187,10 @@ public boolean equals(final java.lang.Object obj) { if (hasThreadsPerCore()) { if (getThreadsPerCore() != other.getThreadsPerCore()) return false; } + if (hasEnableNestedVirtualization() != other.hasEnableNestedVirtualization()) return false; + if (hasEnableNestedVirtualization()) { + if (getEnableNestedVirtualization() != other.getEnableNestedVirtualization()) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -163,6 +206,11 @@ public int hashCode() { hash = (37 * hash) + THREADS_PER_CORE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getThreadsPerCore()); } + if (hasEnableNestedVirtualization()) { + hash = (37 * hash) + ENABLE_NESTED_VIRTUALIZATION_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableNestedVirtualization()); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -303,6 +351,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; threadsPerCore_ = 0L; + enableNestedVirtualization_ = false; return this; } @@ -344,6 +393,10 @@ private void buildPartial0(com.google.container.v1.AdvancedMachineFeatures resul result.threadsPerCore_ = threadsPerCore_; to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enableNestedVirtualization_ = enableNestedVirtualization_; + to_bitField0_ |= 0x00000002; + } result.bitField0_ |= to_bitField0_; } @@ -396,6 +449,9 @@ public Builder mergeFrom(com.google.container.v1.AdvancedMachineFeatures other) if (other.hasThreadsPerCore()) { setThreadsPerCore(other.getThreadsPerCore()); } + if (other.hasEnableNestedVirtualization()) { + setEnableNestedVirtualization(other.getEnableNestedVirtualization()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -428,6 +484,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 8 + case 16: + { + enableNestedVirtualization_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -523,6 +585,74 @@ public Builder clearThreadsPerCore() { return this; } + private boolean enableNestedVirtualization_; + /** + * + * + *
+     * Whether or not to enable nested virtualization (defaults to false).
+     * 
+ * + * optional bool enable_nested_virtualization = 2; + * + * @return Whether the enableNestedVirtualization field is set. + */ + @java.lang.Override + public boolean hasEnableNestedVirtualization() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Whether or not to enable nested virtualization (defaults to false).
+     * 
+ * + * optional bool enable_nested_virtualization = 2; + * + * @return The enableNestedVirtualization. + */ + @java.lang.Override + public boolean getEnableNestedVirtualization() { + return enableNestedVirtualization_; + } + /** + * + * + *
+     * Whether or not to enable nested virtualization (defaults to false).
+     * 
+ * + * optional bool enable_nested_virtualization = 2; + * + * @param value The enableNestedVirtualization to set. + * @return This builder for chaining. + */ + public Builder setEnableNestedVirtualization(boolean value) { + + enableNestedVirtualization_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether or not to enable nested virtualization (defaults to false).
+     * 
+ * + * optional bool enable_nested_virtualization = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnableNestedVirtualization() { + bitField0_ = (bitField0_ & ~0x00000002); + enableNestedVirtualization_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AdvancedMachineFeaturesOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AdvancedMachineFeaturesOrBuilder.java index 8b32ecad81b5..cf9f201ce4fc 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AdvancedMachineFeaturesOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AdvancedMachineFeaturesOrBuilder.java @@ -52,4 +52,29 @@ public interface AdvancedMachineFeaturesOrBuilder * @return The threadsPerCore. */ long getThreadsPerCore(); + + /** + * + * + *
+   * Whether or not to enable nested virtualization (defaults to false).
+   * 
+ * + * optional bool enable_nested_virtualization = 2; + * + * @return Whether the enableNestedVirtualization field is set. + */ + boolean hasEnableNestedVirtualization(); + /** + * + * + *
+   * Whether or not to enable nested virtualization (defaults to false).
+   * 
+ * + * optional bool enable_nested_virtualization = 2; + * + * @return The enableNestedVirtualization. + */ + boolean getEnableNestedVirtualization(); } diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AutoprovisioningNodePoolDefaults.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AutoprovisioningNodePoolDefaults.java index b07bedd3bd28..40d5f70f563c 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AutoprovisioningNodePoolDefaults.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AutoprovisioningNodePoolDefaults.java @@ -310,7 +310,7 @@ public com.google.container.v1.NodeManagementOrBuilder getManagementOrBuilder() * string min_cpu_platform = 5 [deprecated = true]; * * @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is - * deprecated. See google/container/v1/cluster_service.proto;l=3953 + * deprecated. See google/container/v1/cluster_service.proto;l=4067 * @return The minCpuPlatform. */ @java.lang.Override @@ -346,7 +346,7 @@ public java.lang.String getMinCpuPlatform() { * string min_cpu_platform = 5 [deprecated = true]; * * @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is - * deprecated. See google/container/v1/cluster_service.proto;l=3953 + * deprecated. See google/container/v1/cluster_service.proto;l=4067 * @return The bytes for minCpuPlatform. */ @java.lang.Override @@ -1963,7 +1963,7 @@ public com.google.container.v1.NodeManagementOrBuilder getManagementOrBuilder() * string min_cpu_platform = 5 [deprecated = true]; * * @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is - * deprecated. See google/container/v1/cluster_service.proto;l=3953 + * deprecated. See google/container/v1/cluster_service.proto;l=4067 * @return The minCpuPlatform. */ @java.lang.Deprecated @@ -1998,7 +1998,7 @@ public java.lang.String getMinCpuPlatform() { * string min_cpu_platform = 5 [deprecated = true]; * * @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is - * deprecated. See google/container/v1/cluster_service.proto;l=3953 + * deprecated. See google/container/v1/cluster_service.proto;l=4067 * @return The bytes for minCpuPlatform. */ @java.lang.Deprecated @@ -2033,7 +2033,7 @@ public com.google.protobuf.ByteString getMinCpuPlatformBytes() { * string min_cpu_platform = 5 [deprecated = true]; * * @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is - * deprecated. See google/container/v1/cluster_service.proto;l=3953 + * deprecated. See google/container/v1/cluster_service.proto;l=4067 * @param value The minCpuPlatform to set. * @return This builder for chaining. */ @@ -2067,7 +2067,7 @@ public Builder setMinCpuPlatform(java.lang.String value) { * string min_cpu_platform = 5 [deprecated = true]; * * @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is - * deprecated. See google/container/v1/cluster_service.proto;l=3953 + * deprecated. See google/container/v1/cluster_service.proto;l=4067 * @return This builder for chaining. */ @java.lang.Deprecated @@ -2097,7 +2097,7 @@ public Builder clearMinCpuPlatform() { * string min_cpu_platform = 5 [deprecated = true]; * * @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is - * deprecated. See google/container/v1/cluster_service.proto;l=3953 + * deprecated. See google/container/v1/cluster_service.proto;l=4067 * @param value The bytes for minCpuPlatform to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AutoprovisioningNodePoolDefaultsOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AutoprovisioningNodePoolDefaultsOrBuilder.java index eb0dc56d2222..8ea9e72dfbb5 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AutoprovisioningNodePoolDefaultsOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/AutoprovisioningNodePoolDefaultsOrBuilder.java @@ -190,7 +190,7 @@ public interface AutoprovisioningNodePoolDefaultsOrBuilder * string min_cpu_platform = 5 [deprecated = true]; * * @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is - * deprecated. See google/container/v1/cluster_service.proto;l=3953 + * deprecated. See google/container/v1/cluster_service.proto;l=4067 * @return The minCpuPlatform. */ @java.lang.Deprecated @@ -215,7 +215,7 @@ public interface AutoprovisioningNodePoolDefaultsOrBuilder * string min_cpu_platform = 5 [deprecated = true]; * * @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is - * deprecated. See google/container/v1/cluster_service.proto;l=3953 + * deprecated. See google/container/v1/cluster_service.proto;l=4067 * @return The bytes for minCpuPlatform. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/BinaryAuthorization.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/BinaryAuthorization.java index 044f33be7758..f9b3c7c878c1 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/BinaryAuthorization.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/BinaryAuthorization.java @@ -238,7 +238,7 @@ private EvaluationMode(int value) { * bool enabled = 1 [deprecated = true]; * * @deprecated google.container.v1.BinaryAuthorization.enabled is deprecated. See - * google/container/v1/cluster_service.proto;l=1461 + * google/container/v1/cluster_service.proto;l=1528 * @return The enabled. */ @java.lang.Override @@ -664,7 +664,7 @@ public Builder mergeFrom( * bool enabled = 1 [deprecated = true]; * * @deprecated google.container.v1.BinaryAuthorization.enabled is deprecated. See - * google/container/v1/cluster_service.proto;l=1461 + * google/container/v1/cluster_service.proto;l=1528 * @return The enabled. */ @java.lang.Override @@ -684,7 +684,7 @@ public boolean getEnabled() { * bool enabled = 1 [deprecated = true]; * * @deprecated google.container.v1.BinaryAuthorization.enabled is deprecated. See - * google/container/v1/cluster_service.proto;l=1461 + * google/container/v1/cluster_service.proto;l=1528 * @param value The enabled to set. * @return This builder for chaining. */ @@ -708,7 +708,7 @@ public Builder setEnabled(boolean value) { * bool enabled = 1 [deprecated = true]; * * @deprecated google.container.v1.BinaryAuthorization.enabled is deprecated. See - * google/container/v1/cluster_service.proto;l=1461 + * google/container/v1/cluster_service.proto;l=1528 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/BinaryAuthorizationOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/BinaryAuthorizationOrBuilder.java index 6625e1bde563..6554634b35e3 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/BinaryAuthorizationOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/BinaryAuthorizationOrBuilder.java @@ -36,7 +36,7 @@ public interface BinaryAuthorizationOrBuilder * bool enabled = 1 [deprecated = true]; * * @deprecated google.container.v1.BinaryAuthorization.enabled is deprecated. See - * google/container/v1/cluster_service.proto;l=1461 + * google/container/v1/cluster_service.proto;l=1528 * @return The enabled. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CancelOperationRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CancelOperationRequest.java index 9e6018dd0590..4d05bc475af6 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CancelOperationRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CancelOperationRequest.java @@ -82,7 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3122 + * google/container/v1/cluster_service.proto;l=3236 * @return The projectId. */ @java.lang.Override @@ -110,7 +110,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3122 + * google/container/v1/cluster_service.proto;l=3236 * @return The bytes for projectId. */ @java.lang.Override @@ -144,7 +144,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3128 + * google/container/v1/cluster_service.proto;l=3242 * @return The zone. */ @java.lang.Override @@ -173,7 +173,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3128 + * google/container/v1/cluster_service.proto;l=3242 * @return The bytes for zone. */ @java.lang.Override @@ -205,7 +205,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3132 + * google/container/v1/cluster_service.proto;l=3246 * @return The operationId. */ @java.lang.Override @@ -232,7 +232,7 @@ public java.lang.String getOperationId() { * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3132 + * google/container/v1/cluster_service.proto;l=3246 * @return The bytes for operationId. */ @java.lang.Override @@ -728,7 +728,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3122 + * google/container/v1/cluster_service.proto;l=3236 * @return The projectId. */ @java.lang.Deprecated @@ -755,7 +755,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3122 + * google/container/v1/cluster_service.proto;l=3236 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -782,7 +782,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3122 + * google/container/v1/cluster_service.proto;l=3236 * @param value The projectId to set. * @return This builder for chaining. */ @@ -808,7 +808,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3122 + * google/container/v1/cluster_service.proto;l=3236 * @return This builder for chaining. */ @java.lang.Deprecated @@ -830,7 +830,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3122 + * google/container/v1/cluster_service.proto;l=3236 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -860,7 +860,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3128 + * google/container/v1/cluster_service.proto;l=3242 * @return The zone. */ @java.lang.Deprecated @@ -888,7 +888,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3128 + * google/container/v1/cluster_service.proto;l=3242 * @return The bytes for zone. */ @java.lang.Deprecated @@ -916,7 +916,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3128 + * google/container/v1/cluster_service.proto;l=3242 * @param value The zone to set. * @return This builder for chaining. */ @@ -943,7 +943,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3128 + * google/container/v1/cluster_service.proto;l=3242 * @return This builder for chaining. */ @java.lang.Deprecated @@ -966,7 +966,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3128 + * google/container/v1/cluster_service.proto;l=3242 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -994,7 +994,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3132 + * google/container/v1/cluster_service.proto;l=3246 * @return The operationId. */ @java.lang.Deprecated @@ -1020,7 +1020,7 @@ public java.lang.String getOperationId() { * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3132 + * google/container/v1/cluster_service.proto;l=3246 * @return The bytes for operationId. */ @java.lang.Deprecated @@ -1046,7 +1046,7 @@ public com.google.protobuf.ByteString getOperationIdBytes() { * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3132 + * google/container/v1/cluster_service.proto;l=3246 * @param value The operationId to set. * @return This builder for chaining. */ @@ -1071,7 +1071,7 @@ public Builder setOperationId(java.lang.String value) { * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3132 + * google/container/v1/cluster_service.proto;l=3246 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1092,7 +1092,7 @@ public Builder clearOperationId() { * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3132 + * google/container/v1/cluster_service.proto;l=3246 * @param value The bytes for operationId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CancelOperationRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CancelOperationRequestOrBuilder.java index 8216acb267e7..1de9bc9f9e6e 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CancelOperationRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CancelOperationRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface CancelOperationRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3122 + * google/container/v1/cluster_service.proto;l=3236 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface CancelOperationRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3122 + * google/container/v1/cluster_service.proto;l=3236 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface CancelOperationRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3128 + * google/container/v1/cluster_service.proto;l=3242 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface CancelOperationRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3128 + * google/container/v1/cluster_service.proto;l=3242 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface CancelOperationRequestOrBuilder * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3132 + * google/container/v1/cluster_service.proto;l=3246 * @return The operationId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface CancelOperationRequestOrBuilder * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CancelOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3132 + * google/container/v1/cluster_service.proto;l=3246 * @return The bytes for operationId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/Cluster.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/Cluster.java index 64a2dc746b22..6b77580fabc3 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/Cluster.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/Cluster.java @@ -492,7 +492,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * int32 initial_node_count = 3 [deprecated = true]; * * @deprecated google.container.v1.Cluster.initial_node_count is deprecated. See - * google/container/v1/cluster_service.proto;l=1690 + * google/container/v1/cluster_service.proto;l=1757 * @return The initialNodeCount. */ @java.lang.Override @@ -523,7 +523,7 @@ public int getInitialNodeCount() { * .google.container.v1.NodeConfig node_config = 4 [deprecated = true]; * * @deprecated google.container.v1.Cluster.node_config is deprecated. See - * google/container/v1/cluster_service.proto;l=1703 + * google/container/v1/cluster_service.proto;l=1770 * @return Whether the nodeConfig field is set. */ @java.lang.Override @@ -551,7 +551,7 @@ public boolean hasNodeConfig() { * .google.container.v1.NodeConfig node_config = 4 [deprecated = true]; * * @deprecated google.container.v1.Cluster.node_config is deprecated. See - * google/container/v1/cluster_service.proto;l=1703 + * google/container/v1/cluster_service.proto;l=1770 * @return The nodeConfig. */ @java.lang.Override @@ -2591,7 +2591,7 @@ public com.google.protobuf.ByteString getSelfLinkBytes() { * string zone = 101 [deprecated = true]; * * @deprecated google.container.v1.Cluster.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=1874 + * google/container/v1/cluster_service.proto;l=1941 * @return The zone. */ @java.lang.Override @@ -2619,7 +2619,7 @@ public java.lang.String getZone() { * string zone = 101 [deprecated = true]; * * @deprecated google.container.v1.Cluster.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=1874 + * google/container/v1/cluster_service.proto;l=1941 * @return The bytes for zone. */ @java.lang.Override @@ -2841,7 +2841,7 @@ public com.google.protobuf.ByteString getCurrentMasterVersionBytes() { * string current_node_version = 105 [deprecated = true]; * * @deprecated google.container.v1.Cluster.current_node_version is deprecated. See - * google/container/v1/cluster_service.proto;l=1907 + * google/container/v1/cluster_service.proto;l=1974 * @return The currentNodeVersion. */ @java.lang.Override @@ -2871,7 +2871,7 @@ public java.lang.String getCurrentNodeVersion() { * string current_node_version = 105 [deprecated = true]; * * @deprecated google.container.v1.Cluster.current_node_version is deprecated. See - * google/container/v1/cluster_service.proto;l=1907 + * google/container/v1/cluster_service.proto;l=1974 * @return The bytes for currentNodeVersion. */ @java.lang.Override @@ -2992,7 +2992,7 @@ public com.google.container.v1.Cluster.Status getStatus() { * string status_message = 108 [deprecated = true]; * * @deprecated google.container.v1.Cluster.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=1919 + * google/container/v1/cluster_service.proto;l=1986 * @return The statusMessage. */ @java.lang.Override @@ -3020,7 +3020,7 @@ public java.lang.String getStatusMessage() { * string status_message = 108 [deprecated = true]; * * @deprecated google.container.v1.Cluster.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=1919 + * google/container/v1/cluster_service.proto;l=1986 * @return The bytes for statusMessage. */ @java.lang.Override @@ -3132,7 +3132,7 @@ public com.google.protobuf.ByteString getServicesIpv4CidrBytes() { * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @return A list containing the instanceGroupUrls. */ @java.lang.Deprecated @@ -3149,7 +3149,7 @@ public com.google.protobuf.ProtocolStringList getInstanceGroupUrlsList() { * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @return The count of instanceGroupUrls. */ @java.lang.Deprecated @@ -3166,7 +3166,7 @@ public int getInstanceGroupUrlsCount() { * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @param index The index of the element to return. * @return The instanceGroupUrls at the given index. */ @@ -3184,7 +3184,7 @@ public java.lang.String getInstanceGroupUrls(int index) { * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @param index The index of the value to return. * @return The bytes of the instanceGroupUrls at the given index. */ @@ -3206,7 +3206,7 @@ public com.google.protobuf.ByteString getInstanceGroupUrlsBytes(int index) { * int32 current_node_count = 112 [deprecated = true]; * * @deprecated google.container.v1.Cluster.current_node_count is deprecated. See - * google/container/v1/cluster_service.proto;l=1939 + * google/container/v1/cluster_service.proto;l=2006 * @return The currentNodeCount. */ @java.lang.Override @@ -4026,6 +4026,72 @@ public com.google.container.v1.EnterpriseConfigOrBuilder getEnterpriseConfigOrBu : enterpriseConfig_; } + public static final int SATISFIES_PZS_FIELD_NUMBER = 152; + private boolean satisfiesPzs_ = false; + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * optional bool satisfies_pzs = 152 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the satisfiesPzs field is set. + */ + @java.lang.Override + public boolean hasSatisfiesPzs() { + return ((bitField1_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * optional bool satisfies_pzs = 152 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + @java.lang.Override + public boolean getSatisfiesPzs() { + return satisfiesPzs_; + } + + public static final int SATISFIES_PZI_FIELD_NUMBER = 153; + private boolean satisfiesPzi_ = false; + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * optional bool satisfies_pzi = 153 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the satisfiesPzi field is set. + */ + @java.lang.Override + public boolean hasSatisfiesPzi() { + return ((bitField1_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * optional bool satisfies_pzi = 153 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + @java.lang.Override + public boolean getSatisfiesPzi() { + return satisfiesPzi_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -4240,6 +4306,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField1_ & 0x00000002) != 0)) { output.writeMessage(149, getEnterpriseConfig()); } + if (((bitField1_ & 0x00000004) != 0)) { + output.writeBool(152, satisfiesPzs_); + } + if (((bitField1_ & 0x00000008) != 0)) { + output.writeBool(153, satisfiesPzi_); + } getUnknownFields().writeTo(output); } @@ -4483,6 +4555,12 @@ public int getSerializedSize() { if (((bitField1_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(149, getEnterpriseConfig()); } + if (((bitField1_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(152, satisfiesPzs_); + } + if (((bitField1_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(153, satisfiesPzi_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -4671,6 +4749,14 @@ public boolean equals(final java.lang.Object obj) { if (hasEnterpriseConfig()) { if (!getEnterpriseConfig().equals(other.getEnterpriseConfig())) return false; } + if (hasSatisfiesPzs() != other.hasSatisfiesPzs()) return false; + if (hasSatisfiesPzs()) { + if (getSatisfiesPzs() != other.getSatisfiesPzs()) return false; + } + if (hasSatisfiesPzi() != other.hasSatisfiesPzi()) return false; + if (hasSatisfiesPzi()) { + if (getSatisfiesPzi() != other.getSatisfiesPzi()) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4894,6 +4980,14 @@ public int hashCode() { hash = (37 * hash) + ENTERPRISE_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getEnterpriseConfig().hashCode(); } + if (hasSatisfiesPzs()) { + hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzs()); + } + if (hasSatisfiesPzi()) { + hash = (37 * hash) + SATISFIES_PZI_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzi()); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -5314,6 +5408,8 @@ public Builder clear() { enterpriseConfigBuilder_.dispose(); enterpriseConfigBuilder_ = null; } + satisfiesPzs_ = false; + satisfiesPzi_ = false; return this; } @@ -5688,6 +5784,14 @@ private void buildPartial2(com.google.container.v1.Cluster result) { enterpriseConfigBuilder_ == null ? enterpriseConfig_ : enterpriseConfigBuilder_.build(); to_bitField1_ |= 0x00000002; } + if (((from_bitField2_ & 0x00000008) != 0)) { + result.satisfiesPzs_ = satisfiesPzs_; + to_bitField1_ |= 0x00000004; + } + if (((from_bitField2_ & 0x00000010) != 0)) { + result.satisfiesPzi_ = satisfiesPzi_; + to_bitField1_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; result.bitField1_ |= to_bitField1_; } @@ -6043,6 +6147,12 @@ public Builder mergeFrom(com.google.container.v1.Cluster other) { if (other.hasEnterpriseConfig()) { mergeEnterpriseConfig(other.getEnterpriseConfig()); } + if (other.hasSatisfiesPzs()) { + setSatisfiesPzs(other.getSatisfiesPzs()); + } + if (other.hasSatisfiesPzi()) { + setSatisfiesPzi(other.getSatisfiesPzi()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -6515,6 +6625,18 @@ public Builder mergeFrom( bitField2_ |= 0x00000004; break; } // case 1194 + case 1216: + { + satisfiesPzs_ = input.readBool(); + bitField2_ |= 0x00000008; + break; + } // case 1216 + case 1224: + { + satisfiesPzi_ = input.readBool(); + bitField2_ |= 0x00000010; + break; + } // case 1224 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6798,7 +6920,7 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { * int32 initial_node_count = 3 [deprecated = true]; * * @deprecated google.container.v1.Cluster.initial_node_count is deprecated. See - * google/container/v1/cluster_service.proto;l=1690 + * google/container/v1/cluster_service.proto;l=1757 * @return The initialNodeCount. */ @java.lang.Override @@ -6825,7 +6947,7 @@ public int getInitialNodeCount() { * int32 initial_node_count = 3 [deprecated = true]; * * @deprecated google.container.v1.Cluster.initial_node_count is deprecated. See - * google/container/v1/cluster_service.proto;l=1690 + * google/container/v1/cluster_service.proto;l=1757 * @param value The initialNodeCount to set. * @return This builder for chaining. */ @@ -6856,7 +6978,7 @@ public Builder setInitialNodeCount(int value) { * int32 initial_node_count = 3 [deprecated = true]; * * @deprecated google.container.v1.Cluster.initial_node_count is deprecated. See - * google/container/v1/cluster_service.proto;l=1690 + * google/container/v1/cluster_service.proto;l=1757 * @return This builder for chaining. */ @java.lang.Deprecated @@ -6893,7 +7015,7 @@ public Builder clearInitialNodeCount() { * .google.container.v1.NodeConfig node_config = 4 [deprecated = true]; * * @deprecated google.container.v1.Cluster.node_config is deprecated. See - * google/container/v1/cluster_service.proto;l=1703 + * google/container/v1/cluster_service.proto;l=1770 * @return Whether the nodeConfig field is set. */ @java.lang.Deprecated @@ -6920,7 +7042,7 @@ public boolean hasNodeConfig() { * .google.container.v1.NodeConfig node_config = 4 [deprecated = true]; * * @deprecated google.container.v1.Cluster.node_config is deprecated. See - * google/container/v1/cluster_service.proto;l=1703 + * google/container/v1/cluster_service.proto;l=1770 * @return The nodeConfig. */ @java.lang.Deprecated @@ -13596,7 +13718,7 @@ public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) { * string zone = 101 [deprecated = true]; * * @deprecated google.container.v1.Cluster.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=1874 + * google/container/v1/cluster_service.proto;l=1941 * @return The zone. */ @java.lang.Deprecated @@ -13623,7 +13745,7 @@ public java.lang.String getZone() { * string zone = 101 [deprecated = true]; * * @deprecated google.container.v1.Cluster.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=1874 + * google/container/v1/cluster_service.proto;l=1941 * @return The bytes for zone. */ @java.lang.Deprecated @@ -13650,7 +13772,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 101 [deprecated = true]; * * @deprecated google.container.v1.Cluster.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=1874 + * google/container/v1/cluster_service.proto;l=1941 * @param value The zone to set. * @return This builder for chaining. */ @@ -13676,7 +13798,7 @@ public Builder setZone(java.lang.String value) { * string zone = 101 [deprecated = true]; * * @deprecated google.container.v1.Cluster.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=1874 + * google/container/v1/cluster_service.proto;l=1941 * @return This builder for chaining. */ @java.lang.Deprecated @@ -13698,7 +13820,7 @@ public Builder clearZone() { * string zone = 101 [deprecated = true]; * * @deprecated google.container.v1.Cluster.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=1874 + * google/container/v1/cluster_service.proto;l=1941 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -14132,7 +14254,7 @@ public Builder setCurrentMasterVersionBytes(com.google.protobuf.ByteString value * string current_node_version = 105 [deprecated = true]; * * @deprecated google.container.v1.Cluster.current_node_version is deprecated. See - * google/container/v1/cluster_service.proto;l=1907 + * google/container/v1/cluster_service.proto;l=1974 * @return The currentNodeVersion. */ @java.lang.Deprecated @@ -14161,7 +14283,7 @@ public java.lang.String getCurrentNodeVersion() { * string current_node_version = 105 [deprecated = true]; * * @deprecated google.container.v1.Cluster.current_node_version is deprecated. See - * google/container/v1/cluster_service.proto;l=1907 + * google/container/v1/cluster_service.proto;l=1974 * @return The bytes for currentNodeVersion. */ @java.lang.Deprecated @@ -14190,7 +14312,7 @@ public com.google.protobuf.ByteString getCurrentNodeVersionBytes() { * string current_node_version = 105 [deprecated = true]; * * @deprecated google.container.v1.Cluster.current_node_version is deprecated. See - * google/container/v1/cluster_service.proto;l=1907 + * google/container/v1/cluster_service.proto;l=1974 * @param value The currentNodeVersion to set. * @return This builder for chaining. */ @@ -14218,7 +14340,7 @@ public Builder setCurrentNodeVersion(java.lang.String value) { * string current_node_version = 105 [deprecated = true]; * * @deprecated google.container.v1.Cluster.current_node_version is deprecated. See - * google/container/v1/cluster_service.proto;l=1907 + * google/container/v1/cluster_service.proto;l=1974 * @return This builder for chaining. */ @java.lang.Deprecated @@ -14242,7 +14364,7 @@ public Builder clearCurrentNodeVersion() { * string current_node_version = 105 [deprecated = true]; * * @deprecated google.container.v1.Cluster.current_node_version is deprecated. See - * google/container/v1/cluster_service.proto;l=1907 + * google/container/v1/cluster_service.proto;l=1974 * @param value The bytes for currentNodeVersion to set. * @return This builder for chaining. */ @@ -14472,7 +14594,7 @@ public Builder clearStatus() { * string status_message = 108 [deprecated = true]; * * @deprecated google.container.v1.Cluster.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=1919 + * google/container/v1/cluster_service.proto;l=1986 * @return The statusMessage. */ @java.lang.Deprecated @@ -14499,7 +14621,7 @@ public java.lang.String getStatusMessage() { * string status_message = 108 [deprecated = true]; * * @deprecated google.container.v1.Cluster.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=1919 + * google/container/v1/cluster_service.proto;l=1986 * @return The bytes for statusMessage. */ @java.lang.Deprecated @@ -14526,7 +14648,7 @@ public com.google.protobuf.ByteString getStatusMessageBytes() { * string status_message = 108 [deprecated = true]; * * @deprecated google.container.v1.Cluster.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=1919 + * google/container/v1/cluster_service.proto;l=1986 * @param value The statusMessage to set. * @return This builder for chaining. */ @@ -14552,7 +14674,7 @@ public Builder setStatusMessage(java.lang.String value) { * string status_message = 108 [deprecated = true]; * * @deprecated google.container.v1.Cluster.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=1919 + * google/container/v1/cluster_service.proto;l=1986 * @return This builder for chaining. */ @java.lang.Deprecated @@ -14574,7 +14696,7 @@ public Builder clearStatusMessage() { * string status_message = 108 [deprecated = true]; * * @deprecated google.container.v1.Cluster.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=1919 + * google/container/v1/cluster_service.proto;l=1986 * @param value The bytes for statusMessage to set. * @return This builder for chaining. */ @@ -14797,7 +14919,7 @@ private void ensureInstanceGroupUrlsIsMutable() { * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @return A list containing the instanceGroupUrls. */ @java.lang.Deprecated @@ -14815,7 +14937,7 @@ public com.google.protobuf.ProtocolStringList getInstanceGroupUrlsList() { * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @return The count of instanceGroupUrls. */ @java.lang.Deprecated @@ -14832,7 +14954,7 @@ public int getInstanceGroupUrlsCount() { * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @param index The index of the element to return. * @return The instanceGroupUrls at the given index. */ @@ -14850,7 +14972,7 @@ public java.lang.String getInstanceGroupUrls(int index) { * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @param index The index of the value to return. * @return The bytes of the instanceGroupUrls at the given index. */ @@ -14868,7 +14990,7 @@ public com.google.protobuf.ByteString getInstanceGroupUrlsBytes(int index) { * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @param index The index to set the value at. * @param value The instanceGroupUrls to set. * @return This builder for chaining. @@ -14894,7 +15016,7 @@ public Builder setInstanceGroupUrls(int index, java.lang.String value) { * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @param value The instanceGroupUrls to add. * @return This builder for chaining. */ @@ -14919,7 +15041,7 @@ public Builder addInstanceGroupUrls(java.lang.String value) { * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @param values The instanceGroupUrls to add. * @return This builder for chaining. */ @@ -14941,7 +15063,7 @@ public Builder addAllInstanceGroupUrls(java.lang.Iterable valu * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @return This builder for chaining. */ @java.lang.Deprecated @@ -14962,7 +15084,7 @@ public Builder clearInstanceGroupUrls() { * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @param value The bytes of the instanceGroupUrls to add. * @return This builder for chaining. */ @@ -14991,7 +15113,7 @@ public Builder addInstanceGroupUrlsBytes(com.google.protobuf.ByteString value) { * int32 current_node_count = 112 [deprecated = true]; * * @deprecated google.container.v1.Cluster.current_node_count is deprecated. See - * google/container/v1/cluster_service.proto;l=1939 + * google/container/v1/cluster_service.proto;l=2006 * @return The currentNodeCount. */ @java.lang.Override @@ -15010,7 +15132,7 @@ public int getCurrentNodeCount() { * int32 current_node_count = 112 [deprecated = true]; * * @deprecated google.container.v1.Cluster.current_node_count is deprecated. See - * google/container/v1/cluster_service.proto;l=1939 + * google/container/v1/cluster_service.proto;l=2006 * @param value The currentNodeCount to set. * @return This builder for chaining. */ @@ -15033,7 +15155,7 @@ public Builder setCurrentNodeCount(int value) { * int32 current_node_count = 112 [deprecated = true]; * * @deprecated google.container.v1.Cluster.current_node_count is deprecated. See - * google/container/v1/cluster_service.proto;l=1939 + * google/container/v1/cluster_service.proto;l=2006 * @return This builder for chaining. */ @java.lang.Deprecated @@ -17710,6 +17832,142 @@ public com.google.container.v1.EnterpriseConfigOrBuilder getEnterpriseConfigOrBu return enterpriseConfigBuilder_; } + private boolean satisfiesPzs_; + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * optional bool satisfies_pzs = 152 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the satisfiesPzs field is set. + */ + @java.lang.Override + public boolean hasSatisfiesPzs() { + return ((bitField2_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * optional bool satisfies_pzs = 152 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + @java.lang.Override + public boolean getSatisfiesPzs() { + return satisfiesPzs_; + } + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * optional bool satisfies_pzs = 152 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The satisfiesPzs to set. + * @return This builder for chaining. + */ + public Builder setSatisfiesPzs(boolean value) { + + satisfiesPzs_ = value; + bitField2_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * optional bool satisfies_pzs = 152 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSatisfiesPzs() { + bitField2_ = (bitField2_ & ~0x00000008); + satisfiesPzs_ = false; + onChanged(); + return this; + } + + private boolean satisfiesPzi_; + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * optional bool satisfies_pzi = 153 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the satisfiesPzi field is set. + */ + @java.lang.Override + public boolean hasSatisfiesPzi() { + return ((bitField2_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * optional bool satisfies_pzi = 153 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + @java.lang.Override + public boolean getSatisfiesPzi() { + return satisfiesPzi_; + } + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * optional bool satisfies_pzi = 153 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The satisfiesPzi to set. + * @return This builder for chaining. + */ + public Builder setSatisfiesPzi(boolean value) { + + satisfiesPzi_ = value; + bitField2_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * optional bool satisfies_pzi = 153 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSatisfiesPzi() { + bitField2_ = (bitField2_ & ~0x00000010); + satisfiesPzi_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterOrBuilder.java index 1d5e217db98c..5431b46cc643 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterOrBuilder.java @@ -105,7 +105,7 @@ public interface ClusterOrBuilder * int32 initial_node_count = 3 [deprecated = true]; * * @deprecated google.container.v1.Cluster.initial_node_count is deprecated. See - * google/container/v1/cluster_service.proto;l=1690 + * google/container/v1/cluster_service.proto;l=1757 * @return The initialNodeCount. */ @java.lang.Deprecated @@ -131,7 +131,7 @@ public interface ClusterOrBuilder * .google.container.v1.NodeConfig node_config = 4 [deprecated = true]; * * @deprecated google.container.v1.Cluster.node_config is deprecated. See - * google/container/v1/cluster_service.proto;l=1703 + * google/container/v1/cluster_service.proto;l=1770 * @return Whether the nodeConfig field is set. */ @java.lang.Deprecated @@ -156,7 +156,7 @@ public interface ClusterOrBuilder * .google.container.v1.NodeConfig node_config = 4 [deprecated = true]; * * @deprecated google.container.v1.Cluster.node_config is deprecated. See - * google/container/v1/cluster_service.proto;l=1703 + * google/container/v1/cluster_service.proto;l=1770 * @return The nodeConfig. */ @java.lang.Deprecated @@ -1553,7 +1553,7 @@ java.lang.String getResourceLabelsOrDefault( * string zone = 101 [deprecated = true]; * * @deprecated google.container.v1.Cluster.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=1874 + * google/container/v1/cluster_service.proto;l=1941 * @return The zone. */ @java.lang.Deprecated @@ -1570,7 +1570,7 @@ java.lang.String getResourceLabelsOrDefault( * string zone = 101 [deprecated = true]; * * @deprecated google.container.v1.Cluster.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=1874 + * google/container/v1/cluster_service.proto;l=1941 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1699,7 +1699,7 @@ java.lang.String getResourceLabelsOrDefault( * string current_node_version = 105 [deprecated = true]; * * @deprecated google.container.v1.Cluster.current_node_version is deprecated. See - * google/container/v1/cluster_service.proto;l=1907 + * google/container/v1/cluster_service.proto;l=1974 * @return The currentNodeVersion. */ @java.lang.Deprecated @@ -1718,7 +1718,7 @@ java.lang.String getResourceLabelsOrDefault( * string current_node_version = 105 [deprecated = true]; * * @deprecated google.container.v1.Cluster.current_node_version is deprecated. See - * google/container/v1/cluster_service.proto;l=1907 + * google/container/v1/cluster_service.proto;l=1974 * @return The bytes for currentNodeVersion. */ @java.lang.Deprecated @@ -1788,7 +1788,7 @@ java.lang.String getResourceLabelsOrDefault( * string status_message = 108 [deprecated = true]; * * @deprecated google.container.v1.Cluster.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=1919 + * google/container/v1/cluster_service.proto;l=1986 * @return The statusMessage. */ @java.lang.Deprecated @@ -1805,7 +1805,7 @@ java.lang.String getResourceLabelsOrDefault( * string status_message = 108 [deprecated = true]; * * @deprecated google.container.v1.Cluster.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=1919 + * google/container/v1/cluster_service.proto;l=1986 * @return The bytes for statusMessage. */ @java.lang.Deprecated @@ -1870,7 +1870,7 @@ java.lang.String getResourceLabelsOrDefault( * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @return A list containing the instanceGroupUrls. */ @java.lang.Deprecated @@ -1885,7 +1885,7 @@ java.lang.String getResourceLabelsOrDefault( * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @return The count of instanceGroupUrls. */ @java.lang.Deprecated @@ -1900,7 +1900,7 @@ java.lang.String getResourceLabelsOrDefault( * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @param index The index of the element to return. * @return The instanceGroupUrls at the given index. */ @@ -1916,7 +1916,7 @@ java.lang.String getResourceLabelsOrDefault( * repeated string instance_group_urls = 111 [deprecated = true]; * * @deprecated google.container.v1.Cluster.instance_group_urls is deprecated. See - * google/container/v1/cluster_service.proto;l=1935 + * google/container/v1/cluster_service.proto;l=2002 * @param index The index of the value to return. * @return The bytes of the instanceGroupUrls at the given index. */ @@ -1934,7 +1934,7 @@ java.lang.String getResourceLabelsOrDefault( * int32 current_node_count = 112 [deprecated = true]; * * @deprecated google.container.v1.Cluster.current_node_count is deprecated. See - * google/container/v1/cluster_service.proto;l=1939 + * google/container/v1/cluster_service.proto;l=2006 * @return The currentNodeCount. */ @java.lang.Deprecated @@ -2468,4 +2468,54 @@ java.lang.String getResourceLabelsOrDefault( * .google.container.v1.EnterpriseConfig enterprise_config = 149; */ com.google.container.v1.EnterpriseConfigOrBuilder getEnterpriseConfigOrBuilder(); + + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * optional bool satisfies_pzs = 152 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the satisfiesPzs field is set. + */ + boolean hasSatisfiesPzs(); + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * optional bool satisfies_pzs = 152 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + boolean getSatisfiesPzs(); + + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * optional bool satisfies_pzi = 153 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the satisfiesPzi field is set. + */ + boolean hasSatisfiesPzi(); + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * optional bool satisfies_pzi = 153 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + boolean getSatisfiesPzi(); } diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterServiceProto.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterServiceProto.java index d5d09bf5b2ef..5dd00f528bd2 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterServiceProto.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterServiceProto.java @@ -32,6 +32,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_container_v1_LinuxNodeConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_container_v1_LinuxNodeConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_container_v1_LinuxNodeConfig_HugepagesConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_container_v1_LinuxNodeConfig_HugepagesConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_container_v1_LinuxNodeConfig_SysctlsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -104,6 +108,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_container_v1_SoleTenantConfig_NodeAffinity_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_container_v1_SoleTenantConfig_NodeAffinity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_container_v1_ContainerdConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_container_v1_ContainerdConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_container_v1_NodeTaint_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -797,1289 +817,1334 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ation.proto\032\033google/protobuf/empty.proto" + "\032\037google/protobuf/timestamp.proto\032\036googl" + "e/protobuf/wrappers.proto\032\025google/rpc/co" - + "de.proto\032\027google/rpc/status.proto\"\236\002\n\017Li" + + "de.proto\032\027google/rpc/status.proto\"\200\004\n\017Li" + "nuxNodeConfig\022B\n\007sysctls\030\001 \003(\01321.google." + "container.v1.LinuxNodeConfig.SysctlsEntr" + "y\022D\n\013cgroup_mode\030\002 \001(\0162/.google.containe" - + "r.v1.LinuxNodeConfig.CgroupMode\032.\n\014Sysct" - + "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"" - + "Q\n\nCgroupMode\022\033\n\027CGROUP_MODE_UNSPECIFIED" - + "\020\000\022\022\n\016CGROUP_MODE_V1\020\001\022\022\n\016CGROUP_MODE_V2" - + "\020\002\"\264\001\n\021WindowsNodeConfig\022D\n\nos_version\030\001" - + " \001(\01620.google.container.v1.WindowsNodeCo" - + "nfig.OSVersion\"Y\n\tOSVersion\022\032\n\026OS_VERSIO" - + "N_UNSPECIFIED\020\000\022\027\n\023OS_VERSION_LTSC2019\020\001" - + "\022\027\n\023OS_VERSION_LTSC2022\020\002\"\370\001\n\021NodeKubele" - + "tConfig\022\032\n\022cpu_manager_policy\030\001 \001(\t\0221\n\rc" - + "pu_cfs_quota\030\002 \001(\0132\032.google.protobuf.Boo" - + "lValue\022\034\n\024cpu_cfs_quota_period\030\003 \001(\t\022\026\n\016" - + "pod_pids_limit\030\004 \001(\003\0223\n&insecure_kubelet" - + "_readonly_port_enabled\030\007 \001(\010H\000\210\001\001B)\n\'_in" - + "secure_kubelet_readonly_port_enabled\"\244\021\n" - + "\nNodeConfig\022\024\n\014machine_type\030\001 \001(\t\022\024\n\014dis" - + "k_size_gb\030\002 \001(\005\022\024\n\014oauth_scopes\030\003 \003(\t\022\027\n" - + "\017service_account\030\t \001(\t\022?\n\010metadata\030\004 \003(\013" - + "2-.google.container.v1.NodeConfig.Metada" - + "taEntry\022\022\n\nimage_type\030\005 \001(\t\022;\n\006labels\030\006 " - + "\003(\0132+.google.container.v1.NodeConfig.Lab" - + "elsEntry\022\027\n\017local_ssd_count\030\007 \001(\005\022\014\n\004tag" - + "s\030\010 \003(\t\022\023\n\013preemptible\030\n \001(\010\022<\n\014accelera" - + "tors\030\013 \003(\0132&.google.container.v1.Acceler" - + "atorConfig\022\021\n\tdisk_type\030\014 \001(\t\022\030\n\020min_cpu" - + "_platform\030\r \001(\t\022M\n\030workload_metadata_con" - + "fig\030\016 \001(\0132+.google.container.v1.Workload" - + "MetadataConfig\022.\n\006taints\030\017 \003(\0132\036.google." - + "container.v1.NodeTaint\022:\n\016sandbox_config" - + "\030\021 \001(\0132\".google.container.v1.SandboxConf" - + "ig\022\022\n\nnode_group\030\022 \001(\t\022F\n\024reservation_af" - + "finity\030\023 \001(\0132(.google.container.v1.Reser" - + "vationAffinity\022M\n\030shielded_instance_conf" - + "ig\030\024 \001(\0132+.google.container.v1.ShieldedI" - + "nstanceConfig\022?\n\021linux_node_config\030\025 \001(\013" - + "2$.google.container.v1.LinuxNodeConfig\022>" - + "\n\016kubelet_config\030\026 \001(\0132&.google.containe" - + "r.v1.NodeKubeletConfig\022\031\n\021boot_disk_kms_" - + "key\030\027 \001(\t\0224\n\013gcfs_config\030\031 \001(\0132\037.google." - + "container.v1.GcfsConfig\022O\n\031advanced_mach" - + "ine_features\030\032 \001(\0132,.google.container.v1" - + ".AdvancedMachineFeatures\022.\n\005gvnic\030\035 \001(\0132" - + "\037.google.container.v1.VirtualNIC\022\014\n\004spot" - + "\030 \001(\010\022B\n\022confidential_nodes\030# \001(\0132&.goo" - + "gle.container.v1.ConfidentialNodes\0229\n\013fa" - + "st_socket\030$ \001(\0132\037.google.container.v1.Fa" - + "stSocketH\000\210\001\001\022L\n\017resource_labels\030% \003(\01323" - + ".google.container.v1.NodeConfig.Resource" - + "LabelsEntry\022B\n\016logging_config\030& \001(\0132*.go" - + "ogle.container.v1.NodePoolLoggingConfig\022" - + "C\n\023windows_node_config\030\' \001(\0132&.google.co" - + "ntainer.v1.WindowsNodeConfig\022Q\n\033local_nv" - + "me_ssd_block_config\030( \001(\0132,.google.conta" - + "iner.v1.LocalNvmeSsdBlockConfig\022_\n\"ephem" - + "eral_storage_local_ssd_config\030) \001(\01323.go" - + "ogle.container.v1.EphemeralStorageLocalS" - + "sdConfig\022A\n\022sole_tenant_config\030* \001(\0132%.g" - + "oogle.container.v1.SoleTenantConfig\022G\n\025r" - + "esource_manager_tags\030- \001(\0132(.google.cont" - + "ainer.v1.ResourceManagerTags\022(\n\033enable_c" - + "onfidential_storage\030. \001(\010B\003\340A\001\022D\n\024second" - + "ary_boot_disks\0300 \003(\0132&.google.container." - + "v1.SecondaryBootDisk\022f\n#secondary_boot_d" - + "isk_update_strategy\0302 \001(\01324.google.conta" - + "iner.v1.SecondaryBootDiskUpdateStrategyH" - + "\001\210\001\001\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" - + "lue\030\002 \001(\t:\0028\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(" - + "\t\022\r\n\005value\030\002 \001(\t:\0028\001\0325\n\023ResourceLabelsEn" - + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\016\n\014_" - + "fast_socketB&\n$_secondary_boot_disk_upda" - + "te_strategy\"M\n\027AdvancedMachineFeatures\022\035" - + "\n\020threads_per_core\030\001 \001(\003H\000\210\001\001B\023\n\021_thread" - + "s_per_core\"\263\006\n\021NodeNetworkConfig\022\035\n\020crea" - + "te_pod_range\030\004 \001(\010B\003\340A\004\022\021\n\tpod_range\030\005 \001" - + "(\t\022\033\n\023pod_ipv4_cidr_block\030\006 \001(\t\022!\n\024enabl" - + "e_private_nodes\030\t \001(\010H\000\210\001\001\022h\n\032network_pe" - + "rformance_config\030\013 \001(\0132?.google.containe" - + "r.v1.NodeNetworkConfig.NetworkPerformanc" - + "eConfigH\001\210\001\001\022V\n\035pod_cidr_overprovision_c" - + "onfig\030\r \001(\0132/.google.container.v1.PodCID" - + "ROverprovisionConfig\022Y\n\037additional_node_" - + "network_configs\030\016 \003(\01320.google.container" - + ".v1.AdditionalNodeNetworkConfig\022W\n\036addit" - + "ional_pod_network_configs\030\017 \003(\0132/.google" - + ".container.v1.AdditionalPodNetworkConfig" - + "\022\'\n\032pod_ipv4_range_utilization\030\020 \001(\001B\003\340A" - + "\003\032\324\001\n\030NetworkPerformanceConfig\022n\n\033total_" - + "egress_bandwidth_tier\030\001 \001(\0162D.google.con" - + "tainer.v1.NodeNetworkConfig.NetworkPerfo" - + "rmanceConfig.TierH\000\210\001\001\"(\n\004Tier\022\024\n\020TIER_U" - + "NSPECIFIED\020\000\022\n\n\006TIER_1\020\001B\036\n\034_total_egres" - + "s_bandwidth_tierB\027\n\025_enable_private_node" - + "sB\035\n\033_network_performance_config\"B\n\033Addi" - + "tionalNodeNetworkConfig\022\017\n\007network\030\001 \001(\t" - + "\022\022\n\nsubnetwork\030\002 \001(\t\"\253\001\n\032AdditionalPodNe" - + "tworkConfig\022\022\n\nsubnetwork\030\001 \001(\t\022\033\n\023secon" - + "dary_pod_range\030\002 \001(\t\022F\n\021max_pods_per_nod" - + "e\030\003 \001(\0132&.google.container.v1.MaxPodsCon" - + "straintH\000\210\001\001B\024\n\022_max_pods_per_node\"Y\n\026Sh" - + "ieldedInstanceConfig\022\032\n\022enable_secure_bo" - + "ot\030\001 \001(\010\022#\n\033enable_integrity_monitoring\030" - + "\002 \001(\010\"k\n\rSandboxConfig\0225\n\004type\030\002 \001(\0162\'.g" - + "oogle.container.v1.SandboxConfig.Type\"#\n" - + "\004Type\022\017\n\013UNSPECIFIED\020\000\022\n\n\006GVISOR\020\001\"\035\n\nGc" - + "fsConfig\022\017\n\007enabled\030\001 \001(\010\"\337\001\n\023Reservatio" - + "nAffinity\022O\n\030consume_reservation_type\030\001 " - + "\001(\0162-.google.container.v1.ReservationAff" - + "inity.Type\022\013\n\003key\030\002 \001(\t\022\016\n\006values\030\003 \003(\t\"" - + "Z\n\004Type\022\017\n\013UNSPECIFIED\020\000\022\022\n\016NO_RESERVATI" - + "ON\020\001\022\023\n\017ANY_RESERVATION\020\002\022\030\n\024SPECIFIC_RE" - + "SERVATION\020\003\"\226\002\n\020SoleTenantConfig\022K\n\017node" - + "_affinities\030\001 \003(\01322.google.container.v1." - + "SoleTenantConfig.NodeAffinity\032\264\001\n\014NodeAf" - + "finity\022\013\n\003key\030\001 \001(\t\022M\n\010operator\030\002 \001(\0162;." - + "google.container.v1.SoleTenantConfig.Nod" - + "eAffinity.Operator\022\016\n\006values\030\003 \003(\t\"8\n\010Op" - + "erator\022\030\n\024OPERATOR_UNSPECIFIED\020\000\022\006\n\002IN\020\001" - + "\022\n\n\006NOT_IN\020\002\"\271\001\n\tNodeTaint\022\013\n\003key\030\001 \001(\t\022" - + "\r\n\005value\030\002 \001(\t\0225\n\006effect\030\003 \001(\0162%.google." - + "container.v1.NodeTaint.Effect\"Y\n\006Effect\022" - + "\026\n\022EFFECT_UNSPECIFIED\020\000\022\017\n\013NO_SCHEDULE\020\001" - + "\022\026\n\022PREFER_NO_SCHEDULE\020\002\022\016\n\nNO_EXECUTE\020\003" - + "\"<\n\nNodeTaints\022.\n\006taints\030\001 \003(\0132\036.google." - + "container.v1.NodeTaint\"x\n\nNodeLabels\022;\n\006" - + "labels\030\001 \003(\0132+.google.container.v1.NodeL" - + "abels.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030" - + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\200\001\n\016ResourceLab" - + "els\022?\n\006labels\030\001 \003(\0132/.google.container.v" - + "1.ResourceLabels.LabelsEntry\032-\n\013LabelsEn" - + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\033\n\013N" - + "etworkTags\022\014\n\004tags\030\001 \003(\t\"\331\001\n\nMasterAuth\022" - + "\024\n\010username\030\001 \001(\tB\002\030\001\022\024\n\010password\030\002 \001(\tB" - + "\002\030\001\022O\n\031client_certificate_config\030\003 \001(\0132," - + ".google.container.v1.ClientCertificateCo" - + "nfig\022\036\n\026cluster_ca_certificate\030d \001(\t\022\032\n\022" - + "client_certificate\030e \001(\t\022\022\n\nclient_key\030f" - + " \001(\t\";\n\027ClientCertificateConfig\022 \n\030issue" - + "_client_certificate\030\001 \001(\010\"\254\007\n\014AddonsConf" - + "ig\022C\n\023http_load_balancing\030\001 \001(\0132&.google" - + ".container.v1.HttpLoadBalancing\022Q\n\032horiz" - + "ontal_pod_autoscaling\030\002 \001(\0132-.google.con" - + "tainer.v1.HorizontalPodAutoscaling\022J\n\024ku" - + "bernetes_dashboard\030\003 \001(\0132(.google.contai" - + "ner.v1.KubernetesDashboardB\002\030\001\022G\n\025networ" - + "k_policy_config\030\004 \001(\0132(.google.container" - + ".v1.NetworkPolicyConfig\022=\n\020cloud_run_con" - + "fig\030\007 \001(\0132#.google.container.v1.CloudRun" - + "Config\022=\n\020dns_cache_config\030\010 \001(\0132#.googl" - + "e.container.v1.DnsCacheConfig\022K\n\027config_" - + "connector_config\030\n \001(\0132*.google.containe" - + "r.v1.ConfigConnectorConfig\022d\n%gce_persis" - + "tent_disk_csi_driver_config\030\013 \001(\01325.goog" - + "le.container.v1.GcePersistentDiskCsiDriv" - + "erConfig\022Y\n\037gcp_filestore_csi_driver_con" - + "fig\030\016 \001(\01320.google.container.v1.GcpFiles" - + "toreCsiDriverConfig\022J\n\027gke_backup_agent_" - + "config\030\020 \001(\0132).google.container.v1.GkeBa" - + "ckupAgentConfig\022O\n\032gcs_fuse_csi_driver_c" - + "onfig\030\021 \001(\0132+.google.container.v1.GcsFus" - + "eCsiDriverConfig\022F\n\022stateful_ha_config\030\022" - + " \001(\0132%.google.container.v1.StatefulHACon" - + "figB\003\340A\001\"%\n\021HttpLoadBalancing\022\020\n\010disable" - + "d\030\001 \001(\010\",\n\030HorizontalPodAutoscaling\022\020\n\010d" - + "isabled\030\001 \001(\010\"\'\n\023KubernetesDashboard\022\020\n\010" - + "disabled\030\001 \001(\010\"\'\n\023NetworkPolicyConfig\022\020\n" - + "\010disabled\030\001 \001(\010\"!\n\016DnsCacheConfig\022\017\n\007ena" - + "bled\030\001 \001(\010\"9\n&PrivateClusterMasterGlobal" - + "AccessConfig\022\017\n\007enabled\030\001 \001(\010\"\305\002\n\024Privat" - + "eClusterConfig\022\034\n\024enable_private_nodes\030\001" - + " \001(\010\022\037\n\027enable_private_endpoint\030\002 \001(\010\022\036\n" - + "\026master_ipv4_cidr_block\030\003 \001(\t\022\030\n\020private" - + "_endpoint\030\004 \001(\t\022\027\n\017public_endpoint\030\005 \001(\t" - + "\022\024\n\014peering_name\030\007 \001(\t\022`\n\033master_global_" - + "access_config\030\010 \001(\0132;.google.container.v" - + "1.PrivateClusterMasterGlobalAccessConfig" - + "\022#\n\033private_endpoint_subnetwork\030\n \001(\t\"D\n" - + "\031AuthenticatorGroupsConfig\022\017\n\007enabled\030\001 " - + "\001(\010\022\026\n\016security_group\030\002 \001(\t\"\356\001\n\016CloudRun" - + "Config\022\020\n\010disabled\030\001 \001(\010\022P\n\022load_balance" - + "r_type\030\003 \001(\01624.google.container.v1.Cloud" - + "RunConfig.LoadBalancerType\"x\n\020LoadBalanc" - + "erType\022\"\n\036LOAD_BALANCER_TYPE_UNSPECIFIED" - + "\020\000\022\037\n\033LOAD_BALANCER_TYPE_EXTERNAL\020\001\022\037\n\033L" - + "OAD_BALANCER_TYPE_INTERNAL\020\002\"(\n\025ConfigCo" - + "nnectorConfig\022\017\n\007enabled\030\001 \001(\010\"3\n GcePer" - + "sistentDiskCsiDriverConfig\022\017\n\007enabled\030\001 " - + "\001(\010\".\n\033GcpFilestoreCsiDriverConfig\022\017\n\007en" - + "abled\030\001 \001(\010\")\n\026GcsFuseCsiDriverConfig\022\017\n" - + "\007enabled\030\001 \001(\010\"\'\n\024GkeBackupAgentConfig\022\017" - + "\n\007enabled\030\001 \001(\010\"#\n\020StatefulHAConfig\022\017\n\007e" - + "nabled\030\001 \001(\010\"\216\002\n\036MasterAuthorizedNetwork" - + "sConfig\022\017\n\007enabled\030\001 \001(\010\022R\n\013cidr_blocks\030" - + "\002 \003(\0132=.google.container.v1.MasterAuthor" - + "izedNetworksConfig.CidrBlock\022,\n\037gcp_publ" - + "ic_cidrs_access_enabled\030\003 \001(\010H\000\210\001\001\0325\n\tCi" - + "drBlock\022\024\n\014display_name\030\001 \001(\t\022\022\n\ncidr_bl" - + "ock\030\002 \001(\tB\"\n _gcp_public_cidrs_access_en" - + "abled\"\035\n\nLegacyAbac\022\017\n\007enabled\030\001 \001(\010\"\221\001\n" - + "\rNetworkPolicy\022=\n\010provider\030\001 \001(\0162+.googl" - + "e.container.v1.NetworkPolicy.Provider\022\017\n" - + "\007enabled\030\002 \001(\010\"0\n\010Provider\022\030\n\024PROVIDER_U" - + "NSPECIFIED\020\000\022\n\n\006CALICO\020\001\"\343\001\n\023BinaryAutho" - + "rization\022\023\n\007enabled\030\001 \001(\010B\002\030\001\022P\n\017evaluat" - + "ion_mode\030\002 \001(\01627.google.container.v1.Bin" - + "aryAuthorization.EvaluationMode\"e\n\016Evalu" - + "ationMode\022\037\n\033EVALUATION_MODE_UNSPECIFIED" - + "\020\000\022\014\n\010DISABLED\020\001\022$\n PROJECT_SINGLETON_PO" - + "LICY_ENFORCE\020\002\"-\n\032PodCIDROverprovisionCo" - + "nfig\022\017\n\007disable\030\001 \001(\010\"\275\006\n\022IPAllocationPo" - + "licy\022\026\n\016use_ip_aliases\030\001 \001(\010\022\031\n\021create_s" - + "ubnetwork\030\002 \001(\010\022\027\n\017subnetwork_name\030\003 \001(\t" - + "\022\035\n\021cluster_ipv4_cidr\030\004 \001(\tB\002\030\001\022\032\n\016node_" - + "ipv4_cidr\030\005 \001(\tB\002\030\001\022\036\n\022services_ipv4_cid" - + "r\030\006 \001(\tB\002\030\001\022$\n\034cluster_secondary_range_n" - + "ame\030\007 \001(\t\022%\n\035services_secondary_range_na" - + "me\030\010 \001(\t\022\037\n\027cluster_ipv4_cidr_block\030\t \001(" - + "\t\022\034\n\024node_ipv4_cidr_block\030\n \001(\t\022 \n\030servi" - + "ces_ipv4_cidr_block\030\013 \001(\t\022\033\n\023tpu_ipv4_ci" - + "dr_block\030\r \001(\t\022\022\n\nuse_routes\030\017 \001(\010\0222\n\nst" - + "ack_type\030\020 \001(\0162\036.google.container.v1.Sta" - + "ckType\022=\n\020ipv6_access_type\030\021 \001(\0162#.googl" - + "e.container.v1.IPv6AccessType\022V\n\035pod_cid" - + "r_overprovision_config\030\025 \001(\0132/.google.co" - + "ntainer.v1.PodCIDROverprovisionConfig\022#\n" - + "\026subnet_ipv6_cidr_block\030\026 \001(\tB\003\340A\003\022%\n\030se" - + "rvices_ipv6_cidr_block\030\027 \001(\tB\003\340A\003\022Y\n\034add" - + "itional_pod_ranges_config\030\030 \001(\0132..google" - + ".container.v1.AdditionalPodRangesConfigB" - + "\003\340A\003\022/\n\"default_pod_ipv4_range_utilizati" - + "on\030\031 \001(\001B\003\340A\003\"\231\033\n\007Cluster\022\014\n\004name\030\001 \001(\t\022" - + "\023\n\013description\030\002 \001(\t\022\036\n\022initial_node_cou" - + "nt\030\003 \001(\005B\002\030\001\0228\n\013node_config\030\004 \001(\0132\037.goog" - + "le.container.v1.NodeConfigB\002\030\001\0224\n\013master" - + "_auth\030\005 \001(\0132\037.google.container.v1.Master" - + "Auth\022\027\n\017logging_service\030\006 \001(\t\022\032\n\022monitor" - + "ing_service\030\007 \001(\t\022\017\n\007network\030\010 \001(\t\022\031\n\021cl" - + "uster_ipv4_cidr\030\t \001(\t\0228\n\raddons_config\030\n" - + " \001(\0132!.google.container.v1.AddonsConfig\022" - + "\022\n\nsubnetwork\030\013 \001(\t\0221\n\nnode_pools\030\014 \003(\0132" - + "\035.google.container.v1.NodePool\022\021\n\tlocati" - + "ons\030\r \003(\t\022\037\n\027enable_kubernetes_alpha\030\016 \001" - + "(\010\022I\n\017resource_labels\030\017 \003(\01320.google.con" - + "tainer.v1.Cluster.ResourceLabelsEntry\022\031\n" - + "\021label_fingerprint\030\020 \001(\t\0224\n\013legacy_abac\030" - + "\022 \001(\0132\037.google.container.v1.LegacyAbac\022:" - + "\n\016network_policy\030\023 \001(\0132\".google.containe" - + "r.v1.NetworkPolicy\022E\n\024ip_allocation_poli" - + "cy\030\024 \001(\0132\'.google.container.v1.IPAllocat" - + "ionPolicy\022^\n!master_authorized_networks_" - + "config\030\026 \001(\01323.google.container.v1.Maste" - + "rAuthorizedNetworksConfig\022B\n\022maintenance" - + "_policy\030\027 \001(\0132&.google.container.v1.Main" - + "tenancePolicy\022F\n\024binary_authorization\030\030 " - + "\001(\0132(.google.container.v1.BinaryAuthoriz" - + "ation\022<\n\013autoscaling\030\032 \001(\0132\'.google.cont" - + "ainer.v1.ClusterAutoscaling\022:\n\016network_c" - + "onfig\030\033 \001(\0132\".google.container.v1.Networ" - + "kConfig\022K\n\033default_max_pods_constraint\030\036" - + " \001(\0132&.google.container.v1.MaxPodsConstr" - + "aint\022T\n\034resource_usage_export_config\030! \001" - + "(\0132..google.container.v1.ResourceUsageEx" - + "portConfig\022S\n\033authenticator_groups_confi" - + "g\030\" \001(\0132..google.container.v1.Authentica" - + "torGroupsConfig\022I\n\026private_cluster_confi" - + "g\030% \001(\0132).google.container.v1.PrivateClu" - + "sterConfig\022D\n\023database_encryption\030& \001(\0132" - + "\'.google.container.v1.DatabaseEncryption" - + "\022M\n\030vertical_pod_autoscaling\030\' \001(\0132+.goo" - + "gle.container.v1.VerticalPodAutoscaling\022" - + ":\n\016shielded_nodes\030( \001(\0132\".google.contain" - + "er.v1.ShieldedNodes\022<\n\017release_channel\030)" - + " \001(\0132#.google.container.v1.ReleaseChanne" - + "l\022M\n\030workload_identity_config\030+ \001(\0132+.go" - + "ogle.container.v1.WorkloadIdentityConfig" - + "\022@\n\021mesh_certificates\030C \001(\0132%.google.con" - + "tainer.v1.MeshCertificates\022I\n\026cost_manag" - + "ement_config\030- \001(\0132).google.container.v1" - + ".CostManagementConfig\022D\n\023notification_co" - + "nfig\0301 \001(\0132\'.google.container.v1.Notific" - + "ationConfig\022B\n\022confidential_nodes\0302 \001(\0132" - + "&.google.container.v1.ConfidentialNodes\022" - + "K\n\027identity_service_config\0306 \001(\0132*.googl" - + "e.container.v1.IdentityServiceConfig\022\021\n\t" - + "self_link\030d \001(\t\022\020\n\004zone\030e \001(\tB\002\030\001\022\020\n\010end" - + "point\030f \001(\t\022\037\n\027initial_cluster_version\030g" - + " \001(\t\022\036\n\026current_master_version\030h \001(\t\022 \n\024" - + "current_node_version\030i \001(\tB\002\030\001\022\023\n\013create" - + "_time\030j \001(\t\0223\n\006status\030k \001(\0162#.google.con" - + "tainer.v1.Cluster.Status\022\032\n\016status_messa" - + "ge\030l \001(\tB\002\030\001\022\033\n\023node_ipv4_cidr_size\030m \001(" - + "\005\022\032\n\022services_ipv4_cidr\030n \001(\t\022\037\n\023instanc" - + "e_group_urls\030o \003(\tB\002\030\001\022\036\n\022current_node_c" - + "ount\030p \001(\005B\002\030\001\022\023\n\013expire_time\030q \001(\t\022\020\n\010l" - + "ocation\030r \001(\t\022\022\n\nenable_tpu\030s \001(\010\022\033\n\023tpu" - + "_ipv4_cidr_block\030t \001(\t\0228\n\nconditions\030v \003" - + "(\0132$.google.container.v1.StatusCondition" - + "\0222\n\tautopilot\030\200\001 \001(\0132\036.google.container." - + "v1.Autopilot\022\020\n\002id\030\201\001 \001(\tB\003\340A\003\022G\n\022node_p" - + "ool_defaults\030\203\001 \001(\0132%.google.container.v" - + "1.NodePoolDefaultsH\000\210\001\001\022;\n\016logging_confi" - + "g\030\204\001 \001(\0132\".google.container.v1.LoggingCo" - + "nfig\022A\n\021monitoring_config\030\205\001 \001(\0132%.googl" - + "e.container.v1.MonitoringConfig\022G\n\025node_" - + "pool_auto_config\030\210\001 \001(\0132\'.google.contain" - + "er.v1.NodePoolAutoConfig\022\r\n\004etag\030\213\001 \001(\t\022" - + "*\n\005fleet\030\214\001 \001(\0132\032.google.container.v1.Fl" - + "eet\022L\n\027security_posture_config\030\221\001 \001(\0132*." - + "google.container.v1.SecurityPostureConfi" - + "g\022D\n\024enable_k8s_beta_apis\030\217\001 \001(\0132%.googl" - + "e.container.v1.K8sBetaAPIConfig\022A\n\021enter" - + "prise_config\030\225\001 \001(\0132%.google.container.v" - + "1.EnterpriseConfig\0325\n\023ResourceLabelsEntr" - + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"w\n\006Sta" - + "tus\022\026\n\022STATUS_UNSPECIFIED\020\000\022\020\n\014PROVISION" - + "ING\020\001\022\013\n\007RUNNING\020\002\022\017\n\013RECONCILING\020\003\022\014\n\010S" - + "TOPPING\020\004\022\t\n\005ERROR\020\005\022\014\n\010DEGRADED\020\006B\025\n\023_n" - + "ode_pool_defaults\"(\n\020K8sBetaAPIConfig\022\024\n" - + "\014enabled_apis\030\001 \003(\t\"\236\003\n\025SecurityPostureC" - + "onfig\022B\n\004mode\030\001 \001(\0162/.google.container.v" - + "1.SecurityPostureConfig.ModeH\000\210\001\001\022]\n\022vul" - + "nerability_mode\030\002 \001(\0162<.google.container" - + ".v1.SecurityPostureConfig.VulnerabilityM" - + "odeH\001\210\001\001\"5\n\004Mode\022\024\n\020MODE_UNSPECIFIED\020\000\022\014" - + "\n\010DISABLED\020\001\022\t\n\005BASIC\020\002\"\212\001\n\021Vulnerabilit" - + "yMode\022\"\n\036VULNERABILITY_MODE_UNSPECIFIED\020" - + "\000\022\032\n\026VULNERABILITY_DISABLED\020\001\022\027\n\023VULNERA" - + "BILITY_BASIC\020\002\022\034\n\030VULNERABILITY_ENTERPRI" - + "SE\020\003B\007\n\005_modeB\025\n\023_vulnerability_mode\"\225\001\n" - + "\022NodePoolAutoConfig\0226\n\014network_tags\030\001 \001(" - + "\0132 .google.container.v1.NetworkTags\022G\n\025r" - + "esource_manager_tags\030\002 \001(\0132(.google.cont" - + "ainer.v1.ResourceManagerTags\"Y\n\020NodePool" - + "Defaults\022E\n\024node_config_defaults\030\001 \001(\0132\'" - + ".google.container.v1.NodeConfigDefaults\"" - + "\216\001\n\022NodeConfigDefaults\0224\n\013gcfs_config\030\001 " - + "\001(\0132\037.google.container.v1.GcfsConfig\022B\n\016" - + "logging_config\030\003 \001(\0132*.google.container." - + "v1.NodePoolLoggingConfig\"\230\037\n\rClusterUpda" - + "te\022\034\n\024desired_node_version\030\004 \001(\t\022\"\n\032desi" - + "red_monitoring_service\030\005 \001(\t\022@\n\025desired_" - + "addons_config\030\006 \001(\0132!.google.container.v" - + "1.AddonsConfig\022\034\n\024desired_node_pool_id\030\007" - + " \001(\t\022\032\n\022desired_image_type\030\010 \001(\t\022L\n\033desi" - + "red_database_encryption\030. \001(\0132\'.google.c" - + "ontainer.v1.DatabaseEncryption\022U\n desire" - + "d_workload_identity_config\030/ \001(\0132+.googl" - + "e.container.v1.WorkloadIdentityConfig\022H\n" - + "\031desired_mesh_certificates\030C \001(\0132%.googl" - + "e.container.v1.MeshCertificates\022B\n\026desir" - + "ed_shielded_nodes\0300 \001(\0132\".google.contain" - + "er.v1.ShieldedNodes\022Q\n\036desired_cost_mana" - + "gement_config\0301 \001(\0132).google.container.v" - + "1.CostManagementConfig\022:\n\022desired_dns_co" - + "nfig\0305 \001(\0132\036.google.container.v1.DNSConf" - + "ig\022O\n\035desired_node_pool_autoscaling\030\t \001(" - + "\0132(.google.container.v1.NodePoolAutoscal" - + "ing\022\031\n\021desired_locations\030\n \003(\t\022f\n)desire" - + "d_master_authorized_networks_config\030\014 \001(" - + "\01323.google.container.v1.MasterAuthorized" - + "NetworksConfig\022L\n\033desired_cluster_autosc" - + "aling\030\017 \001(\0132\'.google.container.v1.Cluste" - + "rAutoscaling\022N\n\034desired_binary_authoriza" - + "tion\030\020 \001(\0132(.google.container.v1.BinaryA" - + "uthorization\022\037\n\027desired_logging_service\030" - + "\023 \001(\t\022\\\n$desired_resource_usage_export_c" - + "onfig\030\025 \001(\0132..google.container.v1.Resour" - + "ceUsageExportConfig\022U\n desired_vertical_" - + "pod_autoscaling\030\026 \001(\0132+.google.container" - + ".v1.VerticalPodAutoscaling\022Q\n\036desired_pr" - + "ivate_cluster_config\030\031 \001(\0132).google.cont" - + "ainer.v1.PrivateClusterConfig\022\\\n$desired" - + "_intra_node_visibility_config\030\032 \001(\0132..go" - + "ogle.container.v1.IntraNodeVisibilityCon" - + "fig\022K\n\033desired_default_snat_status\030\034 \001(\013" - + "2&.google.container.v1.DefaultSnatStatus" - + "\022D\n\027desired_release_channel\030\037 \001(\0132#.goog" - + "le.container.v1.ReleaseChannel\022Q\n\037desire" - + "d_l4ilb_subsetting_config\030\' \001(\0132(.google" - + ".container.v1.ILBSubsettingConfig\022H\n\031des" - + "ired_datapath_provider\0302 \001(\0162%.google.co" - + "ntainer.v1.DatapathProvider\022X\n\"desired_p" - + "rivate_ipv6_google_access\0303 \001(\0162,.google" - + ".container.v1.PrivateIPv6GoogleAccess\022L\n" - + "\033desired_notification_config\0307 \001(\0132\'.goo" - + "gle.container.v1.NotificationConfig\022[\n#d" - + "esired_authenticator_groups_config\030? \001(\013" - + "2..google.container.v1.AuthenticatorGrou" - + "psConfig\022B\n\026desired_logging_config\030@ \001(\013", - "2\".google.container.v1.LoggingConfig\022H\n\031" - + "desired_monitoring_config\030A \001(\0132%.google" - + ".container.v1.MonitoringConfig\022S\n\037desire" - + "d_identity_service_config\030B \001(\0132*.google" - + ".container.v1.IdentityServiceConfig\022Z\n#d" - + "esired_service_external_ips_config\030< \001(\013" - + "2-.google.container.v1.ServiceExternalIP" - + "sConfig\022,\n\037desired_enable_private_endpoi" - + "nt\030G \001(\010H\000\210\001\001\022\036\n\026desired_master_version\030" - + "d \001(\t\022<\n\023desired_gcfs_config\030m \001(\0132\037.goo" - + "gle.container.v1.GcfsConfig\022T\n*desired_n" - + "ode_pool_auto_config_network_tags\030n \001(\0132" - + " .google.container.v1.NetworkTags\022I\n\032des" - + "ired_gateway_api_config\030r \001(\0132%.google.c" - + "ontainer.v1.GatewayAPIConfig\022\014\n\004etag\030s \001" - + "(\t\022T\n desired_node_pool_logging_config\030t" - + " \001(\0132*.google.container.v1.NodePoolLoggi" - + "ngConfig\0221\n\rdesired_fleet\030u \001(\0132\032.google" - + ".container.v1.Fleet\022:\n\022desired_stack_typ" - + "e\030w \001(\0162\036.google.container.v1.StackType\022" - + "T\n\034additional_pod_ranges_config\030x \001(\0132.." - + "google.container.v1.AdditionalPodRangesC" - + "onfig\022\\\n$removed_additional_pod_ranges_c" - + "onfig\030y \001(\0132..google.container.v1.Additi" - + "onalPodRangesConfig\022C\n\024enable_k8s_beta_a" - + "pis\030z \001(\0132%.google.container.v1.K8sBetaA" - + "PIConfig\022S\n\037desired_security_posture_con" - + "fig\030| \001(\0132*.google.container.v1.Security" - + "PostureConfig\022n\n\"desired_network_perform" - + "ance_config\030} \001(\0132B.google.container.v1." - + "NetworkConfig.ClusterNetworkPerformanceC" - + "onfig\022/\n\"desired_enable_fqdn_network_pol" - + "icy\030~ \001(\010H\001\210\001\001\022\\\n(desired_autopilot_work" - + "load_policy_config\030\200\001 \001(\0132).google.conta" - + "iner.v1.WorkloadPolicyConfig\022E\n\025desired_" - + "k8s_beta_apis\030\203\001 \001(\0132%.google.container." - + "v1.K8sBetaAPIConfig\022-\n\037desired_enable_mu" - + "lti_networking\030\207\001 \001(\010H\002\210\001\001\022f\n3desired_no" - + "de_pool_auto_config_resource_manager_tag" - + "s\030\210\001 \001(\0132(.google.container.v1.ResourceM" - + "anagerTags\022b\n$desired_in_transit_encrypt" - + "ion_config\030\211\001 \001(\0162..google.container.v1." - + "InTransitEncryptionConfigH\003\210\001\001\022>\n0desire" - + "d_enable_cilium_clusterwide_network_poli" - + "cy\030\212\001 \001(\010H\004\210\001\001B\"\n _desired_enable_privat" - + "e_endpointB%\n#_desired_enable_fqdn_netwo" - + "rk_policyB\"\n _desired_enable_multi_netwo" - + "rkingB\'\n%_desired_in_transit_encryption_" - + "configB3\n1_desired_enable_cilium_cluster" - + "wide_network_policy\"q\n\031AdditionalPodRang" - + "esConfig\022\027\n\017pod_range_names\030\001 \003(\t\022;\n\016pod" - + "_range_info\030\002 \003(\0132\036.google.container.v1." - + "RangeInfoB\003\340A\003\">\n\tRangeInfo\022\027\n\nrange_nam" - + "e\030\001 \001(\tB\003\340A\003\022\030\n\013utilization\030\002 \001(\001B\003\340A\003\"\264" - + "\010\n\tOperation\022\014\n\004name\030\001 \001(\t\022\020\n\004zone\030\002 \001(\t" - + "B\002\030\001\022;\n\016operation_type\030\003 \001(\0162#.google.co" - + "ntainer.v1.Operation.Type\0225\n\006status\030\004 \001(" - + "\0162%.google.container.v1.Operation.Status" - + "\022\016\n\006detail\030\010 \001(\t\022\035\n\016status_message\030\005 \001(\t" - + "B\005\030\001\340A\003\022\021\n\tself_link\030\006 \001(\t\022\023\n\013target_lin" - + "k\030\007 \001(\t\022\020\n\010location\030\t \001(\t\022\022\n\nstart_time\030" - + "\n \001(\t\022\020\n\010end_time\030\013 \001(\t\022=\n\010progress\030\014 \001(" - + "\0132&.google.container.v1.OperationProgres" - + "sB\003\340A\003\022D\n\022cluster_conditions\030\r \003(\0132$.goo" - + "gle.container.v1.StatusConditionB\002\030\001\022E\n\023" - + "nodepool_conditions\030\016 \003(\0132$.google.conta" - + "iner.v1.StatusConditionB\002\030\001\022!\n\005error\030\017 \001" - + "(\0132\022.google.rpc.Status\"R\n\006Status\022\026\n\022STAT" - + "US_UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\013\n\007RUNNING" - + "\020\002\022\010\n\004DONE\020\003\022\014\n\010ABORTING\020\004\"\300\003\n\004Type\022\024\n\020T" - + "YPE_UNSPECIFIED\020\000\022\022\n\016CREATE_CLUSTER\020\001\022\022\n" - + "\016DELETE_CLUSTER\020\002\022\022\n\016UPGRADE_MASTER\020\003\022\021\n" - + "\rUPGRADE_NODES\020\004\022\022\n\016REPAIR_CLUSTER\020\005\022\022\n\016" - + "UPDATE_CLUSTER\020\006\022\024\n\020CREATE_NODE_POOL\020\007\022\024" - + "\n\020DELETE_NODE_POOL\020\010\022\034\n\030SET_NODE_POOL_MA" - + "NAGEMENT\020\t\022\025\n\021AUTO_REPAIR_NODES\020\n\022\032\n\022AUT" - + "O_UPGRADE_NODES\020\013\032\002\010\001\022\022\n\nSET_LABELS\020\014\032\002\010" - + "\001\022\027\n\017SET_MASTER_AUTH\020\r\032\002\010\001\022\026\n\022SET_NODE_P" - + "OOL_SIZE\020\016\022\032\n\022SET_NETWORK_POLICY\020\017\032\002\010\001\022\036" - + "\n\026SET_MAINTENANCE_POLICY\020\020\032\002\010\001\022\022\n\016RESIZE" - + "_CLUSTER\020\022\022\031\n\025FLEET_FEATURE_UPGRADE\020\023\"\273\002" - + "\n\021OperationProgress\022\014\n\004name\030\001 \001(\t\0225\n\006sta" - + "tus\030\002 \001(\0162%.google.container.v1.Operatio" - + "n.Status\022>\n\007metrics\030\003 \003(\0132-.google.conta" - + "iner.v1.OperationProgress.Metric\0226\n\006stag" - + "es\030\004 \003(\0132&.google.container.v1.Operation" - + "Progress\032i\n\006Metric\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\023\n" - + "\tint_value\030\002 \001(\003H\000\022\026\n\014double_value\030\003 \001(\001" - + "H\000\022\026\n\014string_value\030\004 \001(\tH\000B\007\n\005value\"\204\001\n\024" - + "CreateClusterRequest\022\026\n\nproject_id\030\001 \001(\t" - + "B\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\0222\n\007cluster\030\003 \001(\0132" - + "\034.google.container.v1.ClusterB\003\340A\002\022\016\n\006pa" - + "rent\030\005 \001(\t\"c\n\021GetClusterRequest\022\026\n\nproje" - + "ct_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\nclu" - + "ster_id\030\003 \001(\tB\002\030\001\022\014\n\004name\030\005 \001(\t\"\237\001\n\024Upda" - + "teClusterRequest\022\026\n\nproject_id\030\001 \001(\tB\002\030\001" - + "\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(\tB\002" - + "\030\001\0227\n\006update\030\004 \001(\0132\".google.container.v1" - + ".ClusterUpdateB\003\340A\002\022\014\n\004name\030\005 \001(\t\"\323\n\n\025Up" - + "dateNodePoolRequest\022\026\n\nproject_id\030\001 \001(\tB" - + "\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(" - + "\tB\002\030\001\022\030\n\014node_pool_id\030\004 \001(\tB\002\030\001\022\031\n\014node_" - + "version\030\005 \001(\tB\003\340A\002\022\027\n\nimage_type\030\006 \001(\tB\003" - + "\340A\002\022\014\n\004name\030\010 \001(\t\022\021\n\tlocations\030\r \003(\t\022M\n\030" - + "workload_metadata_config\030\016 \001(\0132+.google." - + "container.v1.WorkloadMetadataConfig\022G\n\020u" - + "pgrade_settings\030\017 \001(\0132-.google.container" - + ".v1.NodePool.UpgradeSettings\022.\n\004tags\030\020 \001" - + "(\0132 .google.container.v1.NetworkTags\022/\n\006" - + "taints\030\021 \001(\0132\037.google.container.v1.NodeT" - + "aints\022/\n\006labels\030\022 \001(\0132\037.google.container" - + ".v1.NodeLabels\022?\n\021linux_node_config\030\023 \001(" - + "\0132$.google.container.v1.LinuxNodeConfig\022" - + ">\n\016kubelet_config\030\024 \001(\0132&.google.contain" - + "er.v1.NodeKubeletConfig\022C\n\023node_network_" - + "config\030\025 \001(\0132&.google.container.v1.NodeN" - + "etworkConfig\0224\n\013gcfs_config\030\026 \001(\0132\037.goog" - + "le.container.v1.GcfsConfig\022B\n\022confidenti" - + "al_nodes\030\027 \001(\0132&.google.container.v1.Con" - + "fidentialNodes\022.\n\005gvnic\030\035 \001(\0132\037.google.c" - + "ontainer.v1.VirtualNIC\022\014\n\004etag\030\036 \001(\t\0224\n\013" - + "fast_socket\030\037 \001(\0132\037.google.container.v1." - + "FastSocket\022B\n\016logging_config\030 \001(\0132*.goo" - + "gle.container.v1.NodePoolLoggingConfig\022<" - + "\n\017resource_labels\030! \001(\0132#.google.contain" - + "er.v1.ResourceLabels\022C\n\023windows_node_con" - + "fig\030\" \001(\0132&.google.container.v1.WindowsN" - + "odeConfig\022\031\n\014machine_type\030$ \001(\tB\003\340A\001\022\026\n\t" - + "disk_type\030% \001(\tB\003\340A\001\022\031\n\014disk_size_gb\030& \001" - + "(\003B\003\340A\001\022G\n\025resource_manager_tags\030\' \001(\0132(" + + "r.v1.LinuxNodeConfig.CgroupMode\022Q\n\thugep" + + "ages\030\003 \001(\01324.google.container.v1.LinuxNo" + + "deConfig.HugepagesConfigB\003\340A\001H\000\210\001\001\032\177\n\017Hu" + + "gepagesConfig\022!\n\017hugepage_size2m\030\001 \001(\005B\003" + + "\340A\001H\000\210\001\001\022!\n\017hugepage_size1g\030\002 \001(\005B\003\340A\001H\001" + + "\210\001\001B\022\n\020_hugepage_size2mB\022\n\020_hugepage_siz" + + "e1g\032.\n\014SysctlsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\"Q\n\nCgroupMode\022\033\n\027CGROUP_MODE" + + "_UNSPECIFIED\020\000\022\022\n\016CGROUP_MODE_V1\020\001\022\022\n\016CG" + + "ROUP_MODE_V2\020\002B\014\n\n_hugepages\"\264\001\n\021Windows" + + "NodeConfig\022D\n\nos_version\030\001 \001(\01620.google." + + "container.v1.WindowsNodeConfig.OSVersion" + + "\"Y\n\tOSVersion\022\032\n\026OS_VERSION_UNSPECIFIED\020" + + "\000\022\027\n\023OS_VERSION_LTSC2019\020\001\022\027\n\023OS_VERSION" + + "_LTSC2022\020\002\"\370\001\n\021NodeKubeletConfig\022\032\n\022cpu" + + "_manager_policy\030\001 \001(\t\0221\n\rcpu_cfs_quota\030\002" + + " \001(\0132\032.google.protobuf.BoolValue\022\034\n\024cpu_" + + "cfs_quota_period\030\003 \001(\t\022\026\n\016pod_pids_limit" + + "\030\004 \001(\003\0223\n&insecure_kubelet_readonly_port" + + "_enabled\030\007 \001(\010H\000\210\001\001B)\n\'_insecure_kubelet" + + "_readonly_port_enabled\"\346\021\n\nNodeConfig\022\024\n" + + "\014machine_type\030\001 \001(\t\022\024\n\014disk_size_gb\030\002 \001(" + + "\005\022\024\n\014oauth_scopes\030\003 \003(\t\022\027\n\017service_accou" + + "nt\030\t \001(\t\022?\n\010metadata\030\004 \003(\0132-.google.cont" + + "ainer.v1.NodeConfig.MetadataEntry\022\022\n\nima" + + "ge_type\030\005 \001(\t\022;\n\006labels\030\006 \003(\0132+.google.c" + + "ontainer.v1.NodeConfig.LabelsEntry\022\027\n\017lo" + + "cal_ssd_count\030\007 \001(\005\022\014\n\004tags\030\010 \003(\t\022\023\n\013pre" + + "emptible\030\n \001(\010\022<\n\014accelerators\030\013 \003(\0132&.g" + + "oogle.container.v1.AcceleratorConfig\022\021\n\t" + + "disk_type\030\014 \001(\t\022\030\n\020min_cpu_platform\030\r \001(" + + "\t\022M\n\030workload_metadata_config\030\016 \001(\0132+.go" + + "ogle.container.v1.WorkloadMetadataConfig" + + "\022.\n\006taints\030\017 \003(\0132\036.google.container.v1.N" + + "odeTaint\022:\n\016sandbox_config\030\021 \001(\0132\".googl" + + "e.container.v1.SandboxConfig\022\022\n\nnode_gro" + + "up\030\022 \001(\t\022F\n\024reservation_affinity\030\023 \001(\0132(" + + ".google.container.v1.ReservationAffinity" + + "\022M\n\030shielded_instance_config\030\024 \001(\0132+.goo" + + "gle.container.v1.ShieldedInstanceConfig\022" + + "?\n\021linux_node_config\030\025 \001(\0132$.google.cont" + + "ainer.v1.LinuxNodeConfig\022>\n\016kubelet_conf" + + "ig\030\026 \001(\0132&.google.container.v1.NodeKubel" + + "etConfig\022\031\n\021boot_disk_kms_key\030\027 \001(\t\0224\n\013g" + + "cfs_config\030\031 \001(\0132\037.google.container.v1.G" + + "cfsConfig\022O\n\031advanced_machine_features\030\032" + + " \001(\0132,.google.container.v1.AdvancedMachi" + + "neFeatures\022.\n\005gvnic\030\035 \001(\0132\037.google.conta" + + "iner.v1.VirtualNIC\022\014\n\004spot\030 \001(\010\022B\n\022conf" + + "idential_nodes\030# \001(\0132&.google.container." + + "v1.ConfidentialNodes\0229\n\013fast_socket\030$ \001(" + + "\0132\037.google.container.v1.FastSocketH\000\210\001\001\022" + + "L\n\017resource_labels\030% \003(\01323.google.contai" + + "ner.v1.NodeConfig.ResourceLabelsEntry\022B\n" + + "\016logging_config\030& \001(\0132*.google.container" + + ".v1.NodePoolLoggingConfig\022C\n\023windows_nod" + + "e_config\030\' \001(\0132&.google.container.v1.Win" + + "dowsNodeConfig\022Q\n\033local_nvme_ssd_block_c" + + "onfig\030( \001(\0132,.google.container.v1.LocalN" + + "vmeSsdBlockConfig\022_\n\"ephemeral_storage_l" + + "ocal_ssd_config\030) \001(\01323.google.container" + + ".v1.EphemeralStorageLocalSsdConfig\022A\n\022so" + + "le_tenant_config\030* \001(\0132%.google.containe" + + "r.v1.SoleTenantConfig\022@\n\021containerd_conf" + + "ig\030+ \001(\0132%.google.container.v1.Container" + + "dConfig\022G\n\025resource_manager_tags\030- \001(\0132(" + ".google.container.v1.ResourceManagerTags" - + "\022M\n\023queued_provisioning\030* \001(\01320.google.c" - + "ontainer.v1.NodePool.QueuedProvisioning\"" - + "\315\001\n\035SetNodePoolAutoscalingRequest\022\026\n\npro" - + "ject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\nc" - + "luster_id\030\003 \001(\tB\002\030\001\022\030\n\014node_pool_id\030\004 \001(" - + "\tB\002\030\001\022B\n\013autoscaling\030\005 \001(\0132(.google.cont" - + "ainer.v1.NodePoolAutoscalingB\003\340A\002\022\014\n\004nam" - + "e\030\006 \001(\t\"\210\001\n\030SetLoggingServiceRequest\022\026\n\n" - + "project_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026" - + "\n\ncluster_id\030\003 \001(\tB\002\030\001\022\034\n\017logging_servic" - + "e\030\004 \001(\tB\003\340A\002\022\014\n\004name\030\005 \001(\t\"\216\001\n\033SetMonito" - + "ringServiceRequest\022\026\n\nproject_id\030\001 \001(\tB\002" - + "\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(\t" - + "B\002\030\001\022\037\n\022monitoring_service\030\004 \001(\tB\003\340A\002\022\014\n" - + "\004name\030\006 \001(\t\"\247\001\n\026SetAddonsConfigRequest\022\026" - + "\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001" - + "\022\026\n\ncluster_id\030\003 \001(\tB\002\030\001\022=\n\raddons_confi" - + "g\030\004 \001(\0132!.google.container.v1.AddonsConf" - + "igB\003\340A\002\022\014\n\004name\030\006 \001(\t\"}\n\023SetLocationsReq" - + "uest\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001" - + "(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(\tB\002\030\001\022\026\n\tlocati" - + "ons\030\004 \003(\tB\003\340A\002\022\014\n\004name\030\006 \001(\t\"\202\001\n\023UpdateM" - + "asterRequest\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004" - + "zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(\tB\002\030\001\022\033" - + "\n\016master_version\030\004 \001(\tB\003\340A\002\022\014\n\004name\030\007 \001(" - + "\t\"\265\002\n\024SetMasterAuthRequest\022\026\n\nproject_id" - + "\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_" - + "id\030\003 \001(\tB\002\030\001\022E\n\006action\030\004 \001(\01620.google.co" - + "ntainer.v1.SetMasterAuthRequest.ActionB\003" - + "\340A\002\0224\n\006update\030\005 \001(\0132\037.google.container.v" - + "1.MasterAuthB\003\340A\002\022\014\n\004name\030\007 \001(\t\"P\n\006Actio" - + "n\022\013\n\007UNKNOWN\020\000\022\020\n\014SET_PASSWORD\020\001\022\025\n\021GENE" - + "RATE_PASSWORD\020\002\022\020\n\014SET_USERNAME\020\003\"f\n\024Del" - + "eteClusterRequest\022\026\n\nproject_id\030\001 \001(\tB\002\030" - + "\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(\tB" - + "\002\030\001\022\014\n\004name\030\004 \001(\t\"O\n\023ListClustersRequest" + + "\022(\n\033enable_confidential_storage\030. \001(\010B\003\340" + + "A\001\022D\n\024secondary_boot_disks\0300 \003(\0132&.googl" + + "e.container.v1.SecondaryBootDisk\022f\n#seco" + + "ndary_boot_disk_update_strategy\0302 \001(\01324." + + "google.container.v1.SecondaryBootDiskUpd" + + "ateStrategyH\001\210\001\001\032/\n\rMetadataEntry\022\013\n\003key" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032-\n\013LabelsEntry" + + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0325\n\023Reso" + + "urceLabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\t:\0028\001B\016\n\014_fast_socketB&\n$_secondary_bo" + + "ot_disk_update_strategy\"\231\001\n\027AdvancedMach" + + "ineFeatures\022\035\n\020threads_per_core\030\001 \001(\003H\000\210" + + "\001\001\022)\n\034enable_nested_virtualization\030\002 \001(\010" + + "H\001\210\001\001B\023\n\021_threads_per_coreB\037\n\035_enable_ne" + + "sted_virtualization\"\263\006\n\021NodeNetworkConfi" + + "g\022\035\n\020create_pod_range\030\004 \001(\010B\003\340A\004\022\021\n\tpod_" + + "range\030\005 \001(\t\022\033\n\023pod_ipv4_cidr_block\030\006 \001(\t" + + "\022!\n\024enable_private_nodes\030\t \001(\010H\000\210\001\001\022h\n\032n" + + "etwork_performance_config\030\013 \001(\0132?.google" + + ".container.v1.NodeNetworkConfig.NetworkP" + + "erformanceConfigH\001\210\001\001\022V\n\035pod_cidr_overpr" + + "ovision_config\030\r \001(\0132/.google.container." + + "v1.PodCIDROverprovisionConfig\022Y\n\037additio" + + "nal_node_network_configs\030\016 \003(\01320.google." + + "container.v1.AdditionalNodeNetworkConfig" + + "\022W\n\036additional_pod_network_configs\030\017 \003(\013" + + "2/.google.container.v1.AdditionalPodNetw" + + "orkConfig\022\'\n\032pod_ipv4_range_utilization\030" + + "\020 \001(\001B\003\340A\003\032\324\001\n\030NetworkPerformanceConfig\022" + + "n\n\033total_egress_bandwidth_tier\030\001 \001(\0162D.g" + + "oogle.container.v1.NodeNetworkConfig.Net" + + "workPerformanceConfig.TierH\000\210\001\001\"(\n\004Tier\022" + + "\024\n\020TIER_UNSPECIFIED\020\000\022\n\n\006TIER_1\020\001B\036\n\034_to" + + "tal_egress_bandwidth_tierB\027\n\025_enable_pri" + + "vate_nodesB\035\n\033_network_performance_confi" + + "g\"B\n\033AdditionalNodeNetworkConfig\022\017\n\007netw" + + "ork\030\001 \001(\t\022\022\n\nsubnetwork\030\002 \001(\t\"\253\001\n\032Additi" + + "onalPodNetworkConfig\022\022\n\nsubnetwork\030\001 \001(\t" + + "\022\033\n\023secondary_pod_range\030\002 \001(\t\022F\n\021max_pod" + + "s_per_node\030\003 \001(\0132&.google.container.v1.M" + + "axPodsConstraintH\000\210\001\001B\024\n\022_max_pods_per_n" + + "ode\"Y\n\026ShieldedInstanceConfig\022\032\n\022enable_" + + "secure_boot\030\001 \001(\010\022#\n\033enable_integrity_mo" + + "nitoring\030\002 \001(\010\"k\n\rSandboxConfig\0225\n\004type\030" + + "\002 \001(\0162\'.google.container.v1.SandboxConfi" + + "g.Type\"#\n\004Type\022\017\n\013UNSPECIFIED\020\000\022\n\n\006GVISO" + + "R\020\001\"\035\n\nGcfsConfig\022\017\n\007enabled\030\001 \001(\010\"\337\001\n\023R" + + "eservationAffinity\022O\n\030consume_reservatio" + + "n_type\030\001 \001(\0162-.google.container.v1.Reser" + + "vationAffinity.Type\022\013\n\003key\030\002 \001(\t\022\016\n\006valu" + + "es\030\003 \003(\t\"Z\n\004Type\022\017\n\013UNSPECIFIED\020\000\022\022\n\016NO_" + + "RESERVATION\020\001\022\023\n\017ANY_RESERVATION\020\002\022\030\n\024SP" + + "ECIFIC_RESERVATION\020\003\"\226\002\n\020SoleTenantConfi" + + "g\022K\n\017node_affinities\030\001 \003(\01322.google.cont" + + "ainer.v1.SoleTenantConfig.NodeAffinity\032\264" + + "\001\n\014NodeAffinity\022\013\n\003key\030\001 \001(\t\022M\n\010operator" + + "\030\002 \001(\0162;.google.container.v1.SoleTenantC" + + "onfig.NodeAffinity.Operator\022\016\n\006values\030\003 " + + "\003(\t\"8\n\010Operator\022\030\n\024OPERATOR_UNSPECIFIED\020" + + "\000\022\006\n\002IN\020\001\022\n\n\006NOT_IN\020\002\"\374\004\n\020ContainerdConf" + + "ig\022i\n\036private_registry_access_config\030\001 \001" + + "(\0132A.google.container.v1.ContainerdConfi" + + "g.PrivateRegistryAccessConfig\032\374\003\n\033Privat" + + "eRegistryAccessConfig\022\017\n\007enabled\030\001 \001(\010\022\217" + + "\001\n#certificate_authority_domain_config\030\002" + + " \003(\0132b.google.container.v1.ContainerdCon" + + "fig.PrivateRegistryAccessConfig.Certific" + + "ateAuthorityDomainConfig\032\271\002\n Certificate" + + "AuthorityDomainConfig\022\r\n\005fqdns\030\001 \003(\t\022\266\001\n" + + "%gcp_secret_manager_certificate_config\030\002" + + " \001(\0132\204\001.google.container.v1.ContainerdCo" + + "nfig.PrivateRegistryAccessConfig.Certifi" + + "cateAuthorityDomainConfig.GCPSecretManag" + + "erCertificateConfigH\000\0327\n!GCPSecretManage" + + "rCertificateConfig\022\022\n\nsecret_uri\030\001 \001(\tB\024" + + "\n\022certificate_config\"\271\001\n\tNodeTaint\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\0225\n\006effect\030\003 \001(\0162%" + + ".google.container.v1.NodeTaint.Effect\"Y\n" + + "\006Effect\022\026\n\022EFFECT_UNSPECIFIED\020\000\022\017\n\013NO_SC" + + "HEDULE\020\001\022\026\n\022PREFER_NO_SCHEDULE\020\002\022\016\n\nNO_E" + + "XECUTE\020\003\"<\n\nNodeTaints\022.\n\006taints\030\001 \003(\0132\036" + + ".google.container.v1.NodeTaint\"x\n\nNodeLa" + + "bels\022;\n\006labels\030\001 \003(\0132+.google.container." + + "v1.NodeLabels.LabelsEntry\032-\n\013LabelsEntry" + + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\200\001\n\016Res" + + "ourceLabels\022?\n\006labels\030\001 \003(\0132/.google.con" + + "tainer.v1.ResourceLabels.LabelsEntry\032-\n\013" + + "LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + + "\0028\001\"\033\n\013NetworkTags\022\014\n\004tags\030\001 \003(\t\"\331\001\n\nMas" + + "terAuth\022\024\n\010username\030\001 \001(\tB\002\030\001\022\024\n\010passwor" + + "d\030\002 \001(\tB\002\030\001\022O\n\031client_certificate_config" + + "\030\003 \001(\0132,.google.container.v1.ClientCerti" + + "ficateConfig\022\036\n\026cluster_ca_certificate\030d" + + " \001(\t\022\032\n\022client_certificate\030e \001(\t\022\022\n\nclie" + + "nt_key\030f \001(\t\";\n\027ClientCertificateConfig\022" + + " \n\030issue_client_certificate\030\001 \001(\010\"\254\007\n\014Ad" + + "donsConfig\022C\n\023http_load_balancing\030\001 \001(\0132" + + "&.google.container.v1.HttpLoadBalancing\022" + + "Q\n\032horizontal_pod_autoscaling\030\002 \001(\0132-.go" + + "ogle.container.v1.HorizontalPodAutoscali" + + "ng\022J\n\024kubernetes_dashboard\030\003 \001(\0132(.googl" + + "e.container.v1.KubernetesDashboardB\002\030\001\022G" + + "\n\025network_policy_config\030\004 \001(\0132(.google.c" + + "ontainer.v1.NetworkPolicyConfig\022=\n\020cloud" + + "_run_config\030\007 \001(\0132#.google.container.v1." + + "CloudRunConfig\022=\n\020dns_cache_config\030\010 \001(\013" + + "2#.google.container.v1.DnsCacheConfig\022K\n" + + "\027config_connector_config\030\n \001(\0132*.google." + + "container.v1.ConfigConnectorConfig\022d\n%gc" + + "e_persistent_disk_csi_driver_config\030\013 \001(" + + "\01325.google.container.v1.GcePersistentDis" + + "kCsiDriverConfig\022Y\n\037gcp_filestore_csi_dr" + + "iver_config\030\016 \001(\01320.google.container.v1." + + "GcpFilestoreCsiDriverConfig\022J\n\027gke_backu" + + "p_agent_config\030\020 \001(\0132).google.container." + + "v1.GkeBackupAgentConfig\022O\n\032gcs_fuse_csi_" + + "driver_config\030\021 \001(\0132+.google.container.v" + + "1.GcsFuseCsiDriverConfig\022F\n\022stateful_ha_" + + "config\030\022 \001(\0132%.google.container.v1.State" + + "fulHAConfigB\003\340A\001\"%\n\021HttpLoadBalancing\022\020\n" + + "\010disabled\030\001 \001(\010\",\n\030HorizontalPodAutoscal" + + "ing\022\020\n\010disabled\030\001 \001(\010\"\'\n\023KubernetesDashb" + + "oard\022\020\n\010disabled\030\001 \001(\010\"\'\n\023NetworkPolicyC" + + "onfig\022\020\n\010disabled\030\001 \001(\010\"!\n\016DnsCacheConfi" + + "g\022\017\n\007enabled\030\001 \001(\010\"9\n&PrivateClusterMast" + + "erGlobalAccessConfig\022\017\n\007enabled\030\001 \001(\010\"\305\002" + + "\n\024PrivateClusterConfig\022\034\n\024enable_private" + + "_nodes\030\001 \001(\010\022\037\n\027enable_private_endpoint\030" + + "\002 \001(\010\022\036\n\026master_ipv4_cidr_block\030\003 \001(\t\022\030\n" + + "\020private_endpoint\030\004 \001(\t\022\027\n\017public_endpoi" + + "nt\030\005 \001(\t\022\024\n\014peering_name\030\007 \001(\t\022`\n\033master" + + "_global_access_config\030\010 \001(\0132;.google.con" + + "tainer.v1.PrivateClusterMasterGlobalAcce" + + "ssConfig\022#\n\033private_endpoint_subnetwork\030" + + "\n \001(\t\"D\n\031AuthenticatorGroupsConfig\022\017\n\007en" + + "abled\030\001 \001(\010\022\026\n\016security_group\030\002 \001(\t\"\356\001\n\016" + + "CloudRunConfig\022\020\n\010disabled\030\001 \001(\010\022P\n\022load" + + "_balancer_type\030\003 \001(\01624.google.container." + + "v1.CloudRunConfig.LoadBalancerType\"x\n\020Lo" + + "adBalancerType\022\"\n\036LOAD_BALANCER_TYPE_UNS" + + "PECIFIED\020\000\022\037\n\033LOAD_BALANCER_TYPE_EXTERNA" + + "L\020\001\022\037\n\033LOAD_BALANCER_TYPE_INTERNAL\020\002\"(\n\025" + + "ConfigConnectorConfig\022\017\n\007enabled\030\001 \001(\010\"3" + + "\n GcePersistentDiskCsiDriverConfig\022\017\n\007en" + + "abled\030\001 \001(\010\".\n\033GcpFilestoreCsiDriverConf" + + "ig\022\017\n\007enabled\030\001 \001(\010\")\n\026GcsFuseCsiDriverC" + + "onfig\022\017\n\007enabled\030\001 \001(\010\"\'\n\024GkeBackupAgent" + + "Config\022\017\n\007enabled\030\001 \001(\010\"#\n\020StatefulHACon" + + "fig\022\017\n\007enabled\030\001 \001(\010\"\216\002\n\036MasterAuthorize" + + "dNetworksConfig\022\017\n\007enabled\030\001 \001(\010\022R\n\013cidr" + + "_blocks\030\002 \003(\0132=.google.container.v1.Mast" + + "erAuthorizedNetworksConfig.CidrBlock\022,\n\037" + + "gcp_public_cidrs_access_enabled\030\003 \001(\010H\000\210" + + "\001\001\0325\n\tCidrBlock\022\024\n\014display_name\030\001 \001(\t\022\022\n" + + "\ncidr_block\030\002 \001(\tB\"\n _gcp_public_cidrs_a" + + "ccess_enabled\"\035\n\nLegacyAbac\022\017\n\007enabled\030\001" + + " \001(\010\"\221\001\n\rNetworkPolicy\022=\n\010provider\030\001 \001(\016" + + "2+.google.container.v1.NetworkPolicy.Pro" + + "vider\022\017\n\007enabled\030\002 \001(\010\"0\n\010Provider\022\030\n\024PR" + + "OVIDER_UNSPECIFIED\020\000\022\n\n\006CALICO\020\001\"\343\001\n\023Bin" + + "aryAuthorization\022\023\n\007enabled\030\001 \001(\010B\002\030\001\022P\n" + + "\017evaluation_mode\030\002 \001(\01627.google.containe" + + "r.v1.BinaryAuthorization.EvaluationMode\"" + + "e\n\016EvaluationMode\022\037\n\033EVALUATION_MODE_UNS" + + "PECIFIED\020\000\022\014\n\010DISABLED\020\001\022$\n PROJECT_SING" + + "LETON_POLICY_ENFORCE\020\002\"-\n\032PodCIDROverpro" + + "visionConfig\022\017\n\007disable\030\001 \001(\010\"\275\006\n\022IPAllo" + + "cationPolicy\022\026\n\016use_ip_aliases\030\001 \001(\010\022\031\n\021" + + "create_subnetwork\030\002 \001(\010\022\027\n\017subnetwork_na" + + "me\030\003 \001(\t\022\035\n\021cluster_ipv4_cidr\030\004 \001(\tB\002\030\001\022" + + "\032\n\016node_ipv4_cidr\030\005 \001(\tB\002\030\001\022\036\n\022services_" + + "ipv4_cidr\030\006 \001(\tB\002\030\001\022$\n\034cluster_secondary" + + "_range_name\030\007 \001(\t\022%\n\035services_secondary_" + + "range_name\030\010 \001(\t\022\037\n\027cluster_ipv4_cidr_bl" + + "ock\030\t \001(\t\022\034\n\024node_ipv4_cidr_block\030\n \001(\t\022" + + " \n\030services_ipv4_cidr_block\030\013 \001(\t\022\033\n\023tpu" + + "_ipv4_cidr_block\030\r \001(\t\022\022\n\nuse_routes\030\017 \001" + + "(\010\0222\n\nstack_type\030\020 \001(\0162\036.google.containe" + + "r.v1.StackType\022=\n\020ipv6_access_type\030\021 \001(\016" + + "2#.google.container.v1.IPv6AccessType\022V\n" + + "\035pod_cidr_overprovision_config\030\025 \001(\0132/.g" + + "oogle.container.v1.PodCIDROverprovisionC" + + "onfig\022#\n\026subnet_ipv6_cidr_block\030\026 \001(\tB\003\340" + + "A\003\022%\n\030services_ipv6_cidr_block\030\027 \001(\tB\003\340A" + + "\003\022Y\n\034additional_pod_ranges_config\030\030 \001(\0132" + + "..google.container.v1.AdditionalPodRange" + + "sConfigB\003\340A\003\022/\n\"default_pod_ipv4_range_u" + + "tilization\030\031 \001(\001B\003\340A\003\"\201\034\n\007Cluster\022\014\n\004nam" + + "e\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\036\n\022initial_" + + "node_count\030\003 \001(\005B\002\030\001\0228\n\013node_config\030\004 \001(" + + "\0132\037.google.container.v1.NodeConfigB\002\030\001\0224" + + "\n\013master_auth\030\005 \001(\0132\037.google.container.v" + + "1.MasterAuth\022\027\n\017logging_service\030\006 \001(\t\022\032\n" + + "\022monitoring_service\030\007 \001(\t\022\017\n\007network\030\010 \001" + + "(\t\022\031\n\021cluster_ipv4_cidr\030\t \001(\t\0228\n\raddons_" + + "config\030\n \001(\0132!.google.container.v1.Addon" + + "sConfig\022\022\n\nsubnetwork\030\013 \001(\t\0221\n\nnode_pool" + + "s\030\014 \003(\0132\035.google.container.v1.NodePool\022\021" + + "\n\tlocations\030\r \003(\t\022\037\n\027enable_kubernetes_a" + + "lpha\030\016 \001(\010\022I\n\017resource_labels\030\017 \003(\01320.go" + + "ogle.container.v1.Cluster.ResourceLabels" + + "Entry\022\031\n\021label_fingerprint\030\020 \001(\t\0224\n\013lega" + + "cy_abac\030\022 \001(\0132\037.google.container.v1.Lega" + + "cyAbac\022:\n\016network_policy\030\023 \001(\0132\".google." + + "container.v1.NetworkPolicy\022E\n\024ip_allocat" + + "ion_policy\030\024 \001(\0132\'.google.container.v1.I" + + "PAllocationPolicy\022^\n!master_authorized_n" + + "etworks_config\030\026 \001(\01323.google.container." + + "v1.MasterAuthorizedNetworksConfig\022B\n\022mai" + + "ntenance_policy\030\027 \001(\0132&.google.container" + + ".v1.MaintenancePolicy\022F\n\024binary_authoriz" + + "ation\030\030 \001(\0132(.google.container.v1.Binary" + + "Authorization\022<\n\013autoscaling\030\032 \001(\0132\'.goo" + + "gle.container.v1.ClusterAutoscaling\022:\n\016n" + + "etwork_config\030\033 \001(\0132\".google.container.v" + + "1.NetworkConfig\022K\n\033default_max_pods_cons" + + "traint\030\036 \001(\0132&.google.container.v1.MaxPo" + + "dsConstraint\022T\n\034resource_usage_export_co" + + "nfig\030! \001(\0132..google.container.v1.Resourc" + + "eUsageExportConfig\022S\n\033authenticator_grou" + + "ps_config\030\" \001(\0132..google.container.v1.Au" + + "thenticatorGroupsConfig\022I\n\026private_clust" + + "er_config\030% \001(\0132).google.container.v1.Pr" + + "ivateClusterConfig\022D\n\023database_encryptio" + + "n\030& \001(\0132\'.google.container.v1.DatabaseEn" + + "cryption\022M\n\030vertical_pod_autoscaling\030\' \001" + + "(\0132+.google.container.v1.VerticalPodAuto" + + "scaling\022:\n\016shielded_nodes\030( \001(\0132\".google" + + ".container.v1.ShieldedNodes\022<\n\017release_c" + + "hannel\030) \001(\0132#.google.container.v1.Relea" + + "seChannel\022M\n\030workload_identity_config\030+ " + + "\001(\0132+.google.container.v1.WorkloadIdenti" + + "tyConfig\022@\n\021mesh_certificates\030C \001(\0132%.go" + + "ogle.container.v1.MeshCertificates\022I\n\026co" + + "st_management_config\030- \001(\0132).google.cont" + + "ainer.v1.CostManagementConfig\022D\n\023notific" + + "ation_config\0301 \001(\0132\'.google.container.v1" + + ".NotificationConfig\022B\n\022confidential_node" + + "s\0302 \001(\0132&.google.container.v1.Confidenti" + + "alNodes\022K\n\027identity_service_config\0306 \001(\013" + + "2*.google.container.v1.IdentityServiceCo" + + "nfig\022\021\n\tself_link\030d \001(\t\022\020\n\004zone\030e \001(\tB\002\030" + + "\001\022\020\n\010endpoint\030f \001(\t\022\037\n\027initial_cluster_v" + + "ersion\030g \001(\t\022\036\n\026current_master_version\030h" + + " \001(\t\022 \n\024current_node_version\030i \001(\tB\002\030\001\022\023" + + "\n\013create_time\030j \001(\t\0223\n\006status\030k \001(\0162#.go" + + "ogle.container.v1.Cluster.Status\022\032\n\016stat" + + "us_message\030l \001(\tB\002\030\001\022\033\n\023node_ipv4_cidr_s" + + "ize\030m \001(\005\022\032\n\022services_ipv4_cidr\030n \001(\t\022\037\n" + + "\023instance_group_urls\030o \003(\tB\002\030\001\022\036\n\022curren" + + "t_node_count\030p \001(\005B\002\030\001\022\023\n\013expire_time\030q " + + "\001(\t\022\020\n\010location\030r \001(\t\022\022\n\nenable_tpu\030s \001(" + + "\010\022\033\n\023tpu_ipv4_cidr_block\030t \001(\t\0228\n\ncondit" + + "ions\030v \003(\0132$.google.container.v1.StatusC" + + "ondition\0222\n\tautopilot\030\200\001 \001(\0132\036.google.co" + + "ntainer.v1.Autopilot\022\020\n\002id\030\201\001 \001(\tB\003\340A\003\022G" + + "\n\022node_pool_defaults\030\203\001 \001(\0132%.google.con" + + "tainer.v1.NodePoolDefaultsH\000\210\001\001\022;\n\016loggi" + + "ng_config\030\204\001 \001(\0132\".google.container.v1.L" + + "oggingConfig\022A\n\021monitoring_config\030\205\001 \001(\013" + + "2%.google.container.v1.MonitoringConfig\022" + + "G\n\025node_pool_auto_config\030\210\001 \001(\0132\'.google" + + ".container.v1.NodePoolAutoConfig\022\r\n\004etag" + + "\030\213\001 \001(\t\022*\n\005fleet\030\214\001 \001(\0132\032.google.contain" + + "er.v1.Fleet\022L\n\027security_posture_config\030\221" + + "\001 \001(\0132*.google.container.v1.SecurityPost" + + "ureConfig\022D\n\024enable_k8s_beta_apis\030\217\001 \001(\013" + + "2%.google.container.v1.K8sBetaAPIConfig\022" + + "A\n\021enterprise_config\030\225\001 \001(\0132%.google.con" + + "tainer.v1.EnterpriseConfig\022 \n\rsatisfies_" + + "pzs\030\230\001 \001(\010B\003\340A\003H\001\210\001\001\022 \n\rsatisfies_pzi\030\231\001" + + " \001(\010B\003\340A\003H\002\210\001\001\0325\n\023ResourceLabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"w\n\006Status\022" + + "\026\n\022STATUS_UNSPECIFIED\020\000\022\020\n\014PROVISIONING\020" + + "\001\022\013\n\007RUNNING\020\002\022\017\n\013RECONCILING\020\003\022\014\n\010STOPP" + + "ING\020\004\022\t\n\005ERROR\020\005\022\014\n\010DEGRADED\020\006B\025\n\023_node_" + + "pool_defaultsB\020\n\016_satisfies_pzsB\020\n\016_sati" + + "sfies_pzi\"(\n\020K8sBetaAPIConfig\022\024\n\014enabled" + + "_apis\030\001 \003(\t\"\256\003\n\025SecurityPostureConfig\022B\n" + + "\004mode\030\001 \001(\0162/.google.container.v1.Securi" + + "tyPostureConfig.ModeH\000\210\001\001\022]\n\022vulnerabili" + + "ty_mode\030\002 \001(\0162<.google.container.v1.Secu" + + "rityPostureConfig.VulnerabilityModeH\001\210\001\001" + + "\"E\n\004Mode\022\024\n\020MODE_UNSPECIFIED\020\000\022\014\n\010DISABL" + + "ED\020\001\022\t\n\005BASIC\020\002\022\016\n\nENTERPRISE\020\003\"\212\001\n\021Vuln" + + "erabilityMode\022\"\n\036VULNERABILITY_MODE_UNSP" + + "ECIFIED\020\000\022\032\n\026VULNERABILITY_DISABLED\020\001\022\027\n" + + "\023VULNERABILITY_BASIC\020\002\022\034\n\030VULNERABILITY_" + + "ENTERPRISE\020\003B\007\n\005_modeB\025\n\023_vulnerability_" + + "mode\"\332\001\n\022NodePoolAutoConfig\0226\n\014network_t" + + "ags\030\001 \001(\0132 .google.container.v1.NetworkT" + + "ags\022G\n\025resource_manager_tags\030\002 \001(\0132(.goo" + + "gle.container.v1.ResourceManagerTags\022C\n\023" + + "node_kubelet_config\030\003 \001(\0132&.google.conta" + + "iner.v1.NodeKubeletConfig\"Y\n\020NodePoolDef" + + "aults\022E\n\024node_config_defaults\030\001 \001(\0132\'.go" + + "ogle.container.v1.NodeConfigDefaults\"\225\002\n" + + "\022NodeConfigDefaults\0224\n\013gcfs_config\030\001 \001(\013" + + "2\037.google.container.v1.GcfsConfig\022B\n\016log" + + "ging_config\030\003 \001(\0132*.google.container.v1." + + "NodePoolLoggingConfig\022@\n\021containerd_conf" + + "ig\030\004 \001(\0132%.google.container.v1.Container" + + "dConfig\022C\n\023node_kubelet_config\030\006 \001(\0132&.g" + + "oogle.container.v1.NodeKubeletConfig\"\220!\n" + + "\rClusterUpdate\022\034\n\024desired_node_version\030\004" + + " \001(\t\022\"\n\032desired_monitoring_service\030\005 \001(\t" + + "\022@\n\025desired_addons_config\030\006 \001(\0132!.google" + + ".container.v1.AddonsConfig\022\034\n\024desired_no" + + "de_pool_id\030\007 \001(\t\022\032\n\022desired_image_type\030\010" + + " \001(\t\022L\n\033desired_database_encryption\030. \001(" + + "\0132\'.google.container.v1.DatabaseEncrypti" + + "on\022U\n desired_workload_identity_config\030/" + + " \001(\0132+.google.container.v1.WorkloadIdent" + + "ityConfig\022H\n\031desired_mesh_certificates\030C" + + " \001(\0132%.google.container.v1.MeshCertifica" + + "tes\022B\n\026desired_shielded_nodes\0300 \001(\0132\".go" + + "ogle.container.v1.ShieldedNodes\022Q\n\036desir" + + "ed_cost_management_config\0301 \001(\0132).google" + + ".container.v1.CostManagementConfig\022:\n\022de" + + "sired_dns_config\0305 \001(\0132\036.google.containe" + + "r.v1.DNSConfig\022O\n\035desired_node_pool_auto", + "scaling\030\t \001(\0132(.google.container.v1.Node" + + "PoolAutoscaling\022\031\n\021desired_locations\030\n \003" + + "(\t\022f\n)desired_master_authorized_networks" + + "_config\030\014 \001(\01323.google.container.v1.Mast" + + "erAuthorizedNetworksConfig\022L\n\033desired_cl" + + "uster_autoscaling\030\017 \001(\0132\'.google.contain" + + "er.v1.ClusterAutoscaling\022N\n\034desired_bina" + + "ry_authorization\030\020 \001(\0132(.google.containe" + + "r.v1.BinaryAuthorization\022\037\n\027desired_logg" + + "ing_service\030\023 \001(\t\022\\\n$desired_resource_us" + + "age_export_config\030\025 \001(\0132..google.contain" + + "er.v1.ResourceUsageExportConfig\022U\n desir" + + "ed_vertical_pod_autoscaling\030\026 \001(\0132+.goog" + + "le.container.v1.VerticalPodAutoscaling\022Q" + + "\n\036desired_private_cluster_config\030\031 \001(\0132)" + + ".google.container.v1.PrivateClusterConfi" + + "g\022\\\n$desired_intra_node_visibility_confi" + + "g\030\032 \001(\0132..google.container.v1.IntraNodeV" + + "isibilityConfig\022K\n\033desired_default_snat_" + + "status\030\034 \001(\0132&.google.container.v1.Defau" + + "ltSnatStatus\022D\n\027desired_release_channel\030" + + "\037 \001(\0132#.google.container.v1.ReleaseChann" + + "el\022Q\n\037desired_l4ilb_subsetting_config\030\' " + + "\001(\0132(.google.container.v1.ILBSubsettingC" + + "onfig\022H\n\031desired_datapath_provider\0302 \001(\016" + + "2%.google.container.v1.DatapathProvider\022" + + "X\n\"desired_private_ipv6_google_access\0303 " + + "\001(\0162,.google.container.v1.PrivateIPv6Goo" + + "gleAccess\022L\n\033desired_notification_config" + + "\0307 \001(\0132\'.google.container.v1.Notificatio" + + "nConfig\022[\n#desired_authenticator_groups_" + + "config\030? \001(\0132..google.container.v1.Authe" + + "nticatorGroupsConfig\022B\n\026desired_logging_" + + "config\030@ \001(\0132\".google.container.v1.Loggi" + + "ngConfig\022H\n\031desired_monitoring_config\030A " + + "\001(\0132%.google.container.v1.MonitoringConf" + + "ig\022S\n\037desired_identity_service_config\030B " + + "\001(\0132*.google.container.v1.IdentityServic" + + "eConfig\022Z\n#desired_service_external_ips_" + + "config\030< \001(\0132-.google.container.v1.Servi" + + "ceExternalIPsConfig\022,\n\037desired_enable_pr" + + "ivate_endpoint\030G \001(\010H\000\210\001\001\022\036\n\026desired_mas" + + "ter_version\030d \001(\t\022<\n\023desired_gcfs_config" + + "\030m \001(\0132\037.google.container.v1.GcfsConfig\022" + + "T\n*desired_node_pool_auto_config_network" + + "_tags\030n \001(\0132 .google.container.v1.Networ" + + "kTags\022I\n\032desired_gateway_api_config\030r \001(" + + "\0132%.google.container.v1.GatewayAPIConfig" + + "\022\014\n\004etag\030s \001(\t\022T\n desired_node_pool_logg" + + "ing_config\030t \001(\0132*.google.container.v1.N" + + "odePoolLoggingConfig\0221\n\rdesired_fleet\030u " + + "\001(\0132\032.google.container.v1.Fleet\022:\n\022desir" + + "ed_stack_type\030w \001(\0162\036.google.container.v" + + "1.StackType\022T\n\034additional_pod_ranges_con" + + "fig\030x \001(\0132..google.container.v1.Addition" + + "alPodRangesConfig\022\\\n$removed_additional_" + + "pod_ranges_config\030y \001(\0132..google.contain" + + "er.v1.AdditionalPodRangesConfig\022C\n\024enabl" + + "e_k8s_beta_apis\030z \001(\0132%.google.container" + + ".v1.K8sBetaAPIConfig\022S\n\037desired_security" + + "_posture_config\030| \001(\0132*.google.container" + + ".v1.SecurityPostureConfig\022n\n\"desired_net" + + "work_performance_config\030} \001(\0132B.google.c" + + "ontainer.v1.NetworkConfig.ClusterNetwork" + + "PerformanceConfig\022/\n\"desired_enable_fqdn" + + "_network_policy\030~ \001(\010H\001\210\001\001\022\\\n(desired_au" + + "topilot_workload_policy_config\030\200\001 \001(\0132)." + + "google.container.v1.WorkloadPolicyConfig" + + "\022E\n\025desired_k8s_beta_apis\030\203\001 \001(\0132%.googl" + + "e.container.v1.K8sBetaAPIConfig\022I\n\031desir" + + "ed_containerd_config\030\206\001 \001(\0132%.google.con" + + "tainer.v1.ContainerdConfig\022-\n\037desired_en" + + "able_multi_networking\030\207\001 \001(\010H\002\210\001\001\022f\n3des" + + "ired_node_pool_auto_config_resource_mana" + + "ger_tags\030\210\001 \001(\0132(.google.container.v1.Re" + + "sourceManagerTags\022b\n$desired_in_transit_" + + "encryption_config\030\211\001 \001(\0162..google.contai" + + "ner.v1.InTransitEncryptionConfigH\003\210\001\001\022>\n" + + "0desired_enable_cilium_clusterwide_netwo" + + "rk_policy\030\212\001 \001(\010H\004\210\001\001\022L\n\033desired_node_ku" + + "belet_config\030\215\001 \001(\0132&.google.container.v" + + "1.NodeKubeletConfig\022]\n,desired_node_pool" + + "_auto_config_kubelet_config\030\216\001 \001(\0132&.goo" + + "gle.container.v1.NodeKubeletConfigB\"\n _d" + + "esired_enable_private_endpointB%\n#_desir" + + "ed_enable_fqdn_network_policyB\"\n _desire" + + "d_enable_multi_networkingB\'\n%_desired_in" + + "_transit_encryption_configB3\n1_desired_e" + + "nable_cilium_clusterwide_network_policy\"" + + "q\n\031AdditionalPodRangesConfig\022\027\n\017pod_rang" + + "e_names\030\001 \003(\t\022;\n\016pod_range_info\030\002 \003(\0132\036." + + "google.container.v1.RangeInfoB\003\340A\003\">\n\tRa" + + "ngeInfo\022\027\n\nrange_name\030\001 \001(\tB\003\340A\003\022\030\n\013util" + + "ization\030\002 \001(\001B\003\340A\003\"\264\010\n\tOperation\022\014\n\004name" + + "\030\001 \001(\t\022\020\n\004zone\030\002 \001(\tB\002\030\001\022;\n\016operation_ty" + + "pe\030\003 \001(\0162#.google.container.v1.Operation" + + ".Type\0225\n\006status\030\004 \001(\0162%.google.container" + + ".v1.Operation.Status\022\016\n\006detail\030\010 \001(\t\022\035\n\016" + + "status_message\030\005 \001(\tB\005\030\001\340A\003\022\021\n\tself_link" + + "\030\006 \001(\t\022\023\n\013target_link\030\007 \001(\t\022\020\n\010location\030" + + "\t \001(\t\022\022\n\nstart_time\030\n \001(\t\022\020\n\010end_time\030\013 " + + "\001(\t\022=\n\010progress\030\014 \001(\0132&.google.container" + + ".v1.OperationProgressB\003\340A\003\022D\n\022cluster_co" + + "nditions\030\r \003(\0132$.google.container.v1.Sta" + + "tusConditionB\002\030\001\022E\n\023nodepool_conditions\030" + + "\016 \003(\0132$.google.container.v1.StatusCondit" + + "ionB\002\030\001\022!\n\005error\030\017 \001(\0132\022.google.rpc.Stat" + + "us\"R\n\006Status\022\026\n\022STATUS_UNSPECIFIED\020\000\022\013\n\007" + + "PENDING\020\001\022\013\n\007RUNNING\020\002\022\010\n\004DONE\020\003\022\014\n\010ABOR" + + "TING\020\004\"\300\003\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\022\n" + + "\016CREATE_CLUSTER\020\001\022\022\n\016DELETE_CLUSTER\020\002\022\022\n" + + "\016UPGRADE_MASTER\020\003\022\021\n\rUPGRADE_NODES\020\004\022\022\n\016" + + "REPAIR_CLUSTER\020\005\022\022\n\016UPDATE_CLUSTER\020\006\022\024\n\020" + + "CREATE_NODE_POOL\020\007\022\024\n\020DELETE_NODE_POOL\020\010" + + "\022\034\n\030SET_NODE_POOL_MANAGEMENT\020\t\022\025\n\021AUTO_R" + + "EPAIR_NODES\020\n\022\032\n\022AUTO_UPGRADE_NODES\020\013\032\002\010" + + "\001\022\022\n\nSET_LABELS\020\014\032\002\010\001\022\027\n\017SET_MASTER_AUTH" + + "\020\r\032\002\010\001\022\026\n\022SET_NODE_POOL_SIZE\020\016\022\032\n\022SET_NE" + + "TWORK_POLICY\020\017\032\002\010\001\022\036\n\026SET_MAINTENANCE_PO" + + "LICY\020\020\032\002\010\001\022\022\n\016RESIZE_CLUSTER\020\022\022\031\n\025FLEET_" + + "FEATURE_UPGRADE\020\023\"\273\002\n\021OperationProgress\022" + + "\014\n\004name\030\001 \001(\t\0225\n\006status\030\002 \001(\0162%.google.c" + + "ontainer.v1.Operation.Status\022>\n\007metrics\030" + + "\003 \003(\0132-.google.container.v1.OperationPro" + + "gress.Metric\0226\n\006stages\030\004 \003(\0132&.google.co" + + "ntainer.v1.OperationProgress\032i\n\006Metric\022\021" + + "\n\004name\030\001 \001(\tB\003\340A\002\022\023\n\tint_value\030\002 \001(\003H\000\022\026" + + "\n\014double_value\030\003 \001(\001H\000\022\026\n\014string_value\030\004" + + " \001(\tH\000B\007\n\005value\"\204\001\n\024CreateClusterRequest" + "\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002" - + "\030\001\022\016\n\006parent\030\004 \001(\t\"]\n\024ListClustersRespon" - + "se\022.\n\010clusters\030\001 \003(\0132\034.google.container." - + "v1.Cluster\022\025\n\rmissing_zones\030\002 \003(\t\"g\n\023Get" - + "OperationRequest\022\026\n\nproject_id\030\001 \001(\tB\002\030\001" - + "\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\030\n\014operation_id\030\003 \001(\t" - + "B\002\030\001\022\014\n\004name\030\005 \001(\t\"Q\n\025ListOperationsRequ" - + "est\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(" - + "\tB\002\030\001\022\016\n\006parent\030\004 \001(\t\"j\n\026CancelOperation" - + "Request\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030" - + "\002 \001(\tB\002\030\001\022\030\n\014operation_id\030\003 \001(\tB\002\030\001\022\014\n\004n" - + "ame\030\004 \001(\t\"c\n\026ListOperationsResponse\0222\n\no" - + "perations\030\001 \003(\0132\036.google.container.v1.Op" - + "eration\022\025\n\rmissing_zones\030\002 \003(\t\"P\n\026GetSer" - + "verConfigRequest\022\026\n\nproject_id\030\001 \001(\tB\002\030\001" - + "\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\014\n\004name\030\004 \001(\t\"\364\002\n\014Ser" - + "verConfig\022\037\n\027default_cluster_version\030\001 \001" - + "(\t\022\033\n\023valid_node_versions\030\003 \003(\t\022\032\n\022defau" - + "lt_image_type\030\004 \001(\t\022\031\n\021valid_image_types" - + "\030\005 \003(\t\022\035\n\025valid_master_versions\030\006 \003(\t\022H\n" - + "\010channels\030\t \003(\01326.google.container.v1.Se" - + "rverConfig.ReleaseChannelConfig\032\205\001\n\024Rele" - + "aseChannelConfig\022<\n\007channel\030\001 \001(\0162+.goog" - + "le.container.v1.ReleaseChannel.Channel\022\027" - + "\n\017default_version\030\002 \001(\t\022\026\n\016valid_version" - + "s\030\004 \003(\t\"\240\001\n\025CreateNodePoolRequest\022\026\n\npro" - + "ject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\nc" - + "luster_id\030\003 \001(\tB\002\030\001\0225\n\tnode_pool\030\004 \001(\0132\035" - + ".google.container.v1.NodePoolB\003\340A\002\022\016\n\006pa" - + "rent\030\006 \001(\t\"\201\001\n\025DeleteNodePoolRequest\022\026\n\n" + + "\030\001\0222\n\007cluster\030\003 \001(\0132\034.google.container.v" + + "1.ClusterB\003\340A\002\022\016\n\006parent\030\005 \001(\t\"c\n\021GetClu" + + "sterRequest\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004z" + + "one\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(\tB\002\030\001\022\014\n" + + "\004name\030\005 \001(\t\"\237\001\n\024UpdateClusterRequest\022\026\n\n" + "project_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026" - + "\n\ncluster_id\030\003 \001(\tB\002\030\001\022\030\n\014node_pool_id\030\004" - + " \001(\tB\002\030\001\022\014\n\004name\030\006 \001(\t\"h\n\024ListNodePoolsR" + + "\n\ncluster_id\030\003 \001(\tB\002\030\001\0227\n\006update\030\004 \001(\0132\"" + + ".google.container.v1.ClusterUpdateB\003\340A\002\022" + + "\014\n\004name\030\005 \001(\t\"\323\013\n\025UpdateNodePoolRequest\022" + + "\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030" + + "\001\022\026\n\ncluster_id\030\003 \001(\tB\002\030\001\022\030\n\014node_pool_i" + + "d\030\004 \001(\tB\002\030\001\022\031\n\014node_version\030\005 \001(\tB\003\340A\002\022\027" + + "\n\nimage_type\030\006 \001(\tB\003\340A\002\022\014\n\004name\030\010 \001(\t\022\021\n" + + "\tlocations\030\r \003(\t\022M\n\030workload_metadata_co" + + "nfig\030\016 \001(\0132+.google.container.v1.Workloa" + + "dMetadataConfig\022G\n\020upgrade_settings\030\017 \001(" + + "\0132-.google.container.v1.NodePool.Upgrade" + + "Settings\022.\n\004tags\030\020 \001(\0132 .google.containe" + + "r.v1.NetworkTags\022/\n\006taints\030\021 \001(\0132\037.googl" + + "e.container.v1.NodeTaints\022/\n\006labels\030\022 \001(" + + "\0132\037.google.container.v1.NodeLabels\022?\n\021li" + + "nux_node_config\030\023 \001(\0132$.google.container" + + ".v1.LinuxNodeConfig\022>\n\016kubelet_config\030\024 " + + "\001(\0132&.google.container.v1.NodeKubeletCon" + + "fig\022C\n\023node_network_config\030\025 \001(\0132&.googl" + + "e.container.v1.NodeNetworkConfig\0224\n\013gcfs" + + "_config\030\026 \001(\0132\037.google.container.v1.Gcfs" + + "Config\022B\n\022confidential_nodes\030\027 \001(\0132&.goo" + + "gle.container.v1.ConfidentialNodes\022.\n\005gv" + + "nic\030\035 \001(\0132\037.google.container.v1.VirtualN" + + "IC\022\014\n\004etag\030\036 \001(\t\0224\n\013fast_socket\030\037 \001(\0132\037." + + "google.container.v1.FastSocket\022B\n\016loggin" + + "g_config\030 \001(\0132*.google.container.v1.Nod" + + "ePoolLoggingConfig\022<\n\017resource_labels\030! " + + "\001(\0132#.google.container.v1.ResourceLabels" + + "\022C\n\023windows_node_config\030\" \001(\0132&.google.c" + + "ontainer.v1.WindowsNodeConfig\022<\n\014acceler" + + "ators\030# \003(\0132&.google.container.v1.Accele" + + "ratorConfig\022\031\n\014machine_type\030$ \001(\tB\003\340A\001\022\026" + + "\n\tdisk_type\030% \001(\tB\003\340A\001\022\031\n\014disk_size_gb\030&" + + " \001(\003B\003\340A\001\022G\n\025resource_manager_tags\030\' \001(\013" + + "2(.google.container.v1.ResourceManagerTa" + + "gs\022@\n\021containerd_config\030( \001(\0132%.google.c" + + "ontainer.v1.ContainerdConfig\022M\n\023queued_p" + + "rovisioning\030* \001(\01320.google.container.v1." + + "NodePool.QueuedProvisioning\"\315\001\n\035SetNodeP" + + "oolAutoscalingRequest\022\026\n\nproject_id\030\001 \001(" + + "\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 " + + "\001(\tB\002\030\001\022\030\n\014node_pool_id\030\004 \001(\tB\002\030\001\022B\n\013aut" + + "oscaling\030\005 \001(\0132(.google.container.v1.Nod" + + "ePoolAutoscalingB\003\340A\002\022\014\n\004name\030\006 \001(\t\"\210\001\n\030" + + "SetLoggingServiceRequest\022\026\n\nproject_id\030\001" + + " \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id" + + "\030\003 \001(\tB\002\030\001\022\034\n\017logging_service\030\004 \001(\tB\003\340A\002" + + "\022\014\n\004name\030\005 \001(\t\"\216\001\n\033SetMonitoringServiceR" + "equest\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002" - + " \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(\tB\002\030\001\022\016\n\006pare" - + "nt\030\005 \001(\t\"~\n\022GetNodePoolRequest\022\026\n\nprojec" - + "t_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\nclus" - + "ter_id\030\003 \001(\tB\002\030\001\022\030\n\014node_pool_id\030\004 \001(\tB\002" - + "\030\001\022\014\n\004name\030\006 \001(\t\"\237\003\n\021BlueGreenSettings\022_" - + "\n\027standard_rollout_policy\030\001 \001(\0132<.google" - + ".container.v1.BlueGreenSettings.Standard" - + "RolloutPolicyH\000\022?\n\027node_pool_soak_durati" - + "on\030\002 \001(\0132\031.google.protobuf.DurationH\001\210\001\001" - + "\032\271\001\n\025StandardRolloutPolicy\022\032\n\020batch_perc" - + "entage\030\001 \001(\002H\000\022\032\n\020batch_node_count\030\002 \001(\005" - + "H\000\022;\n\023batch_soak_duration\030\003 \001(\0132\031.google" - + ".protobuf.DurationH\001\210\001\001B\023\n\021update_batch_" - + "sizeB\026\n\024_batch_soak_durationB\020\n\016rollout_" - + "policyB\032\n\030_node_pool_soak_duration\"\272\020\n\010N" - + "odePool\022\014\n\004name\030\001 \001(\t\022/\n\006config\030\002 \001(\0132\037." - + "google.container.v1.NodeConfig\022\032\n\022initia" - + "l_node_count\030\003 \001(\005\022\021\n\tlocations\030\r \003(\t\022>\n" - + "\016network_config\030\016 \001(\0132&.google.container" - + ".v1.NodeNetworkConfig\022\021\n\tself_link\030d \001(\t" - + "\022\017\n\007version\030e \001(\t\022\033\n\023instance_group_urls" - + "\030f \003(\t\0224\n\006status\030g \001(\0162$.google.containe" - + "r.v1.NodePool.Status\022\032\n\016status_message\030h" - + " \001(\tB\002\030\001\022=\n\013autoscaling\030\004 \001(\0132(.google.c" - + "ontainer.v1.NodePoolAutoscaling\0227\n\nmanag" - + "ement\030\005 \001(\0132#.google.container.v1.NodeMa" - + "nagement\022C\n\023max_pods_constraint\030\006 \001(\0132&." - + "google.container.v1.MaxPodsConstraint\0228\n" - + "\nconditions\030i \003(\0132$.google.container.v1." - + "StatusCondition\022\032\n\022pod_ipv4_cidr_size\030\007 " - + "\001(\005\022G\n\020upgrade_settings\030k \001(\0132-.google.c" - + "ontainer.v1.NodePool.UpgradeSettings\022G\n\020" - + "placement_policy\030l \001(\0132-.google.containe" - + "r.v1.NodePool.PlacementPolicy\022B\n\013update_" - + "info\030m \001(\0132(.google.container.v1.NodePoo" - + "l.UpdateInfoB\003\340A\003\022\014\n\004etag\030n \001(\t\022M\n\023queue" - + "d_provisioning\030p \001(\01320.google.container." - + "v1.NodePool.QueuedProvisioning\022M\n\030best_e" - + "ffort_provisioning\030q \001(\0132+.google.contai" - + "ner.v1.BestEffortProvisioning\032\360\001\n\017Upgrad" - + "eSettings\022\021\n\tmax_surge\030\001 \001(\005\022\027\n\017max_unav" - + "ailable\030\002 \001(\005\022B\n\010strategy\030\003 \001(\0162+.google" - + ".container.v1.NodePoolUpdateStrategyH\000\210\001" - + "\001\022H\n\023blue_green_settings\030\004 \001(\0132&.google." - + "container.v1.BlueGreenSettingsH\001\210\001\001B\013\n\t_" - + "strategyB\026\n\024_blue_green_settings\032\210\004\n\nUpd" - + "ateInfo\022O\n\017blue_green_info\030\001 \001(\01326.googl" - + "e.container.v1.NodePool.UpdateInfo.BlueG" - + "reenInfo\032\250\003\n\rBlueGreenInfo\022K\n\005phase\030\001 \001(" - + "\0162<.google.container.v1.NodePool.UpdateI" - + "nfo.BlueGreenInfo.Phase\022 \n\030blue_instance" - + "_group_urls\030\002 \003(\t\022!\n\031green_instance_grou" - + "p_urls\030\003 \003(\t\022%\n\035blue_pool_deletion_start" - + "_time\030\004 \001(\t\022\032\n\022green_pool_version\030\005 \001(\t\"" - + "\301\001\n\005Phase\022\025\n\021PHASE_UNSPECIFIED\020\000\022\022\n\016UPDA" - + "TE_STARTED\020\001\022\027\n\023CREATING_GREEN_POOL\020\002\022\027\n" - + "\023CORDONING_BLUE_POOL\020\003\022\026\n\022DRAINING_BLUE_" - + "POOL\020\004\022\025\n\021NODE_POOL_SOAKING\020\005\022\026\n\022DELETIN" - + "G_BLUE_POOL\020\006\022\024\n\020ROLLBACK_STARTED\020\007\032\256\001\n\017" - + "PlacementPolicy\022@\n\004type\030\001 \001(\01622.google.c" - + "ontainer.v1.NodePool.PlacementPolicy.Typ" - + "e\022\031\n\014tpu_topology\030\002 \001(\tB\003\340A\001\022\023\n\013policy_n" - + "ame\030\003 \001(\t\")\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022" - + "\013\n\007COMPACT\020\001\032%\n\022QueuedProvisioning\022\017\n\007en" - + "abled\030\001 \001(\010\"\201\001\n\006Status\022\026\n\022STATUS_UNSPECI" - + "FIED\020\000\022\020\n\014PROVISIONING\020\001\022\013\n\007RUNNING\020\002\022\026\n" - + "\022RUNNING_WITH_ERROR\020\003\022\017\n\013RECONCILING\020\004\022\014" - + "\n\010STOPPING\020\005\022\t\n\005ERROR\020\006\"}\n\016NodeManagemen" - + "t\022\024\n\014auto_upgrade\030\001 \001(\010\022\023\n\013auto_repair\030\002" - + " \001(\010\022@\n\017upgrade_options\030\n \001(\0132\'.google.c" - + "ontainer.v1.AutoUpgradeOptions\"F\n\026BestEf" - + "fortProvisioning\022\017\n\007enabled\030\001 \001(\010\022\033\n\023min" - + "_provision_nodes\030\002 \001(\005\"J\n\022AutoUpgradeOpt" - + "ions\022\037\n\027auto_upgrade_start_time\030\001 \001(\t\022\023\n" - + "\013description\030\002 \001(\t\"e\n\021MaintenancePolicy\022" - + "6\n\006window\030\001 \001(\0132&.google.container.v1.Ma" - + "intenanceWindow\022\030\n\020resource_version\030\003 \001(" - + "\t\"\366\002\n\021MaintenanceWindow\022O\n\030daily_mainten" - + "ance_window\030\002 \001(\0132+.google.container.v1." - + "DailyMaintenanceWindowH\000\022D\n\020recurring_wi" - + "ndow\030\003 \001(\0132(.google.container.v1.Recurri" - + "ngTimeWindowH\000\022a\n\026maintenance_exclusions" - + "\030\004 \003(\0132A.google.container.v1.Maintenance" - + "Window.MaintenanceExclusionsEntry\032]\n\032Mai" - + "ntenanceExclusionsEntry\022\013\n\003key\030\001 \001(\t\022.\n\005" - + "value\030\002 \001(\0132\037.google.container.v1.TimeWi" - + "ndow:\0028\001B\010\n\006policy\"\320\001\n\nTimeWindow\022Y\n\035mai" - + "ntenance_exclusion_options\030\003 \001(\01320.googl" - + "e.container.v1.MaintenanceExclusionOptio" - + "nsH\000\022.\n\nstart_time\030\001 \001(\0132\032.google.protob" - + "uf.Timestamp\022,\n\010end_time\030\002 \001(\0132\032.google." - + "protobuf.TimestampB\t\n\007options\"\264\001\n\033Mainte" - + "nanceExclusionOptions\022E\n\005scope\030\001 \001(\01626.g" - + "oogle.container.v1.MaintenanceExclusionO" - + "ptions.Scope\"N\n\005Scope\022\017\n\013NO_UPGRADES\020\000\022\025" - + "\n\021NO_MINOR_UPGRADES\020\001\022\035\n\031NO_MINOR_OR_NOD" - + "E_UPGRADES\020\002\"Z\n\023RecurringTimeWindow\022/\n\006w" - + "indow\030\001 \001(\0132\037.google.container.v1.TimeWi" - + "ndow\022\022\n\nrecurrence\030\002 \001(\t\">\n\026DailyMainten" - + "anceWindow\022\022\n\nstart_time\030\002 \001(\t\022\020\n\010durati" - + "on\030\003 \001(\t\"\306\001\n\034SetNodePoolManagementReques" - + "t\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB" - + "\002\030\001\022\026\n\ncluster_id\030\003 \001(\tB\002\030\001\022\030\n\014node_pool" - + "_id\030\004 \001(\tB\002\030\001\022<\n\nmanagement\030\005 \001(\0132#.goog" - + "le.container.v1.NodeManagementB\003\340A\002\022\014\n\004n" - + "ame\030\007 \001(\t\"\233\001\n\026SetNodePoolSizeRequest\022\026\n\n" - + "project_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026" - + "\n\ncluster_id\030\003 \001(\tB\002\030\001\022\030\n\014node_pool_id\030\004" - + " \001(\tB\002\030\001\022\027\n\nnode_count\030\005 \001(\005B\003\340A\002\022\014\n\004nam" - + "e\030\007 \001(\t\".\n\036CompleteNodePoolUpgradeReques" - + "t\022\014\n\004name\030\001 \001(\t\"\237\001\n\036RollbackNodePoolUpgr" - + "adeRequest\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zo" - + "ne\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(\tB\002\030\001\022\030\n\014" - + "node_pool_id\030\004 \001(\tB\002\030\001\022\014\n\004name\030\006 \001(\t\022\023\n\013" - + "respect_pdb\030\007 \001(\010\"J\n\025ListNodePoolsRespon" - + "se\0221\n\nnode_pools\030\001 \003(\0132\035.google.containe" - + "r.v1.NodePool\"\257\003\n\022ClusterAutoscaling\022$\n\034" - + "enable_node_autoprovisioning\030\001 \001(\010\022;\n\017re" - + "source_limits\030\002 \003(\0132\".google.container.v" - + "1.ResourceLimit\022W\n\023autoscaling_profile\030\003" - + " \001(\0162:.google.container.v1.ClusterAutosc" - + "aling.AutoscalingProfile\022b\n#autoprovisio" - + "ning_node_pool_defaults\030\004 \001(\01325.google.c" - + "ontainer.v1.AutoprovisioningNodePoolDefa" - + "ults\022\"\n\032autoprovisioning_locations\030\005 \003(\t" - + "\"U\n\022AutoscalingProfile\022\027\n\023PROFILE_UNSPEC" - + "IFIED\020\000\022\030\n\024OPTIMIZE_UTILIZATION\020\001\022\014\n\010BAL" - + "ANCED\020\002\"\370\003\n AutoprovisioningNodePoolDefa" - + "ults\022\024\n\014oauth_scopes\030\001 \003(\t\022\027\n\017service_ac" - + "count\030\002 \001(\t\022G\n\020upgrade_settings\030\003 \001(\0132-." - + "google.container.v1.NodePool.UpgradeSett" - + "ings\0227\n\nmanagement\030\004 \001(\0132#.google.contai" - + "ner.v1.NodeManagement\022\034\n\020min_cpu_platfor" - + "m\030\005 \001(\tB\002\030\001\022\024\n\014disk_size_gb\030\006 \001(\005\022\021\n\tdis" - + "k_type\030\007 \001(\t\022M\n\030shielded_instance_config" - + "\030\010 \001(\0132+.google.container.v1.ShieldedIns" - + "tanceConfig\022\031\n\021boot_disk_kms_key\030\t \001(\t\022\022" - + "\n\nimage_type\030\n \001(\t\0223\n&insecure_kubelet_r" - + "eadonly_port_enabled\030\r \001(\010H\000\210\001\001B)\n\'_inse" - + "cure_kubelet_readonly_port_enabled\"H\n\rRe" - + "sourceLimit\022\025\n\rresource_type\030\001 \001(\t\022\017\n\007mi" - + "nimum\030\002 \001(\003\022\017\n\007maximum\030\003 \001(\003\"\307\002\n\023NodePoo" - + "lAutoscaling\022\017\n\007enabled\030\001 \001(\010\022\026\n\016min_nod" - + "e_count\030\002 \001(\005\022\026\n\016max_node_count\030\003 \001(\005\022\027\n" - + "\017autoprovisioned\030\004 \001(\010\022P\n\017location_polic" - + "y\030\005 \001(\01627.google.container.v1.NodePoolAu" - + "toscaling.LocationPolicy\022\034\n\024total_min_no" - + "de_count\030\006 \001(\005\022\034\n\024total_max_node_count\030\007" - + " \001(\005\"H\n\016LocationPolicy\022\037\n\033LOCATION_POLIC" - + "Y_UNSPECIFIED\020\000\022\014\n\010BALANCED\020\001\022\007\n\003ANY\020\002\"\222" - + "\002\n\020SetLabelsRequest\022\026\n\nproject_id\030\001 \001(\tB" - + "\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(" - + "\tB\002\030\001\022W\n\017resource_labels\030\004 \003(\01329.google." - + "container.v1.SetLabelsRequest.ResourceLa" - + "belsEntryB\003\340A\002\022\036\n\021label_fingerprint\030\005 \001(" - + "\tB\003\340A\002\022\014\n\004name\030\007 \001(\t\0325\n\023ResourceLabelsEn" - + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"|\n\024S" - + "etLegacyAbacRequest\022\026\n\nproject_id\030\001 \001(\tB" - + "\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(" - + "\tB\002\030\001\022\024\n\007enabled\030\004 \001(\010B\003\340A\002\022\014\n\004name\030\006 \001(" - + "\t\"\204\001\n\026StartIPRotationRequest\022\026\n\nproject_" - + "id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluste" - + "r_id\030\003 \001(\tB\002\030\001\022\014\n\004name\030\006 \001(\t\022\032\n\022rotate_c" - + "redentials\030\007 \001(\010\"k\n\031CompleteIPRotationRe" + + " \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(\tB\002\030\001\022\037\n\022moni" + + "toring_service\030\004 \001(\tB\003\340A\002\022\014\n\004name\030\006 \001(\t\"" + + "\247\001\n\026SetAddonsConfigRequest\022\026\n\nproject_id" + + "\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_" + + "id\030\003 \001(\tB\002\030\001\022=\n\raddons_config\030\004 \001(\0132!.go" + + "ogle.container.v1.AddonsConfigB\003\340A\002\022\014\n\004n" + + "ame\030\006 \001(\t\"}\n\023SetLocationsRequest\022\026\n\nproj" + + "ect_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncl" + + "uster_id\030\003 \001(\tB\002\030\001\022\026\n\tlocations\030\004 \003(\tB\003\340" + + "A\002\022\014\n\004name\030\006 \001(\t\"\202\001\n\023UpdateMasterRequest" + + "\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002" + + "\030\001\022\026\n\ncluster_id\030\003 \001(\tB\002\030\001\022\033\n\016master_ver" + + "sion\030\004 \001(\tB\003\340A\002\022\014\n\004name\030\007 \001(\t\"\265\002\n\024SetMas" + + "terAuthRequest\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020" + + "\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(\tB\002\030\001" + + "\022E\n\006action\030\004 \001(\01620.google.container.v1.S" + + "etMasterAuthRequest.ActionB\003\340A\002\0224\n\006updat" + + "e\030\005 \001(\0132\037.google.container.v1.MasterAuth" + + "B\003\340A\002\022\014\n\004name\030\007 \001(\t\"P\n\006Action\022\013\n\007UNKNOWN" + + "\020\000\022\020\n\014SET_PASSWORD\020\001\022\025\n\021GENERATE_PASSWOR" + + "D\020\002\022\020\n\014SET_USERNAME\020\003\"f\n\024DeleteClusterRe" + "quest\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 " + "\001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(\tB\002\030\001\022\014\n\004name\030" - + "\007 \001(\t\"\305\002\n\021AcceleratorConfig\022\031\n\021accelerat" - + "or_count\030\001 \001(\003\022\030\n\020accelerator_type\030\002 \001(\t" - + "\022\032\n\022gpu_partition_size\030\003 \001(\t\022F\n\022gpu_shar" - + "ing_config\030\005 \001(\0132%.google.container.v1.G" - + "PUSharingConfigH\000\210\001\001\022]\n\036gpu_driver_insta" - + "llation_config\030\006 \001(\01320.google.container." - + "v1.GPUDriverInstallationConfigH\001\210\001\001B\025\n\023_" - + "gpu_sharing_configB!\n\037_gpu_driver_instal" - + "lation_config\"\372\001\n\020GPUSharingConfig\022\"\n\032ma" - + "x_shared_clients_per_gpu\030\001 \001(\003\022[\n\024gpu_sh" - + "aring_strategy\030\002 \001(\01628.google.container." - + "v1.GPUSharingConfig.GPUSharingStrategyH\000" - + "\210\001\001\"L\n\022GPUSharingStrategy\022$\n GPU_SHARING" - + "_STRATEGY_UNSPECIFIED\020\000\022\020\n\014TIME_SHARING\020" - + "\001B\027\n\025_gpu_sharing_strategy\"\204\002\n\033GPUDriver" - + "InstallationConfig\022b\n\022gpu_driver_version" - + "\030\001 \001(\0162A.google.container.v1.GPUDriverIn" - + "stallationConfig.GPUDriverVersionH\000\210\001\001\"j" - + "\n\020GPUDriverVersion\022\"\n\036GPU_DRIVER_VERSION" - + "_UNSPECIFIED\020\000\022\031\n\025INSTALLATION_DISABLED\020" - + "\001\022\013\n\007DEFAULT\020\002\022\n\n\006LATEST\020\003B\025\n\023_gpu_drive" - + "r_version\"\232\001\n\026WorkloadMetadataConfig\022>\n\004" - + "mode\030\002 \001(\01620.google.container.v1.Workloa" - + "dMetadataConfig.Mode\"@\n\004Mode\022\024\n\020MODE_UNS" - + "PECIFIED\020\000\022\020\n\014GCE_METADATA\020\001\022\020\n\014GKE_META" - + "DATA\020\002\"\252\001\n\027SetNetworkPolicyRequest\022\026\n\npr" + + "\004 \001(\t\"O\n\023ListClustersRequest\022\026\n\nproject_" + + "id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\016\n\006parent" + + "\030\004 \001(\t\"]\n\024ListClustersResponse\022.\n\010cluste" + + "rs\030\001 \003(\0132\034.google.container.v1.Cluster\022\025" + + "\n\rmissing_zones\030\002 \003(\t\"g\n\023GetOperationReq" + + "uest\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001" + + "(\tB\002\030\001\022\030\n\014operation_id\030\003 \001(\tB\002\030\001\022\014\n\004name" + + "\030\005 \001(\t\"Q\n\025ListOperationsRequest\022\026\n\nproje" + + "ct_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\016\n\006par" + + "ent\030\004 \001(\t\"j\n\026CancelOperationRequest\022\026\n\np" + + "roject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\030\n" + + "\014operation_id\030\003 \001(\tB\002\030\001\022\014\n\004name\030\004 \001(\t\"c\n" + + "\026ListOperationsResponse\0222\n\noperations\030\001 " + + "\003(\0132\036.google.container.v1.Operation\022\025\n\rm" + + "issing_zones\030\002 \003(\t\"P\n\026GetServerConfigReq" + + "uest\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001" + + "(\tB\002\030\001\022\014\n\004name\030\004 \001(\t\"\364\002\n\014ServerConfig\022\037\n" + + "\027default_cluster_version\030\001 \001(\t\022\033\n\023valid_" + + "node_versions\030\003 \003(\t\022\032\n\022default_image_typ" + + "e\030\004 \001(\t\022\031\n\021valid_image_types\030\005 \003(\t\022\035\n\025va" + + "lid_master_versions\030\006 \003(\t\022H\n\010channels\030\t " + + "\003(\01326.google.container.v1.ServerConfig.R" + + "eleaseChannelConfig\032\205\001\n\024ReleaseChannelCo" + + "nfig\022<\n\007channel\030\001 \001(\0162+.google.container" + + ".v1.ReleaseChannel.Channel\022\027\n\017default_ve" + + "rsion\030\002 \001(\t\022\026\n\016valid_versions\030\004 \003(\t\"\240\001\n\025" + + "CreateNodePoolRequest\022\026\n\nproject_id\030\001 \001(" + + "\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 " + + "\001(\tB\002\030\001\0225\n\tnode_pool\030\004 \001(\0132\035.google.cont" + + "ainer.v1.NodePoolB\003\340A\002\022\016\n\006parent\030\006 \001(\t\"\201" + + "\001\n\025DeleteNodePoolRequest\022\026\n\nproject_id\030\001" + + " \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id" + + "\030\003 \001(\tB\002\030\001\022\030\n\014node_pool_id\030\004 \001(\tB\002\030\001\022\014\n\004" + + "name\030\006 \001(\t\"h\n\024ListNodePoolsRequest\022\026\n\npr" + "oject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\n" - + "cluster_id\030\003 \001(\tB\002\030\001\022?\n\016network_policy\030\004" - + " \001(\0132\".google.container.v1.NetworkPolicy" - + "B\003\340A\002\022\014\n\004name\030\006 \001(\t\"\271\001\n\033SetMaintenancePo" - + "licyRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\021\n\004" - + "zone\030\002 \001(\tB\003\340A\002\022\027\n\ncluster_id\030\003 \001(\tB\003\340A\002" - + "\022G\n\022maintenance_policy\030\004 \001(\0132&.google.co", - "ntainer.v1.MaintenancePolicyB\003\340A\002\022\014\n\004nam" - + "e\030\005 \001(\t\"\251\002\n\017StatusCondition\022;\n\004code\030\001 \001(" - + "\0162).google.container.v1.StatusCondition." - + "CodeB\002\030\001\022\017\n\007message\030\002 \001(\t\022(\n\016canonical_c" - + "ode\030\003 \001(\0162\020.google.rpc.Code\"\235\001\n\004Code\022\013\n\007" - + "UNKNOWN\020\000\022\020\n\014GCE_STOCKOUT\020\001\022\037\n\033GKE_SERVI" - + "CE_ACCOUNT_DELETED\020\002\022\026\n\022GCE_QUOTA_EXCEED" - + "ED\020\003\022\023\n\017SET_BY_OPERATOR\020\004\022\027\n\023CLOUD_KMS_K" - + "EY_ERROR\020\007\022\017\n\013CA_EXPIRING\020\t\"\261\t\n\rNetworkC" - + "onfig\022\017\n\007network\030\001 \001(\t\022\022\n\nsubnetwork\030\002 \001" - + "(\t\022$\n\034enable_intra_node_visibility\030\005 \001(\010" - + "\022C\n\023default_snat_status\030\007 \001(\0132&.google.c" - + "ontainer.v1.DefaultSnatStatus\022\037\n\027enable_" - + "l4ilb_subsetting\030\n \001(\010\022@\n\021datapath_provi" - + "der\030\013 \001(\0162%.google.container.v1.Datapath" - + "Provider\022P\n\032private_ipv6_google_access\030\014" - + " \001(\0162,.google.container.v1.PrivateIPv6Go" - + "ogleAccess\0222\n\ndns_config\030\r \001(\0132\036.google." - + "container.v1.DNSConfig\022R\n\033service_extern" - + "al_ips_config\030\017 \001(\0132-.google.container.v" - + "1.ServiceExternalIPsConfig\022A\n\022gateway_ap" - + "i_config\030\020 \001(\0132%.google.container.v1.Gat" - + "ewayAPIConfig\022\037\n\027enable_multi_networking" - + "\030\021 \001(\010\022f\n\032network_performance_config\030\022 \001" - + "(\0132B.google.container.v1.NetworkConfig.C" - + "lusterNetworkPerformanceConfig\022\'\n\032enable" - + "_fqdn_network_policy\030\023 \001(\010H\000\210\001\001\022Y\n\034in_tr" - + "ansit_encryption_config\030\024 \001(\0162..google.c" - + "ontainer.v1.InTransitEncryptionConfigH\001\210" - + "\001\001\0225\n(enable_cilium_clusterwide_network_" - + "policy\030\025 \001(\010H\002\210\001\001\032\336\001\n\037ClusterNetworkPerf" - + "ormanceConfig\022q\n\033total_egress_bandwidth_" - + "tier\030\001 \001(\0162G.google.container.v1.Network" - + "Config.ClusterNetworkPerformanceConfig.T" - + "ierH\000\210\001\001\"(\n\004Tier\022\024\n\020TIER_UNSPECIFIED\020\000\022\n" - + "\n\006TIER_1\020\001B\036\n\034_total_egress_bandwidth_ti" - + "erB\035\n\033_enable_fqdn_network_policyB\037\n\035_in" - + "_transit_encryption_configB+\n)_enable_ci" - + "lium_clusterwide_network_policy\"\274\001\n\020Gate" - + "wayAPIConfig\022>\n\007channel\030\001 \001(\0162-.google.c" - + "ontainer.v1.GatewayAPIConfig.Channel\"h\n\007" - + "Channel\022\027\n\023CHANNEL_UNSPECIFIED\020\000\022\024\n\020CHAN" - + "NEL_DISABLED\020\001\022\030\n\024CHANNEL_EXPERIMENTAL\020\003" - + "\022\024\n\020CHANNEL_STANDARD\020\004\"+\n\030ServiceExterna" - + "lIPsConfig\022\017\n\007enabled\030\001 \001(\010\"(\n\026GetOpenID" - + "ConfigRequest\022\016\n\006parent\030\001 \001(\t\"\334\001\n\027GetOpe" - + "nIDConfigResponse\022\016\n\006issuer\030\001 \001(\t\022\020\n\010jwk" - + "s_uri\030\002 \001(\t\022 \n\030response_types_supported\030" - + "\003 \003(\t\022\037\n\027subject_types_supported\030\004 \003(\t\022-" - + "\n%id_token_signing_alg_values_supported\030" - + "\005 \003(\t\022\030\n\020claims_supported\030\006 \003(\t\022\023\n\013grant" - + "_types\030\007 \003(\t\"\'\n\025GetJSONWebKeysRequest\022\016\n" - + "\006parent\030\001 \001(\t\"r\n\003Jwk\022\013\n\003kty\030\001 \001(\t\022\013\n\003alg" - + "\030\002 \001(\t\022\013\n\003use\030\003 \001(\t\022\013\n\003kid\030\004 \001(\t\022\t\n\001n\030\005 " - + "\001(\t\022\t\n\001e\030\006 \001(\t\022\t\n\001x\030\007 \001(\t\022\t\n\001y\030\010 \001(\t\022\013\n\003" - + "crv\030\t \001(\t\"@\n\026GetJSONWebKeysResponse\022&\n\004k" - + "eys\030\001 \003(\0132\030.google.container.v1.Jwk\"2\n\"C" - + "heckAutopilotCompatibilityRequest\022\014\n\004nam" - + "e\030\001 \001(\t\"\374\002\n\033AutopilotCompatibilityIssue\022" - + "4\n\020last_observation\030\001 \001(\0132\032.google.proto" - + "buf.Timestamp\022\027\n\017constraint_type\030\002 \001(\t\022X" - + "\n\024incompatibility_type\030\003 \001(\0162:.google.co" - + "ntainer.v1.AutopilotCompatibilityIssue.I" - + "ssueType\022\020\n\010subjects\030\004 \003(\t\022\031\n\021documentat" - + "ion_url\030\005 \001(\t\022\023\n\013description\030\006 \001(\t\"r\n\tIs" - + "sueType\022\017\n\013UNSPECIFIED\020\000\022\023\n\017INCOMPATIBIL" - + "ITY\020\001\022\036\n\032ADDITIONAL_CONFIG_REQUIRED\020\002\022\037\n" - + "\033PASSED_WITH_OPTIONAL_CONFIG\020\003\"x\n#CheckA" - + "utopilotCompatibilityResponse\022@\n\006issues\030" - + "\001 \003(\01320.google.container.v1.AutopilotCom" - + "patibilityIssue\022\017\n\007summary\030\002 \001(\t\"\216\001\n\016Rel" - + "easeChannel\022<\n\007channel\030\001 \001(\0162+.google.co" - + "ntainer.v1.ReleaseChannel.Channel\">\n\007Cha" - + "nnel\022\017\n\013UNSPECIFIED\020\000\022\t\n\005RAPID\020\001\022\013\n\007REGU" - + "LAR\020\002\022\n\n\006STABLE\020\003\"\'\n\024CostManagementConfi" - + "g\022\017\n\007enabled\030\001 \001(\010\",\n\031IntraNodeVisibilit" - + "yConfig\022\017\n\007enabled\030\001 \001(\010\"&\n\023ILBSubsettin" - + "gConfig\022\017\n\007enabled\030\001 \001(\010\"\313\002\n\tDNSConfig\022<" - + "\n\013cluster_dns\030\001 \001(\0162\'.google.container.v" - + "1.DNSConfig.Provider\022B\n\021cluster_dns_scop" - + "e\030\002 \001(\0162\'.google.container.v1.DNSConfig." - + "DNSScope\022\032\n\022cluster_dns_domain\030\003 \001(\t\"W\n\010" - + "Provider\022\030\n\024PROVIDER_UNSPECIFIED\020\000\022\024\n\020PL" - + "ATFORM_DEFAULT\020\001\022\r\n\tCLOUD_DNS\020\002\022\014\n\010KUBE_" - + "DNS\020\003\"G\n\010DNSScope\022\031\n\025DNS_SCOPE_UNSPECIFI" - + "ED\020\000\022\021\n\rCLUSTER_SCOPE\020\001\022\r\n\tVPC_SCOPE\020\002\"." - + "\n\021MaxPodsConstraint\022\031\n\021max_pods_per_node" - + "\030\001 \001(\003\"/\n\026WorkloadIdentityConfig\022\025\n\rwork" - + "load_pool\030\002 \001(\t\"(\n\025IdentityServiceConfig" - + "\022\017\n\007enabled\030\001 \001(\010\"K\n\020MeshCertificates\0227\n" - + "\023enable_certificates\030\001 \001(\0132\032.google.prot" - + "obuf.BoolValue\"\343\005\n\022DatabaseEncryption\022\020\n" - + "\010key_name\030\001 \001(\t\022<\n\005state\030\002 \001(\0162-.google." - + "container.v1.DatabaseEncryption.State\022U\n" - + "\rcurrent_state\030\003 \001(\01624.google.container." - + "v1.DatabaseEncryption.CurrentStateB\003\340A\003H" - + "\000\210\001\001\022\034\n\017decryption_keys\030\004 \003(\tB\003\340A\003\022Z\n\025la" - + "st_operation_errors\030\005 \003(\01326.google.conta" - + "iner.v1.DatabaseEncryption.OperationErro" - + "rB\003\340A\003\032h\n\016OperationError\022\020\n\010key_name\030\001 \001" - + "(\t\022\025\n\rerror_message\030\002 \001(\t\022-\n\ttimestamp\030\003" - + " \001(\0132\032.google.protobuf.Timestamp\"2\n\005Stat" - + "e\022\013\n\007UNKNOWN\020\000\022\r\n\tENCRYPTED\020\001\022\r\n\tDECRYPT" - + "ED\020\002\"\373\001\n\014CurrentState\022\035\n\031CURRENT_STATE_U" - + "NSPECIFIED\020\000\022\033\n\027CURRENT_STATE_ENCRYPTED\020" - + "\007\022\033\n\027CURRENT_STATE_DECRYPTED\020\002\022$\n CURREN" - + "T_STATE_ENCRYPTION_PENDING\020\003\022\"\n\036CURRENT_" - + "STATE_ENCRYPTION_ERROR\020\004\022$\n CURRENT_STAT" - + "E_DECRYPTION_PENDING\020\005\022\"\n\036CURRENT_STATE_" - + "DECRYPTION_ERROR\020\006B\020\n\016_current_state\"e\n\034" - + "ListUsableSubnetworksRequest\022\016\n\006parent\030\001" - + " \001(\t\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022" - + "\022\n\npage_token\030\004 \001(\t\"t\n\035ListUsableSubnetw" - + "orksResponse\022:\n\013subnetworks\030\001 \003(\0132%.goog" - + "le.container.v1.UsableSubnetwork\022\027\n\017next" - + "_page_token\030\002 \001(\t\"\200\002\n\036UsableSubnetworkSe" - + "condaryRange\022\022\n\nrange_name\030\001 \001(\t\022\025\n\rip_c" - + "idr_range\030\002 \001(\t\022J\n\006status\030\003 \001(\0162:.google" - + ".container.v1.UsableSubnetworkSecondaryR" - + "ange.Status\"g\n\006Status\022\013\n\007UNKNOWN\020\000\022\n\n\006UN" - + "USED\020\001\022\022\n\016IN_USE_SERVICE\020\002\022\030\n\024IN_USE_SHA" - + "REABLE_POD\020\003\022\026\n\022IN_USE_MANAGED_POD\020\004\"\270\001\n" - + "\020UsableSubnetwork\022\022\n\nsubnetwork\030\001 \001(\t\022\017\n" - + "\007network\030\002 \001(\t\022\025\n\rip_cidr_range\030\003 \001(\t\022P\n" - + "\023secondary_ip_ranges\030\004 \003(\01323.google.cont" - + "ainer.v1.UsableSubnetworkSecondaryRange\022" - + "\026\n\016status_message\030\005 \001(\t\"\355\002\n\031ResourceUsag" - + "eExportConfig\022`\n\024bigquery_destination\030\001 " - + "\001(\0132B.google.container.v1.ResourceUsageE" - + "xportConfig.BigQueryDestination\022&\n\036enabl" - + "e_network_egress_metering\030\002 \001(\010\022m\n\033consu" - + "mption_metering_config\030\003 \001(\0132H.google.co" - + "ntainer.v1.ResourceUsageExportConfig.Con" - + "sumptionMeteringConfig\032)\n\023BigQueryDestin" - + "ation\022\022\n\ndataset_id\030\001 \001(\t\032,\n\031Consumption" - + "MeteringConfig\022\017\n\007enabled\030\001 \001(\010\")\n\026Verti" - + "calPodAutoscaling\022\017\n\007enabled\030\001 \001(\010\"%\n\021De" - + "faultSnatStatus\022\020\n\010disabled\030\001 \001(\010\" \n\rShi" - + "eldedNodes\022\017\n\007enabled\030\001 \001(\010\"\035\n\nVirtualNI" - + "C\022\017\n\007enabled\030\001 \001(\010\"\035\n\nFastSocket\022\017\n\007enab" - + "led\030\001 \001(\010\"\250\003\n\022NotificationConfig\022>\n\006pubs" - + "ub\030\001 \001(\0132..google.container.v1.Notificat" - + "ionConfig.PubSub\032\212\001\n\006PubSub\022\017\n\007enabled\030\001" - + " \001(\010\022/\n\005topic\030\002 \001(\tB \372A\035\n\033pubsub.googlea" - + "pis.com/Topic\022>\n\006filter\030\003 \001(\0132..google.c" - + "ontainer.v1.NotificationConfig.Filter\032O\n" - + "\006Filter\022E\n\nevent_type\030\001 \003(\01621.google.con" - + "tainer.v1.NotificationConfig.EventType\"t" - + "\n\tEventType\022\032\n\026EVENT_TYPE_UNSPECIFIED\020\000\022" - + "\033\n\027UPGRADE_AVAILABLE_EVENT\020\001\022\021\n\rUPGRADE_" - + "EVENT\020\002\022\033\n\027SECURITY_BULLETIN_EVENT\020\003\"$\n\021" - + "ConfidentialNodes\022\017\n\007enabled\030\001 \001(\010\"\337\001\n\014U" - + "pgradeEvent\022?\n\rresource_type\030\001 \001(\0162(.goo" - + "gle.container.v1.UpgradeResourceType\022\021\n\t" - + "operation\030\002 \001(\t\0228\n\024operation_start_time\030" - + "\003 \001(\0132\032.google.protobuf.Timestamp\022\027\n\017cur" - + "rent_version\030\004 \001(\t\022\026\n\016target_version\030\005 \001" - + "(\t\022\020\n\010resource\030\006 \001(\t\"\271\001\n\025UpgradeAvailabl" - + "eEvent\022\017\n\007version\030\001 \001(\t\022?\n\rresource_type" - + "\030\002 \001(\0162(.google.container.v1.UpgradeReso" - + "urceType\022<\n\017release_channel\030\003 \001(\0132#.goog" - + "le.container.v1.ReleaseChannel\022\020\n\010resour" - + "ce\030\004 \001(\t\"\236\002\n\025SecurityBulletinEvent\022\036\n\026re" - + "source_type_affected\030\001 \001(\t\022\023\n\013bulletin_i" - + "d\030\002 \001(\t\022\017\n\007cve_ids\030\003 \003(\t\022\020\n\010severity\030\004 \001" - + "(\t\022\024\n\014bulletin_uri\030\005 \001(\t\022\031\n\021brief_descri" - + "ption\030\006 \001(\t\022!\n\031affected_supported_minors" - + "\030\007 \003(\t\022\030\n\020patched_versions\030\010 \003(\t\022 \n\030sugg" - + "ested_upgrade_target\030\t \001(\t\022\035\n\025manual_ste" - + "ps_required\030\n \001(\010\"g\n\tAutopilot\022\017\n\007enable" - + "d\030\001 \001(\010\022I\n\026workload_policy_config\030\002 \001(\0132" - + ").google.container.v1.WorkloadPolicyConf" - + "ig\"H\n\024WorkloadPolicyConfig\022\034\n\017allow_net_" - + "admin\030\001 \001(\010H\000\210\001\001B\022\n\020_allow_net_admin\"V\n\r" - + "LoggingConfig\022E\n\020component_config\030\001 \001(\0132" - + "+.google.container.v1.LoggingComponentCo" - + "nfig\"\357\001\n\026LoggingComponentConfig\022P\n\021enabl" - + "e_components\030\001 \003(\01625.google.container.v1" - + ".LoggingComponentConfig.Component\"\202\001\n\tCo" - + "mponent\022\031\n\025COMPONENT_UNSPECIFIED\020\000\022\025\n\021SY" - + "STEM_COMPONENTS\020\001\022\r\n\tWORKLOADS\020\002\022\r\n\tAPIS" - + "ERVER\020\003\022\r\n\tSCHEDULER\020\004\022\026\n\022CONTROLLER_MAN" - + "AGER\020\005\"\227\002\n\020MonitoringConfig\022H\n\020component" - + "_config\030\001 \001(\0132..google.container.v1.Moni" - + "toringComponentConfig\022O\n\031managed_prometh" - + "eus_config\030\002 \001(\0132,.google.container.v1.M" - + "anagedPrometheusConfig\022h\n&advanced_datap" - + "ath_observability_config\030\003 \001(\01328.google." - + "container.v1.AdvancedDatapathObservabili" - + "tyConfig\"\236\002\n#AdvancedDatapathObservabili" - + "tyConfig\022\026\n\016enable_metrics\030\001 \001(\010\022V\n\nrela" - + "y_mode\030\002 \001(\0162B.google.container.v1.Advan" - + "cedDatapathObservabilityConfig.RelayMode" - + "\022\031\n\014enable_relay\030\003 \001(\010H\000\210\001\001\"[\n\tRelayMode" - + "\022\032\n\026RELAY_MODE_UNSPECIFIED\020\000\022\014\n\010DISABLED" - + "\020\001\022\023\n\017INTERNAL_VPC_LB\020\003\022\017\n\013EXTERNAL_LB\020\004" - + "B\017\n\r_enable_relay\"Z\n\025NodePoolLoggingConf" - + "ig\022A\n\016variant_config\030\001 \001(\0132).google.cont" - + "ainer.v1.LoggingVariantConfig\"\237\001\n\024Loggin" - + "gVariantConfig\022B\n\007variant\030\001 \001(\01621.google" - + ".container.v1.LoggingVariantConfig.Varia" - + "nt\"C\n\007Variant\022\027\n\023VARIANT_UNSPECIFIED\020\000\022\013" - + "\n\007DEFAULT\020\001\022\022\n\016MAX_THROUGHPUT\020\002\"\265\002\n\031Moni" - + "toringComponentConfig\022S\n\021enable_componen" - + "ts\030\001 \003(\01628.google.container.v1.Monitorin" - + "gComponentConfig.Component\"\302\001\n\tComponent" - + "\022\031\n\025COMPONENT_UNSPECIFIED\020\000\022\025\n\021SYSTEM_CO" - + "MPONENTS\020\001\022\r\n\tAPISERVER\020\003\022\r\n\tSCHEDULER\020\004" - + "\022\026\n\022CONTROLLER_MANAGER\020\005\022\013\n\007STORAGE\020\007\022\007\n" - + "\003HPA\020\010\022\007\n\003POD\020\t\022\r\n\tDAEMONSET\020\n\022\016\n\nDEPLOY" - + "MENT\020\013\022\017\n\013STATEFULSET\020\014\"*\n\027ManagedPromet" - + "heusConfig\022\017\n\007enabled\030\001 \001(\010\"D\n\005Fleet\022\017\n\007" - + "project\030\001 \001(\t\022\022\n\nmembership\030\002 \001(\t\022\026\n\016pre" - + "_registered\030\003 \001(\010\"2\n\027LocalNvmeSsdBlockCo" - + "nfig\022\027\n\017local_ssd_count\030\001 \001(\005\"9\n\036Ephemer" - + "alStorageLocalSsdConfig\022\027\n\017local_ssd_cou" - + "nt\030\001 \001(\005\"\204\001\n\023ResourceManagerTags\022@\n\004tags" - + "\030\001 \003(\01322.google.container.v1.ResourceMan" - + "agerTags.TagsEntry\032+\n\tTagsEntry\022\013\n\003key\030\001" - + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\253\001\n\020EnterpriseCo" - + "nfig\022L\n\014cluster_tier\030\001 \001(\01621.google.cont" - + "ainer.v1.EnterpriseConfig.ClusterTierB\003\340" - + "A\003\"I\n\013ClusterTier\022\034\n\030CLUSTER_TIER_UNSPEC" - + "IFIED\020\000\022\014\n\010STANDARD\020\001\022\016\n\nENTERPRISE\020\002\"\233\001" - + "\n\021SecondaryBootDisk\0229\n\004mode\030\001 \001(\0162+.goog" - + "le.container.v1.SecondaryBootDisk.Mode\022\022" - + "\n\ndisk_image\030\002 \001(\t\"7\n\004Mode\022\024\n\020MODE_UNSPE" - + "CIFIED\020\000\022\031\n\025CONTAINER_IMAGE_CACHE\020\001\"!\n\037S" - + "econdaryBootDiskUpdateStrategy*\306\001\n\027Priva" - + "teIPv6GoogleAccess\022*\n&PRIVATE_IPV6_GOOGL" - + "E_ACCESS_UNSPECIFIED\020\000\022\'\n#PRIVATE_IPV6_G" - + "OOGLE_ACCESS_DISABLED\020\001\022(\n$PRIVATE_IPV6_" - + "GOOGLE_ACCESS_TO_GOOGLE\020\002\022,\n(PRIVATE_IPV" - + "6_GOOGLE_ACCESS_BIDIRECTIONAL\020\003*W\n\023Upgra" - + "deResourceType\022%\n!UPGRADE_RESOURCE_TYPE_" - + "UNSPECIFIED\020\000\022\n\n\006MASTER\020\001\022\r\n\tNODE_POOL\020\002" - + "*a\n\020DatapathProvider\022!\n\035DATAPATH_PROVIDE" - + "R_UNSPECIFIED\020\000\022\023\n\017LEGACY_DATAPATH\020\001\022\025\n\021" - + "ADVANCED_DATAPATH\020\002*^\n\026NodePoolUpdateStr" - + "ategy\022)\n%NODE_POOL_UPDATE_STRATEGY_UNSPE" - + "CIFIED\020\000\022\016\n\nBLUE_GREEN\020\002\022\t\n\005SURGE\020\003*@\n\tS" - + "tackType\022\032\n\026STACK_TYPE_UNSPECIFIED\020\000\022\010\n\004" - + "IPV4\020\001\022\r\n\tIPV4_IPV6\020\002*N\n\016IPv6AccessType\022" - + " \n\034IPV6_ACCESS_TYPE_UNSPECIFIED\020\000\022\014\n\010INT" - + "ERNAL\020\001\022\014\n\010EXTERNAL\020\002*\237\001\n\031InTransitEncry" - + "ptionConfig\022,\n(IN_TRANSIT_ENCRYPTION_CON" - + "FIG_UNSPECIFIED\020\000\022\"\n\036IN_TRANSIT_ENCRYPTI" - + "ON_DISABLED\020\001\0220\n,IN_TRANSIT_ENCRYPTION_I" - + "NTER_NODE_TRANSPARENT\020\0022\250I\n\016ClusterManag" - + "er\022\350\001\n\014ListClusters\022(.google.container.v" - + "1.ListClustersRequest\032).google.container" - + ".v1.ListClustersResponse\"\202\001\332A\017project_id" - + ",zone\332A\006parent\202\323\344\223\002a\022,/v1/{parent=projec" - + "ts/*/locations/*}/clustersZ1\022//v1/projec" - + "ts/{project_id}/zones/{zone}/clusters\022\355\001" - + "\n\nGetCluster\022&.google.container.v1.GetCl" - + "usterRequest\032\034.google.container.v1.Clust" - + "er\"\230\001\332A\032project_id,zone,cluster_id\332A\004nam" - + "e\202\323\344\223\002n\022,/v1/{name=projects/*/locations/" - + "*/clusters/*}Z>\022\n\016network_con" + + "fig\030\016 \001(\0132&.google.container.v1.NodeNetw" + + "orkConfig\022\021\n\tself_link\030d \001(\t\022\017\n\007version\030" + + "e \001(\t\022\033\n\023instance_group_urls\030f \003(\t\0224\n\006st" + + "atus\030g \001(\0162$.google.container.v1.NodePoo" + + "l.Status\022\032\n\016status_message\030h \001(\tB\002\030\001\022=\n\013" + + "autoscaling\030\004 \001(\0132(.google.container.v1." + + "NodePoolAutoscaling\0227\n\nmanagement\030\005 \001(\0132" + + "#.google.container.v1.NodeManagement\022C\n\023" + + "max_pods_constraint\030\006 \001(\0132&.google.conta" + + "iner.v1.MaxPodsConstraint\0228\n\nconditions\030" + + "i \003(\0132$.google.container.v1.StatusCondit" + + "ion\022\032\n\022pod_ipv4_cidr_size\030\007 \001(\005\022G\n\020upgra" + + "de_settings\030k \001(\0132-.google.container.v1." + + "NodePool.UpgradeSettings\022G\n\020placement_po" + + "licy\030l \001(\0132-.google.container.v1.NodePoo" + + "l.PlacementPolicy\022B\n\013update_info\030m \001(\0132(" + + ".google.container.v1.NodePool.UpdateInfo" + + "B\003\340A\003\022\014\n\004etag\030n \001(\t\022M\n\023queued_provisioni" + + "ng\030p \001(\01320.google.container.v1.NodePool." + + "QueuedProvisioning\022M\n\030best_effort_provis" + + "ioning\030q \001(\0132+.google.container.v1.BestE" + + "ffortProvisioning\032\360\001\n\017UpgradeSettings\022\021\n" + + "\tmax_surge\030\001 \001(\005\022\027\n\017max_unavailable\030\002 \001(" + + "\005\022B\n\010strategy\030\003 \001(\0162+.google.container.v" + + "1.NodePoolUpdateStrategyH\000\210\001\001\022H\n\023blue_gr" + + "een_settings\030\004 \001(\0132&.google.container.v1" + + ".BlueGreenSettingsH\001\210\001\001B\013\n\t_strategyB\026\n\024" + + "_blue_green_settings\032\210\004\n\nUpdateInfo\022O\n\017b" + + "lue_green_info\030\001 \001(\01326.google.container." + + "v1.NodePool.UpdateInfo.BlueGreenInfo\032\250\003\n" + + "\rBlueGreenInfo\022K\n\005phase\030\001 \001(\0162<.google.c" + + "ontainer.v1.NodePool.UpdateInfo.BlueGree" + + "nInfo.Phase\022 \n\030blue_instance_group_urls\030" + + "\002 \003(\t\022!\n\031green_instance_group_urls\030\003 \003(\t" + + "\022%\n\035blue_pool_deletion_start_time\030\004 \001(\t\022" + + "\032\n\022green_pool_version\030\005 \001(\t\"\301\001\n\005Phase\022\025\n" + + "\021PHASE_UNSPECIFIED\020\000\022\022\n\016UPDATE_STARTED\020\001" + + "\022\027\n\023CREATING_GREEN_POOL\020\002\022\027\n\023CORDONING_B" + + "LUE_POOL\020\003\022\026\n\022DRAINING_BLUE_POOL\020\004\022\025\n\021NO" + + "DE_POOL_SOAKING\020\005\022\026\n\022DELETING_BLUE_POOL\020" + + "\006\022\024\n\020ROLLBACK_STARTED\020\007\032\256\001\n\017PlacementPol" + + "icy\022@\n\004type\030\001 \001(\01622.google.container.v1." + + "NodePool.PlacementPolicy.Type\022\031\n\014tpu_top" + + "ology\030\002 \001(\tB\003\340A\001\022\023\n\013policy_name\030\003 \001(\t\")\n" + + "\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\013\n\007COMPACT\020\001" + + "\032%\n\022QueuedProvisioning\022\017\n\007enabled\030\001 \001(\010\"" + + "\201\001\n\006Status\022\026\n\022STATUS_UNSPECIFIED\020\000\022\020\n\014PR" + + "OVISIONING\020\001\022\013\n\007RUNNING\020\002\022\026\n\022RUNNING_WIT" + + "H_ERROR\020\003\022\017\n\013RECONCILING\020\004\022\014\n\010STOPPING\020\005" + + "\022\t\n\005ERROR\020\006\"}\n\016NodeManagement\022\024\n\014auto_up" + + "grade\030\001 \001(\010\022\023\n\013auto_repair\030\002 \001(\010\022@\n\017upgr" + + "ade_options\030\n \001(\0132\'.google.container.v1." + + "AutoUpgradeOptions\"F\n\026BestEffortProvisio" + + "ning\022\017\n\007enabled\030\001 \001(\010\022\033\n\023min_provision_n" + + "odes\030\002 \001(\005\"J\n\022AutoUpgradeOptions\022\037\n\027auto" + + "_upgrade_start_time\030\001 \001(\t\022\023\n\013description" + + "\030\002 \001(\t\"e\n\021MaintenancePolicy\0226\n\006window\030\001 " + + "\001(\0132&.google.container.v1.MaintenanceWin" + + "dow\022\030\n\020resource_version\030\003 \001(\t\"\366\002\n\021Mainte" + + "nanceWindow\022O\n\030daily_maintenance_window\030" + + "\002 \001(\0132+.google.container.v1.DailyMainten" + + "anceWindowH\000\022D\n\020recurring_window\030\003 \001(\0132(" + + ".google.container.v1.RecurringTimeWindow" + + "H\000\022a\n\026maintenance_exclusions\030\004 \003(\0132A.goo" + + "gle.container.v1.MaintenanceWindow.Maint" + + "enanceExclusionsEntry\032]\n\032MaintenanceExcl" + + "usionsEntry\022\013\n\003key\030\001 \001(\t\022.\n\005value\030\002 \001(\0132" + + "\037.google.container.v1.TimeWindow:\0028\001B\010\n\006" + + "policy\"\320\001\n\nTimeWindow\022Y\n\035maintenance_exc" + + "lusion_options\030\003 \001(\01320.google.container." + + "v1.MaintenanceExclusionOptionsH\000\022.\n\nstar" + + "t_time\030\001 \001(\0132\032.google.protobuf.Timestamp" + + "\022,\n\010end_time\030\002 \001(\0132\032.google.protobuf.Tim" + + "estampB\t\n\007options\"\264\001\n\033MaintenanceExclusi" + + "onOptions\022E\n\005scope\030\001 \001(\01626.google.contai" + + "ner.v1.MaintenanceExclusionOptions.Scope" + + "\"N\n\005Scope\022\017\n\013NO_UPGRADES\020\000\022\025\n\021NO_MINOR_U" + + "PGRADES\020\001\022\035\n\031NO_MINOR_OR_NODE_UPGRADES\020\002" + + "\"Z\n\023RecurringTimeWindow\022/\n\006window\030\001 \001(\0132" + + "\037.google.container.v1.TimeWindow\022\022\n\nrecu" + + "rrence\030\002 \001(\t\">\n\026DailyMaintenanceWindow\022\022" + + "\n\nstart_time\030\002 \001(\t\022\020\n\010duration\030\003 \001(\t\"\306\001\n" + + "\034SetNodePoolManagementRequest\022\026\n\nproject" + + "_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\nclust" + + "er_id\030\003 \001(\tB\002\030\001\022\030\n\014node_pool_id\030\004 \001(\tB\002\030" + + "\001\022<\n\nmanagement\030\005 \001(\0132#.google.container" + + ".v1.NodeManagementB\003\340A\002\022\014\n\004name\030\007 \001(\t\"\233\001" + + "\n\026SetNodePoolSizeRequest\022\026\n\nproject_id\030\001" + + " \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id" + + "\030\003 \001(\tB\002\030\001\022\030\n\014node_pool_id\030\004 \001(\tB\002\030\001\022\027\n\n" + + "node_count\030\005 \001(\005B\003\340A\002\022\014\n\004name\030\007 \001(\t\".\n\036C" + + "ompleteNodePoolUpgradeRequest\022\014\n\004name\030\001 " + + "\001(\t\"\237\001\n\036RollbackNodePoolUpgradeRequest\022\026" + + "\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001" + + "\022\026\n\ncluster_id\030\003 \001(\tB\002\030\001\022\030\n\014node_pool_id" + + "\030\004 \001(\tB\002\030\001\022\014\n\004name\030\006 \001(\t\022\023\n\013respect_pdb\030" + + "\007 \001(\010\"J\n\025ListNodePoolsResponse\0221\n\nnode_p" + + "ools\030\001 \003(\0132\035.google.container.v1.NodePoo" + + "l\"\257\003\n\022ClusterAutoscaling\022$\n\034enable_node_" + + "autoprovisioning\030\001 \001(\010\022;\n\017resource_limit" + + "s\030\002 \003(\0132\".google.container.v1.ResourceLi" + + "mit\022W\n\023autoscaling_profile\030\003 \001(\0162:.googl" + + "e.container.v1.ClusterAutoscaling.Autosc" + + "alingProfile\022b\n#autoprovisioning_node_po" + + "ol_defaults\030\004 \001(\01325.google.container.v1." + + "AutoprovisioningNodePoolDefaults\022\"\n\032auto" + + "provisioning_locations\030\005 \003(\t\"U\n\022Autoscal" + + "ingProfile\022\027\n\023PROFILE_UNSPECIFIED\020\000\022\030\n\024O" + + "PTIMIZE_UTILIZATION\020\001\022\014\n\010BALANCED\020\002\"\370\003\n " + + "AutoprovisioningNodePoolDefaults\022\024\n\014oaut" + + "h_scopes\030\001 \003(\t\022\027\n\017service_account\030\002 \001(\t\022" + + "G\n\020upgrade_settings\030\003 \001(\0132-.google.conta" + + "iner.v1.NodePool.UpgradeSettings\0227\n\nmana" + + "gement\030\004 \001(\0132#.google.container.v1.NodeM" + + "anagement\022\034\n\020min_cpu_platform\030\005 \001(\tB\002\030\001\022" + + "\024\n\014disk_size_gb\030\006 \001(\005\022\021\n\tdisk_type\030\007 \001(\t" + + "\022M\n\030shielded_instance_config\030\010 \001(\0132+.goo" + + "gle.container.v1.ShieldedInstanceConfig\022" + + "\031\n\021boot_disk_kms_key\030\t \001(\t\022\022\n\nimage_type" + + "\030\n \001(\t\0223\n&insecure_kubelet_readonly_port" + + "_enabled\030\r \001(\010H\000\210\001\001B)\n\'_insecure_kubelet" + + "_readonly_port_enabled\"H\n\rResourceLimit\022" + + "\025\n\rresource_type\030\001 \001(\t\022\017\n\007minimum\030\002 \001(\003\022" + + "\017\n\007maximum\030\003 \001(\003\"\307\002\n\023NodePoolAutoscaling" + + "\022\017\n\007enabled\030\001 \001(\010\022\026\n\016min_node_count\030\002 \001(" + + "\005\022\026\n\016max_node_count\030\003 \001(\005\022\027\n\017autoprovisi" + + "oned\030\004 \001(\010\022P\n\017location_policy\030\005 \001(\01627.go" + + "ogle.container.v1.NodePoolAutoscaling.Lo" + + "cationPolicy\022\034\n\024total_min_node_count\030\006 \001" + + "(\005\022\034\n\024total_max_node_count\030\007 \001(\005\"H\n\016Loca" + + "tionPolicy\022\037\n\033LOCATION_POLICY_UNSPECIFIE" + + "D\020\000\022\014\n\010BALANCED\020\001\022\007\n\003ANY\020\002\"\222\002\n\020SetLabels" + + "Request\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030" + + "\002 \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(\tB\002\030\001\022W\n\017res" + + "ource_labels\030\004 \003(\01329.google.container.v1" + + ".SetLabelsRequest.ResourceLabelsEntryB\003\340" + + "A\002\022\036\n\021label_fingerprint\030\005 \001(\tB\003\340A\002\022\014\n\004na" + + "me\030\007 \001(\t\0325\n\023ResourceLabelsEntry\022\013\n\003key\030\001", + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"|\n\024SetLegacyAbac" + + "Request\022\026\n\nproject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030" + + "\002 \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(\tB\002\030\001\022\024\n\007ena" + + "bled\030\004 \001(\010B\003\340A\002\022\014\n\004name\030\006 \001(\t\"\204\001\n\026StartI" + + "PRotationRequest\022\026\n\nproject_id\030\001 \001(\tB\002\030\001" + + "\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\ncluster_id\030\003 \001(\tB\002" + + "\030\001\022\014\n\004name\030\006 \001(\t\022\032\n\022rotate_credentials\030\007" + + " \001(\010\"k\n\031CompleteIPRotationRequest\022\026\n\npro" + + "ject_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\nc" + + "luster_id\030\003 \001(\tB\002\030\001\022\014\n\004name\030\007 \001(\t\"\305\002\n\021Ac" + + "celeratorConfig\022\031\n\021accelerator_count\030\001 \001" + + "(\003\022\030\n\020accelerator_type\030\002 \001(\t\022\032\n\022gpu_part" + + "ition_size\030\003 \001(\t\022F\n\022gpu_sharing_config\030\005" + + " \001(\0132%.google.container.v1.GPUSharingCon" + + "figH\000\210\001\001\022]\n\036gpu_driver_installation_conf" + + "ig\030\006 \001(\01320.google.container.v1.GPUDriver" + + "InstallationConfigH\001\210\001\001B\025\n\023_gpu_sharing_" + + "configB!\n\037_gpu_driver_installation_confi" + + "g\"\203\002\n\020GPUSharingConfig\022\"\n\032max_shared_cli" + + "ents_per_gpu\030\001 \001(\003\022[\n\024gpu_sharing_strate" + + "gy\030\002 \001(\01628.google.container.v1.GPUSharin" + + "gConfig.GPUSharingStrategyH\000\210\001\001\"U\n\022GPUSh" + + "aringStrategy\022$\n GPU_SHARING_STRATEGY_UN" + + "SPECIFIED\020\000\022\020\n\014TIME_SHARING\020\001\022\007\n\003MPS\020\002B\027" + + "\n\025_gpu_sharing_strategy\"\204\002\n\033GPUDriverIns" + + "tallationConfig\022b\n\022gpu_driver_version\030\001 " + + "\001(\0162A.google.container.v1.GPUDriverInsta" + + "llationConfig.GPUDriverVersionH\000\210\001\001\"j\n\020G" + + "PUDriverVersion\022\"\n\036GPU_DRIVER_VERSION_UN" + + "SPECIFIED\020\000\022\031\n\025INSTALLATION_DISABLED\020\001\022\013" + + "\n\007DEFAULT\020\002\022\n\n\006LATEST\020\003B\025\n\023_gpu_driver_v" + + "ersion\"\232\001\n\026WorkloadMetadataConfig\022>\n\004mod" + + "e\030\002 \001(\01620.google.container.v1.WorkloadMe" + + "tadataConfig.Mode\"@\n\004Mode\022\024\n\020MODE_UNSPEC" + + "IFIED\020\000\022\020\n\014GCE_METADATA\020\001\022\020\n\014GKE_METADAT" + + "A\020\002\"\252\001\n\027SetNetworkPolicyRequest\022\026\n\nproje" + + "ct_id\030\001 \001(\tB\002\030\001\022\020\n\004zone\030\002 \001(\tB\002\030\001\022\026\n\nclu" + + "ster_id\030\003 \001(\tB\002\030\001\022?\n\016network_policy\030\004 \001(" + + "\0132\".google.container.v1.NetworkPolicyB\003\340" + + "A\002\022\014\n\004name\030\006 \001(\t\"\271\001\n\033SetMaintenancePolic" + + "yRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\021\n\004zon" + + "e\030\002 \001(\tB\003\340A\002\022\027\n\ncluster_id\030\003 \001(\tB\003\340A\002\022G\n" + + "\022maintenance_policy\030\004 \001(\0132&.google.conta" + + "iner.v1.MaintenancePolicyB\003\340A\002\022\014\n\004name\030\005" + + " \001(\t\"\251\002\n\017StatusCondition\022;\n\004code\030\001 \001(\0162)" + + ".google.container.v1.StatusCondition.Cod" + + "eB\002\030\001\022\017\n\007message\030\002 \001(\t\022(\n\016canonical_code" + + "\030\003 \001(\0162\020.google.rpc.Code\"\235\001\n\004Code\022\013\n\007UNK" + + "NOWN\020\000\022\020\n\014GCE_STOCKOUT\020\001\022\037\n\033GKE_SERVICE_" + + "ACCOUNT_DELETED\020\002\022\026\n\022GCE_QUOTA_EXCEEDED\020" + + "\003\022\023\n\017SET_BY_OPERATOR\020\004\022\027\n\023CLOUD_KMS_KEY_" + + "ERROR\020\007\022\017\n\013CA_EXPIRING\020\t\"\261\t\n\rNetworkConf" + + "ig\022\017\n\007network\030\001 \001(\t\022\022\n\nsubnetwork\030\002 \001(\t\022" + + "$\n\034enable_intra_node_visibility\030\005 \001(\010\022C\n" + + "\023default_snat_status\030\007 \001(\0132&.google.cont" + + "ainer.v1.DefaultSnatStatus\022\037\n\027enable_l4i" + + "lb_subsetting\030\n \001(\010\022@\n\021datapath_provider" + + "\030\013 \001(\0162%.google.container.v1.DatapathPro" + + "vider\022P\n\032private_ipv6_google_access\030\014 \001(" + + "\0162,.google.container.v1.PrivateIPv6Googl" + + "eAccess\0222\n\ndns_config\030\r \001(\0132\036.google.con" + + "tainer.v1.DNSConfig\022R\n\033service_external_" + + "ips_config\030\017 \001(\0132-.google.container.v1.S" + + "erviceExternalIPsConfig\022A\n\022gateway_api_c" + + "onfig\030\020 \001(\0132%.google.container.v1.Gatewa" + + "yAPIConfig\022\037\n\027enable_multi_networking\030\021 " + + "\001(\010\022f\n\032network_performance_config\030\022 \001(\0132" + + "B.google.container.v1.NetworkConfig.Clus" + + "terNetworkPerformanceConfig\022\'\n\032enable_fq" + + "dn_network_policy\030\023 \001(\010H\000\210\001\001\022Y\n\034in_trans" + + "it_encryption_config\030\024 \001(\0162..google.cont" + + "ainer.v1.InTransitEncryptionConfigH\001\210\001\001\022" + + "5\n(enable_cilium_clusterwide_network_pol" + + "icy\030\025 \001(\010H\002\210\001\001\032\336\001\n\037ClusterNetworkPerform" + + "anceConfig\022q\n\033total_egress_bandwidth_tie" + + "r\030\001 \001(\0162G.google.container.v1.NetworkCon" + + "fig.ClusterNetworkPerformanceConfig.Tier" + + "H\000\210\001\001\"(\n\004Tier\022\024\n\020TIER_UNSPECIFIED\020\000\022\n\n\006T" + + "IER_1\020\001B\036\n\034_total_egress_bandwidth_tierB" + + "\035\n\033_enable_fqdn_network_policyB\037\n\035_in_tr" + + "ansit_encryption_configB+\n)_enable_ciliu" + + "m_clusterwide_network_policy\"\274\001\n\020Gateway" + + "APIConfig\022>\n\007channel\030\001 \001(\0162-.google.cont" + + "ainer.v1.GatewayAPIConfig.Channel\"h\n\007Cha" + + "nnel\022\027\n\023CHANNEL_UNSPECIFIED\020\000\022\024\n\020CHANNEL" + + "_DISABLED\020\001\022\030\n\024CHANNEL_EXPERIMENTAL\020\003\022\024\n" + + "\020CHANNEL_STANDARD\020\004\"+\n\030ServiceExternalIP" + + "sConfig\022\017\n\007enabled\030\001 \001(\010\"(\n\026GetOpenIDCon" + + "figRequest\022\016\n\006parent\030\001 \001(\t\"\334\001\n\027GetOpenID" + + "ConfigResponse\022\016\n\006issuer\030\001 \001(\t\022\020\n\010jwks_u" + + "ri\030\002 \001(\t\022 \n\030response_types_supported\030\003 \003" + + "(\t\022\037\n\027subject_types_supported\030\004 \003(\t\022-\n%i" + + "d_token_signing_alg_values_supported\030\005 \003" + + "(\t\022\030\n\020claims_supported\030\006 \003(\t\022\023\n\013grant_ty" + + "pes\030\007 \003(\t\"\'\n\025GetJSONWebKeysRequest\022\016\n\006pa" + + "rent\030\001 \001(\t\"r\n\003Jwk\022\013\n\003kty\030\001 \001(\t\022\013\n\003alg\030\002 " + + "\001(\t\022\013\n\003use\030\003 \001(\t\022\013\n\003kid\030\004 \001(\t\022\t\n\001n\030\005 \001(\t" + + "\022\t\n\001e\030\006 \001(\t\022\t\n\001x\030\007 \001(\t\022\t\n\001y\030\010 \001(\t\022\013\n\003crv" + + "\030\t \001(\t\"@\n\026GetJSONWebKeysResponse\022&\n\004keys" + + "\030\001 \003(\0132\030.google.container.v1.Jwk\"2\n\"Chec" + + "kAutopilotCompatibilityRequest\022\014\n\004name\030\001" + + " \001(\t\"\374\002\n\033AutopilotCompatibilityIssue\0224\n\020" + + "last_observation\030\001 \001(\0132\032.google.protobuf" + + ".Timestamp\022\027\n\017constraint_type\030\002 \001(\t\022X\n\024i" + + "ncompatibility_type\030\003 \001(\0162:.google.conta" + + "iner.v1.AutopilotCompatibilityIssue.Issu" + + "eType\022\020\n\010subjects\030\004 \003(\t\022\031\n\021documentation" + + "_url\030\005 \001(\t\022\023\n\013description\030\006 \001(\t\"r\n\tIssue" + + "Type\022\017\n\013UNSPECIFIED\020\000\022\023\n\017INCOMPATIBILITY" + + "\020\001\022\036\n\032ADDITIONAL_CONFIG_REQUIRED\020\002\022\037\n\033PA" + + "SSED_WITH_OPTIONAL_CONFIG\020\003\"x\n#CheckAuto" + + "pilotCompatibilityResponse\022@\n\006issues\030\001 \003" + + "(\01320.google.container.v1.AutopilotCompat" + + "ibilityIssue\022\017\n\007summary\030\002 \001(\t\"\216\001\n\016Releas" + + "eChannel\022<\n\007channel\030\001 \001(\0162+.google.conta" + + "iner.v1.ReleaseChannel.Channel\">\n\007Channe" + + "l\022\017\n\013UNSPECIFIED\020\000\022\t\n\005RAPID\020\001\022\013\n\007REGULAR" + + "\020\002\022\n\n\006STABLE\020\003\"\'\n\024CostManagementConfig\022\017" + + "\n\007enabled\030\001 \001(\010\",\n\031IntraNodeVisibilityCo" + + "nfig\022\017\n\007enabled\030\001 \001(\010\"&\n\023ILBSubsettingCo" + + "nfig\022\017\n\007enabled\030\001 \001(\010\"\367\002\n\tDNSConfig\022<\n\013c" + + "luster_dns\030\001 \001(\0162\'.google.container.v1.D" + + "NSConfig.Provider\022B\n\021cluster_dns_scope\030\002" + + " \001(\0162\'.google.container.v1.DNSConfig.DNS" + + "Scope\022\032\n\022cluster_dns_domain\030\003 \001(\t\022*\n\035add" + + "itive_vpc_scope_dns_domain\030\005 \001(\tB\003\340A\001\"W\n" + + "\010Provider\022\030\n\024PROVIDER_UNSPECIFIED\020\000\022\024\n\020P" + + "LATFORM_DEFAULT\020\001\022\r\n\tCLOUD_DNS\020\002\022\014\n\010KUBE" + + "_DNS\020\003\"G\n\010DNSScope\022\031\n\025DNS_SCOPE_UNSPECIF" + + "IED\020\000\022\021\n\rCLUSTER_SCOPE\020\001\022\r\n\tVPC_SCOPE\020\002\"" + + ".\n\021MaxPodsConstraint\022\031\n\021max_pods_per_nod" + + "e\030\001 \001(\003\"/\n\026WorkloadIdentityConfig\022\025\n\rwor" + + "kload_pool\030\002 \001(\t\"(\n\025IdentityServiceConfi" + + "g\022\017\n\007enabled\030\001 \001(\010\"K\n\020MeshCertificates\0227" + + "\n\023enable_certificates\030\001 \001(\0132\032.google.pro" + + "tobuf.BoolValue\"\343\005\n\022DatabaseEncryption\022\020" + + "\n\010key_name\030\001 \001(\t\022<\n\005state\030\002 \001(\0162-.google" + + ".container.v1.DatabaseEncryption.State\022U" + + "\n\rcurrent_state\030\003 \001(\01624.google.container" + + ".v1.DatabaseEncryption.CurrentStateB\003\340A\003" + + "H\000\210\001\001\022\034\n\017decryption_keys\030\004 \003(\tB\003\340A\003\022Z\n\025l" + + "ast_operation_errors\030\005 \003(\01326.google.cont" + + "ainer.v1.DatabaseEncryption.OperationErr" + + "orB\003\340A\003\032h\n\016OperationError\022\020\n\010key_name\030\001 " + + "\001(\t\022\025\n\rerror_message\030\002 \001(\t\022-\n\ttimestamp\030" + + "\003 \001(\0132\032.google.protobuf.Timestamp\"2\n\005Sta" + + "te\022\013\n\007UNKNOWN\020\000\022\r\n\tENCRYPTED\020\001\022\r\n\tDECRYP" + + "TED\020\002\"\373\001\n\014CurrentState\022\035\n\031CURRENT_STATE_" + + "UNSPECIFIED\020\000\022\033\n\027CURRENT_STATE_ENCRYPTED" + + "\020\007\022\033\n\027CURRENT_STATE_DECRYPTED\020\002\022$\n CURRE" + + "NT_STATE_ENCRYPTION_PENDING\020\003\022\"\n\036CURRENT" + + "_STATE_ENCRYPTION_ERROR\020\004\022$\n CURRENT_STA" + + "TE_DECRYPTION_PENDING\020\005\022\"\n\036CURRENT_STATE" + + "_DECRYPTION_ERROR\020\006B\020\n\016_current_state\"e\n" + + "\034ListUsableSubnetworksRequest\022\016\n\006parent\030" + + "\001 \001(\t\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005" + + "\022\022\n\npage_token\030\004 \001(\t\"t\n\035ListUsableSubnet" + + "worksResponse\022:\n\013subnetworks\030\001 \003(\0132%.goo" + + "gle.container.v1.UsableSubnetwork\022\027\n\017nex" + + "t_page_token\030\002 \001(\t\"\200\002\n\036UsableSubnetworkS" + + "econdaryRange\022\022\n\nrange_name\030\001 \001(\t\022\025\n\rip_" + + "cidr_range\030\002 \001(\t\022J\n\006status\030\003 \001(\0162:.googl" + + "e.container.v1.UsableSubnetworkSecondary" + + "Range.Status\"g\n\006Status\022\013\n\007UNKNOWN\020\000\022\n\n\006U" + + "NUSED\020\001\022\022\n\016IN_USE_SERVICE\020\002\022\030\n\024IN_USE_SH" + + "AREABLE_POD\020\003\022\026\n\022IN_USE_MANAGED_POD\020\004\"\270\001" + + "\n\020UsableSubnetwork\022\022\n\nsubnetwork\030\001 \001(\t\022\017" + + "\n\007network\030\002 \001(\t\022\025\n\rip_cidr_range\030\003 \001(\t\022P" + + "\n\023secondary_ip_ranges\030\004 \003(\01323.google.con" + + "tainer.v1.UsableSubnetworkSecondaryRange" + + "\022\026\n\016status_message\030\005 \001(\t\"\355\002\n\031ResourceUsa" + + "geExportConfig\022`\n\024bigquery_destination\030\001" + + " \001(\0132B.google.container.v1.ResourceUsage" + + "ExportConfig.BigQueryDestination\022&\n\036enab" + + "le_network_egress_metering\030\002 \001(\010\022m\n\033cons" + + "umption_metering_config\030\003 \001(\0132H.google.c" + + "ontainer.v1.ResourceUsageExportConfig.Co" + + "nsumptionMeteringConfig\032)\n\023BigQueryDesti" + + "nation\022\022\n\ndataset_id\030\001 \001(\t\032,\n\031Consumptio" + + "nMeteringConfig\022\017\n\007enabled\030\001 \001(\010\")\n\026Vert" + + "icalPodAutoscaling\022\017\n\007enabled\030\001 \001(\010\"%\n\021D" + + "efaultSnatStatus\022\020\n\010disabled\030\001 \001(\010\" \n\rSh" + + "ieldedNodes\022\017\n\007enabled\030\001 \001(\010\"\035\n\nVirtualN" + + "IC\022\017\n\007enabled\030\001 \001(\010\"\035\n\nFastSocket\022\017\n\007ena" + + "bled\030\001 \001(\010\"\250\003\n\022NotificationConfig\022>\n\006pub" + + "sub\030\001 \001(\0132..google.container.v1.Notifica" + + "tionConfig.PubSub\032\212\001\n\006PubSub\022\017\n\007enabled\030" + + "\001 \001(\010\022/\n\005topic\030\002 \001(\tB \372A\035\n\033pubsub.google" + + "apis.com/Topic\022>\n\006filter\030\003 \001(\0132..google." + + "container.v1.NotificationConfig.Filter\032O" + + "\n\006Filter\022E\n\nevent_type\030\001 \003(\01621.google.co" + + "ntainer.v1.NotificationConfig.EventType\"" + + "t\n\tEventType\022\032\n\026EVENT_TYPE_UNSPECIFIED\020\000" + + "\022\033\n\027UPGRADE_AVAILABLE_EVENT\020\001\022\021\n\rUPGRADE" + + "_EVENT\020\002\022\033\n\027SECURITY_BULLETIN_EVENT\020\003\"$\n" + + "\021ConfidentialNodes\022\017\n\007enabled\030\001 \001(\010\"\337\001\n\014" + + "UpgradeEvent\022?\n\rresource_type\030\001 \001(\0162(.go" + + "ogle.container.v1.UpgradeResourceType\022\021\n" + + "\toperation\030\002 \001(\t\0228\n\024operation_start_time" + + "\030\003 \001(\0132\032.google.protobuf.Timestamp\022\027\n\017cu" + + "rrent_version\030\004 \001(\t\022\026\n\016target_version\030\005 " + + "\001(\t\022\020\n\010resource\030\006 \001(\t\"\271\001\n\025UpgradeAvailab" + + "leEvent\022\017\n\007version\030\001 \001(\t\022?\n\rresource_typ" + + "e\030\002 \001(\0162(.google.container.v1.UpgradeRes" + + "ourceType\022<\n\017release_channel\030\003 \001(\0132#.goo" + + "gle.container.v1.ReleaseChannel\022\020\n\010resou" + + "rce\030\004 \001(\t\"\236\002\n\025SecurityBulletinEvent\022\036\n\026r" + + "esource_type_affected\030\001 \001(\t\022\023\n\013bulletin_" + + "id\030\002 \001(\t\022\017\n\007cve_ids\030\003 \003(\t\022\020\n\010severity\030\004 " + + "\001(\t\022\024\n\014bulletin_uri\030\005 \001(\t\022\031\n\021brief_descr" + + "iption\030\006 \001(\t\022!\n\031affected_supported_minor" + + "s\030\007 \003(\t\022\030\n\020patched_versions\030\010 \003(\t\022 \n\030sug" + + "gested_upgrade_target\030\t \001(\t\022\035\n\025manual_st" + + "eps_required\030\n \001(\010\"g\n\tAutopilot\022\017\n\007enabl" + + "ed\030\001 \001(\010\022I\n\026workload_policy_config\030\002 \001(\013" + + "2).google.container.v1.WorkloadPolicyCon" + + "fig\"H\n\024WorkloadPolicyConfig\022\034\n\017allow_net" + + "_admin\030\001 \001(\010H\000\210\001\001B\022\n\020_allow_net_admin\"V\n" + + "\rLoggingConfig\022E\n\020component_config\030\001 \001(\013" + + "2+.google.container.v1.LoggingComponentC" + + "onfig\"\357\001\n\026LoggingComponentConfig\022P\n\021enab" + + "le_components\030\001 \003(\01625.google.container.v" + + "1.LoggingComponentConfig.Component\"\202\001\n\tC" + + "omponent\022\031\n\025COMPONENT_UNSPECIFIED\020\000\022\025\n\021S" + + "YSTEM_COMPONENTS\020\001\022\r\n\tWORKLOADS\020\002\022\r\n\tAPI" + + "SERVER\020\003\022\r\n\tSCHEDULER\020\004\022\026\n\022CONTROLLER_MA" + + "NAGER\020\005\"\227\002\n\020MonitoringConfig\022H\n\020componen" + + "t_config\030\001 \001(\0132..google.container.v1.Mon" + + "itoringComponentConfig\022O\n\031managed_promet" + + "heus_config\030\002 \001(\0132,.google.container.v1." + + "ManagedPrometheusConfig\022h\n&advanced_data" + + "path_observability_config\030\003 \001(\01328.google" + + ".container.v1.AdvancedDatapathObservabil" + + "ityConfig\"\236\002\n#AdvancedDatapathObservabil" + + "ityConfig\022\026\n\016enable_metrics\030\001 \001(\010\022V\n\nrel" + + "ay_mode\030\002 \001(\0162B.google.container.v1.Adva" + + "ncedDatapathObservabilityConfig.RelayMod" + + "e\022\031\n\014enable_relay\030\003 \001(\010H\000\210\001\001\"[\n\tRelayMod" + + "e\022\032\n\026RELAY_MODE_UNSPECIFIED\020\000\022\014\n\010DISABLE" + + "D\020\001\022\023\n\017INTERNAL_VPC_LB\020\003\022\017\n\013EXTERNAL_LB\020" + + "\004B\017\n\r_enable_relay\"Z\n\025NodePoolLoggingCon" + + "fig\022A\n\016variant_config\030\001 \001(\0132).google.con" + + "tainer.v1.LoggingVariantConfig\"\237\001\n\024Loggi" + + "ngVariantConfig\022B\n\007variant\030\001 \001(\01621.googl" + + "e.container.v1.LoggingVariantConfig.Vari" + + "ant\"C\n\007Variant\022\027\n\023VARIANT_UNSPECIFIED\020\000\022" + + "\013\n\007DEFAULT\020\001\022\022\n\016MAX_THROUGHPUT\020\002\"\320\002\n\031Mon" + + "itoringComponentConfig\022S\n\021enable_compone" + + "nts\030\001 \003(\01628.google.container.v1.Monitori" + + "ngComponentConfig.Component\"\335\001\n\tComponen" + + "t\022\031\n\025COMPONENT_UNSPECIFIED\020\000\022\025\n\021SYSTEM_C" + + "OMPONENTS\020\001\022\r\n\tAPISERVER\020\003\022\r\n\tSCHEDULER\020" + + "\004\022\026\n\022CONTROLLER_MANAGER\020\005\022\013\n\007STORAGE\020\007\022\007" + + "\n\003HPA\020\010\022\007\n\003POD\020\t\022\r\n\tDAEMONSET\020\n\022\016\n\nDEPLO" + + "YMENT\020\013\022\017\n\013STATEFULSET\020\014\022\014\n\010CADVISOR\020\r\022\013" + + "\n\007KUBELET\020\016\"*\n\027ManagedPrometheusConfig\022\017" + + "\n\007enabled\030\001 \001(\010\"D\n\005Fleet\022\017\n\007project\030\001 \001(" + + "\t\022\022\n\nmembership\030\002 \001(\t\022\026\n\016pre_registered\030" + + "\003 \001(\010\"2\n\027LocalNvmeSsdBlockConfig\022\027\n\017loca" + + "l_ssd_count\030\001 \001(\005\"9\n\036EphemeralStorageLoc" + + "alSsdConfig\022\027\n\017local_ssd_count\030\001 \001(\005\"\204\001\n" + + "\023ResourceManagerTags\022@\n\004tags\030\001 \003(\01322.goo" + + "gle.container.v1.ResourceManagerTags.Tag" + + "sEntry\032+\n\tTagsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\"\253\001\n\020EnterpriseConfig\022L\n\014clus" + + "ter_tier\030\001 \001(\01621.google.container.v1.Ent" + + "erpriseConfig.ClusterTierB\003\340A\003\"I\n\013Cluste" + + "rTier\022\034\n\030CLUSTER_TIER_UNSPECIFIED\020\000\022\014\n\010S" + + "TANDARD\020\001\022\016\n\nENTERPRISE\020\002\"\233\001\n\021SecondaryB" + + "ootDisk\0229\n\004mode\030\001 \001(\0162+.google.container" + + ".v1.SecondaryBootDisk.Mode\022\022\n\ndisk_image" + + "\030\002 \001(\t\"7\n\004Mode\022\024\n\020MODE_UNSPECIFIED\020\000\022\031\n\025" + + "CONTAINER_IMAGE_CACHE\020\001\"!\n\037SecondaryBoot" + + "DiskUpdateStrategy*\306\001\n\027PrivateIPv6Google" + + "Access\022*\n&PRIVATE_IPV6_GOOGLE_ACCESS_UNS" + + "PECIFIED\020\000\022\'\n#PRIVATE_IPV6_GOOGLE_ACCESS" + + "_DISABLED\020\001\022(\n$PRIVATE_IPV6_GOOGLE_ACCES" + + "S_TO_GOOGLE\020\002\022,\n(PRIVATE_IPV6_GOOGLE_ACC" + + "ESS_BIDIRECTIONAL\020\003*W\n\023UpgradeResourceTy" + + "pe\022%\n!UPGRADE_RESOURCE_TYPE_UNSPECIFIED\020" + + "\000\022\n\n\006MASTER\020\001\022\r\n\tNODE_POOL\020\002*a\n\020Datapath" + + "Provider\022!\n\035DATAPATH_PROVIDER_UNSPECIFIE" + + "D\020\000\022\023\n\017LEGACY_DATAPATH\020\001\022\025\n\021ADVANCED_DAT" + + "APATH\020\002*^\n\026NodePoolUpdateStrategy\022)\n%NOD" + + "E_POOL_UPDATE_STRATEGY_UNSPECIFIED\020\000\022\016\n\n" + + "BLUE_GREEN\020\002\022\t\n\005SURGE\020\003*@\n\tStackType\022\032\n\026" + + "STACK_TYPE_UNSPECIFIED\020\000\022\010\n\004IPV4\020\001\022\r\n\tIP" + + "V4_IPV6\020\002*N\n\016IPv6AccessType\022 \n\034IPV6_ACCE" + + "SS_TYPE_UNSPECIFIED\020\000\022\014\n\010INTERNAL\020\001\022\014\n\010E" + + "XTERNAL\020\002*\237\001\n\031InTransitEncryptionConfig\022" + + ",\n(IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIF" + + "IED\020\000\022\"\n\036IN_TRANSIT_ENCRYPTION_DISABLED\020" + + "\001\0220\n,IN_TRANSIT_ENCRYPTION_INTER_NODE_TR" + + "ANSPARENT\020\0022\262I\n\016ClusterManager\022\350\001\n\014ListC" + + "lusters\022(.google.container.v1.ListCluste" + + "rsRequest\032).google.container.v1.ListClus" + + "tersResponse\"\202\001\332A\017project_id,zone\332A\006pare" + + "nt\202\323\344\223\002a\022,/v1/{parent=projects/*/locatio" + + "ns/*}/clustersZ1\022//v1/projects/{project_" + + "id}/zones/{zone}/clusters\022\355\001\n\nGetCluster" + + "\022&.google.container.v1.GetClusterRequest" + + "\032\034.google.container.v1.Cluster\"\230\001\332A\032proj" + + "ect_id,zone,cluster_id\332A\004name\202\323\344\223\002n\022,/v1" + + "/{name=projects/*/locations/*/clusters/*" + + "}Z>\022**/v1/{name=projects/*/locations/*/cl" - + "usters/*}:setResourceLabels:\001*ZP\"K/v1/pr" - + "ojects/{project_id}/zones/{zone}/cluster" - + "s/{cluster_id}/resourceLabels:\001*\022\245\002\n\rSet" - + "LegacyAbac\022).google.container.v1.SetLega" - + "cyAbacRequest\032\036.google.container.v1.Oper" - + "ation\"\310\001\332A\"project_id,zone,cluster_id,en" - + "abled\332A\014name,enabled\202\323\344\223\002\215\001\":/v1/{name=p" - + "rojects/*/locations/*/clusters/*}:setLeg" - + "acyAbac:\001*ZL\"G/v1/projects/{project_id}/" - + "zones/{zone}/clusters/{cluster_id}/legac" - + "yAbac:\001*\022\240\002\n\017StartIPRotation\022+.google.co" - + "ntainer.v1.StartIPRotationRequest\032\036.goog" - + "le.container.v1.Operation\"\277\001\332A\032project_i" - + "d,zone,cluster_id\332A\004name\202\323\344\223\002\224\001\"/v1/{name=projects/*/locations/*/clus" + + "ters/*}:setResourceLabels:\001*ZP\"K/v1/proj" + + "ects/{project_id}/zones/{zone}/clusters/" + + "{cluster_id}/resourceLabels:\001*\022\245\002\n\rSetLe" + + "gacyAbac\022).google.container.v1.SetLegacy" + + "AbacRequest\032\036.google.container.v1.Operat" + + "ion\"\310\001\332A\"project_id,zone,cluster_id,enab" + + "led\332A\014name,enabled\202\323\344\223\002\215\001\":/v1/{name=pro" + + "jects/*/locations/*/clusters/*}:setLegac" + + "yAbac:\001*ZL\"G/v1/projects/{project_id}/zo" + + "nes/{zone}/clusters/{cluster_id}/legacyA" + + "bac:\001*\022\240\002\n\017StartIPRotation\022+.google.cont" + + "ainer.v1.StartIPRotationRequest\032\036.google" + + ".container.v1.Operation\"\277\001\332A\032project_id," + + "zone,cluster_id\332A\004name\202\323\344\223\002\224\001\" - * The desired private cluster configuration. + * The desired private cluster configuration. master_global_access_config is + * the only field that can be changed via this field. + * See also + * [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint] + * for modifying other fields within + * [PrivateClusterConfig][google.container.v1.PrivateClusterConfig]. * * * .google.container.v1.PrivateClusterConfig desired_private_cluster_config = 25; @@ -1196,7 +1201,12 @@ public boolean hasDesiredPrivateClusterConfig() { * * *
-   * The desired private cluster configuration.
+   * The desired private cluster configuration. master_global_access_config is
+   * the only field that can be changed via this field.
+   * See also
+   * [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
+   * for modifying other fields within
+   * [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
    * 
* * .google.container.v1.PrivateClusterConfig desired_private_cluster_config = 25; @@ -1213,7 +1223,12 @@ public com.google.container.v1.PrivateClusterConfig getDesiredPrivateClusterConf * * *
-   * The desired private cluster configuration.
+   * The desired private cluster configuration. master_global_access_config is
+   * the only field that can be changed via this field.
+   * See also
+   * [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
+   * for modifying other fields within
+   * [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
    * 
* * .google.container.v1.PrivateClusterConfig desired_private_cluster_config = 25; @@ -2681,6 +2696,56 @@ public com.google.container.v1.K8sBetaAPIConfigOrBuilder getDesiredK8SBetaApisOr : desiredK8SBetaApis_; } + public static final int DESIRED_CONTAINERD_CONFIG_FIELD_NUMBER = 134; + private com.google.container.v1.ContainerdConfig desiredContainerdConfig_; + /** + * + * + *
+   * The desired containerd config for the cluster.
+   * 
+ * + * .google.container.v1.ContainerdConfig desired_containerd_config = 134; + * + * @return Whether the desiredContainerdConfig field is set. + */ + @java.lang.Override + public boolean hasDesiredContainerdConfig() { + return ((bitField1_ & 0x00000040) != 0); + } + /** + * + * + *
+   * The desired containerd config for the cluster.
+   * 
+ * + * .google.container.v1.ContainerdConfig desired_containerd_config = 134; + * + * @return The desiredContainerdConfig. + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfig getDesiredContainerdConfig() { + return desiredContainerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : desiredContainerdConfig_; + } + /** + * + * + *
+   * The desired containerd config for the cluster.
+   * 
+ * + * .google.container.v1.ContainerdConfig desired_containerd_config = 134; + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfigOrBuilder getDesiredContainerdConfigOrBuilder() { + return desiredContainerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : desiredContainerdConfig_; + } + public static final int DESIRED_ENABLE_MULTI_NETWORKING_FIELD_NUMBER = 135; private boolean desiredEnableMultiNetworking_ = false; /** @@ -2696,7 +2761,7 @@ public com.google.container.v1.K8sBetaAPIConfigOrBuilder getDesiredK8SBetaApisOr */ @java.lang.Override public boolean hasDesiredEnableMultiNetworking() { - return ((bitField1_ & 0x00000040) != 0); + return ((bitField1_ & 0x00000080) != 0); } /** * @@ -2732,7 +2797,7 @@ public boolean getDesiredEnableMultiNetworking() { */ @java.lang.Override public boolean hasDesiredNodePoolAutoConfigResourceManagerTags() { - return ((bitField1_ & 0x00000080) != 0); + return ((bitField1_ & 0x00000100) != 0); } /** * @@ -2792,7 +2857,7 @@ public boolean hasDesiredNodePoolAutoConfigResourceManagerTags() { */ @java.lang.Override public boolean hasDesiredInTransitEncryptionConfig() { - return ((bitField1_ & 0x00000100) != 0); + return ((bitField1_ & 0x00000200) != 0); } /** * @@ -2847,7 +2912,7 @@ public com.google.container.v1.InTransitEncryptionConfig getDesiredInTransitEncr */ @java.lang.Override public boolean hasDesiredEnableCiliumClusterwideNetworkPolicy() { - return ((bitField1_ & 0x00000200) != 0); + return ((bitField1_ & 0x00000400) != 0); } /** * @@ -2865,6 +2930,116 @@ public boolean getDesiredEnableCiliumClusterwideNetworkPolicy() { return desiredEnableCiliumClusterwideNetworkPolicy_; } + public static final int DESIRED_NODE_KUBELET_CONFIG_FIELD_NUMBER = 141; + private com.google.container.v1.NodeKubeletConfig desiredNodeKubeletConfig_; + /** + * + * + *
+   * The desired node kubelet config for the cluster.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig desired_node_kubelet_config = 141; + * + * @return Whether the desiredNodeKubeletConfig field is set. + */ + @java.lang.Override + public boolean hasDesiredNodeKubeletConfig() { + return ((bitField1_ & 0x00000800) != 0); + } + /** + * + * + *
+   * The desired node kubelet config for the cluster.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig desired_node_kubelet_config = 141; + * + * @return The desiredNodeKubeletConfig. + */ + @java.lang.Override + public com.google.container.v1.NodeKubeletConfig getDesiredNodeKubeletConfig() { + return desiredNodeKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : desiredNodeKubeletConfig_; + } + /** + * + * + *
+   * The desired node kubelet config for the cluster.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig desired_node_kubelet_config = 141; + */ + @java.lang.Override + public com.google.container.v1.NodeKubeletConfigOrBuilder getDesiredNodeKubeletConfigOrBuilder() { + return desiredNodeKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : desiredNodeKubeletConfig_; + } + + public static final int DESIRED_NODE_POOL_AUTO_CONFIG_KUBELET_CONFIG_FIELD_NUMBER = 142; + private com.google.container.v1.NodeKubeletConfig desiredNodePoolAutoConfigKubeletConfig_; + /** + * + * + *
+   * The desired node kubelet config for all auto-provisioned node pools
+   * in autopilot clusters and node auto-provisioning enabled clusters.
+   * 
+ * + * + * .google.container.v1.NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + * + * + * @return Whether the desiredNodePoolAutoConfigKubeletConfig field is set. + */ + @java.lang.Override + public boolean hasDesiredNodePoolAutoConfigKubeletConfig() { + return ((bitField1_ & 0x00001000) != 0); + } + /** + * + * + *
+   * The desired node kubelet config for all auto-provisioned node pools
+   * in autopilot clusters and node auto-provisioning enabled clusters.
+   * 
+ * + * + * .google.container.v1.NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + * + * + * @return The desiredNodePoolAutoConfigKubeletConfig. + */ + @java.lang.Override + public com.google.container.v1.NodeKubeletConfig getDesiredNodePoolAutoConfigKubeletConfig() { + return desiredNodePoolAutoConfigKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : desiredNodePoolAutoConfigKubeletConfig_; + } + /** + * + * + *
+   * The desired node kubelet config for all auto-provisioned node pools
+   * in autopilot clusters and node auto-provisioning enabled clusters.
+   * 
+ * + * + * .google.container.v1.NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + * + */ + @java.lang.Override + public com.google.container.v1.NodeKubeletConfigOrBuilder + getDesiredNodePoolAutoConfigKubeletConfigOrBuilder() { + return desiredNodePoolAutoConfigKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : desiredNodePoolAutoConfigKubeletConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3030,17 +3205,26 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage(131, getDesiredK8SBetaApis()); } if (((bitField1_ & 0x00000040) != 0)) { - output.writeBool(135, desiredEnableMultiNetworking_); + output.writeMessage(134, getDesiredContainerdConfig()); } if (((bitField1_ & 0x00000080) != 0)) { - output.writeMessage(136, getDesiredNodePoolAutoConfigResourceManagerTags()); + output.writeBool(135, desiredEnableMultiNetworking_); } if (((bitField1_ & 0x00000100) != 0)) { - output.writeEnum(137, desiredInTransitEncryptionConfig_); + output.writeMessage(136, getDesiredNodePoolAutoConfigResourceManagerTags()); } if (((bitField1_ & 0x00000200) != 0)) { + output.writeEnum(137, desiredInTransitEncryptionConfig_); + } + if (((bitField1_ & 0x00000400) != 0)) { output.writeBool(138, desiredEnableCiliumClusterwideNetworkPolicy_); } + if (((bitField1_ & 0x00000800) != 0)) { + output.writeMessage(141, getDesiredNodeKubeletConfig()); + } + if (((bitField1_ & 0x00001000) != 0)) { + output.writeMessage(142, getDesiredNodePoolAutoConfigKubeletConfig()); + } getUnknownFields().writeTo(output); } @@ -3271,23 +3455,38 @@ public int getSerializedSize() { } if (((bitField1_ & 0x00000040) != 0)) { size += - com.google.protobuf.CodedOutputStream.computeBoolSize(135, desiredEnableMultiNetworking_); + com.google.protobuf.CodedOutputStream.computeMessageSize( + 134, getDesiredContainerdConfig()); } if (((bitField1_ & 0x00000080) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(135, desiredEnableMultiNetworking_); + } + if (((bitField1_ & 0x00000100) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 136, getDesiredNodePoolAutoConfigResourceManagerTags()); } - if (((bitField1_ & 0x00000100) != 0)) { + if (((bitField1_ & 0x00000200) != 0)) { size += com.google.protobuf.CodedOutputStream.computeEnumSize( 137, desiredInTransitEncryptionConfig_); } - if (((bitField1_ & 0x00000200) != 0)) { + if (((bitField1_ & 0x00000400) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize( 138, desiredEnableCiliumClusterwideNetworkPolicy_); } + if (((bitField1_ & 0x00000800) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 141, getDesiredNodeKubeletConfig()); + } + if (((bitField1_ & 0x00001000) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 142, getDesiredNodePoolAutoConfigKubeletConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3503,6 +3702,10 @@ public boolean equals(final java.lang.Object obj) { if (hasDesiredK8SBetaApis()) { if (!getDesiredK8SBetaApis().equals(other.getDesiredK8SBetaApis())) return false; } + if (hasDesiredContainerdConfig() != other.hasDesiredContainerdConfig()) return false; + if (hasDesiredContainerdConfig()) { + if (!getDesiredContainerdConfig().equals(other.getDesiredContainerdConfig())) return false; + } if (hasDesiredEnableMultiNetworking() != other.hasDesiredEnableMultiNetworking()) return false; if (hasDesiredEnableMultiNetworking()) { if (getDesiredEnableMultiNetworking() != other.getDesiredEnableMultiNetworking()) @@ -3526,6 +3729,16 @@ public boolean equals(final java.lang.Object obj) { if (getDesiredEnableCiliumClusterwideNetworkPolicy() != other.getDesiredEnableCiliumClusterwideNetworkPolicy()) return false; } + if (hasDesiredNodeKubeletConfig() != other.hasDesiredNodeKubeletConfig()) return false; + if (hasDesiredNodeKubeletConfig()) { + if (!getDesiredNodeKubeletConfig().equals(other.getDesiredNodeKubeletConfig())) return false; + } + if (hasDesiredNodePoolAutoConfigKubeletConfig() + != other.hasDesiredNodePoolAutoConfigKubeletConfig()) return false; + if (hasDesiredNodePoolAutoConfigKubeletConfig()) { + if (!getDesiredNodePoolAutoConfigKubeletConfig() + .equals(other.getDesiredNodePoolAutoConfigKubeletConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3716,6 +3929,10 @@ public int hashCode() { hash = (37 * hash) + DESIRED_K8S_BETA_APIS_FIELD_NUMBER; hash = (53 * hash) + getDesiredK8SBetaApis().hashCode(); } + if (hasDesiredContainerdConfig()) { + hash = (37 * hash) + DESIRED_CONTAINERD_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDesiredContainerdConfig().hashCode(); + } if (hasDesiredEnableMultiNetworking()) { hash = (37 * hash) + DESIRED_ENABLE_MULTI_NETWORKING_FIELD_NUMBER; hash = @@ -3736,6 +3953,14 @@ public int hashCode() { + com.google.protobuf.Internal.hashBoolean( getDesiredEnableCiliumClusterwideNetworkPolicy()); } + if (hasDesiredNodeKubeletConfig()) { + hash = (37 * hash) + DESIRED_NODE_KUBELET_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDesiredNodeKubeletConfig().hashCode(); + } + if (hasDesiredNodePoolAutoConfigKubeletConfig()) { + hash = (37 * hash) + DESIRED_NODE_POOL_AUTO_CONFIG_KUBELET_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDesiredNodePoolAutoConfigKubeletConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -3913,7 +4138,10 @@ private void maybeForceBuilderInitialization() { getDesiredNetworkPerformanceConfigFieldBuilder(); getDesiredAutopilotWorkloadPolicyConfigFieldBuilder(); getDesiredK8SBetaApisFieldBuilder(); + getDesiredContainerdConfigFieldBuilder(); getDesiredNodePoolAutoConfigResourceManagerTagsFieldBuilder(); + getDesiredNodeKubeletConfigFieldBuilder(); + getDesiredNodePoolAutoConfigKubeletConfigFieldBuilder(); } } @@ -4115,6 +4343,11 @@ public Builder clear() { desiredK8SBetaApisBuilder_.dispose(); desiredK8SBetaApisBuilder_ = null; } + desiredContainerdConfig_ = null; + if (desiredContainerdConfigBuilder_ != null) { + desiredContainerdConfigBuilder_.dispose(); + desiredContainerdConfigBuilder_ = null; + } desiredEnableMultiNetworking_ = false; desiredNodePoolAutoConfigResourceManagerTags_ = null; if (desiredNodePoolAutoConfigResourceManagerTagsBuilder_ != null) { @@ -4123,6 +4356,16 @@ public Builder clear() { } desiredInTransitEncryptionConfig_ = 0; desiredEnableCiliumClusterwideNetworkPolicy_ = false; + desiredNodeKubeletConfig_ = null; + if (desiredNodeKubeletConfigBuilder_ != null) { + desiredNodeKubeletConfigBuilder_.dispose(); + desiredNodeKubeletConfigBuilder_ = null; + } + desiredNodePoolAutoConfigKubeletConfig_ = null; + if (desiredNodePoolAutoConfigKubeletConfigBuilder_ != null) { + desiredNodePoolAutoConfigKubeletConfigBuilder_.dispose(); + desiredNodePoolAutoConfigKubeletConfigBuilder_ = null; + } return this; } @@ -4461,24 +4704,45 @@ private void buildPartial1(com.google.container.v1.ClusterUpdate result) { to_bitField1_ |= 0x00000020; } if (((from_bitField1_ & 0x00020000) != 0)) { - result.desiredEnableMultiNetworking_ = desiredEnableMultiNetworking_; + result.desiredContainerdConfig_ = + desiredContainerdConfigBuilder_ == null + ? desiredContainerdConfig_ + : desiredContainerdConfigBuilder_.build(); to_bitField1_ |= 0x00000040; } if (((from_bitField1_ & 0x00040000) != 0)) { + result.desiredEnableMultiNetworking_ = desiredEnableMultiNetworking_; + to_bitField1_ |= 0x00000080; + } + if (((from_bitField1_ & 0x00080000) != 0)) { result.desiredNodePoolAutoConfigResourceManagerTags_ = desiredNodePoolAutoConfigResourceManagerTagsBuilder_ == null ? desiredNodePoolAutoConfigResourceManagerTags_ : desiredNodePoolAutoConfigResourceManagerTagsBuilder_.build(); - to_bitField1_ |= 0x00000080; - } - if (((from_bitField1_ & 0x00080000) != 0)) { - result.desiredInTransitEncryptionConfig_ = desiredInTransitEncryptionConfig_; to_bitField1_ |= 0x00000100; } if (((from_bitField1_ & 0x00100000) != 0)) { + result.desiredInTransitEncryptionConfig_ = desiredInTransitEncryptionConfig_; + to_bitField1_ |= 0x00000200; + } + if (((from_bitField1_ & 0x00200000) != 0)) { result.desiredEnableCiliumClusterwideNetworkPolicy_ = desiredEnableCiliumClusterwideNetworkPolicy_; - to_bitField1_ |= 0x00000200; + to_bitField1_ |= 0x00000400; + } + if (((from_bitField1_ & 0x00400000) != 0)) { + result.desiredNodeKubeletConfig_ = + desiredNodeKubeletConfigBuilder_ == null + ? desiredNodeKubeletConfig_ + : desiredNodeKubeletConfigBuilder_.build(); + to_bitField1_ |= 0x00000800; + } + if (((from_bitField1_ & 0x00800000) != 0)) { + result.desiredNodePoolAutoConfigKubeletConfig_ = + desiredNodePoolAutoConfigKubeletConfigBuilder_ == null + ? desiredNodePoolAutoConfigKubeletConfig_ + : desiredNodePoolAutoConfigKubeletConfigBuilder_.build(); + to_bitField1_ |= 0x00001000; } result.bitField0_ |= to_bitField0_; result.bitField1_ |= to_bitField1_; @@ -4698,6 +4962,9 @@ public Builder mergeFrom(com.google.container.v1.ClusterUpdate other) { if (other.hasDesiredK8SBetaApis()) { mergeDesiredK8SBetaApis(other.getDesiredK8SBetaApis()); } + if (other.hasDesiredContainerdConfig()) { + mergeDesiredContainerdConfig(other.getDesiredContainerdConfig()); + } if (other.hasDesiredEnableMultiNetworking()) { setDesiredEnableMultiNetworking(other.getDesiredEnableMultiNetworking()); } @@ -4712,6 +4979,13 @@ public Builder mergeFrom(com.google.container.v1.ClusterUpdate other) { setDesiredEnableCiliumClusterwideNetworkPolicy( other.getDesiredEnableCiliumClusterwideNetworkPolicy()); } + if (other.hasDesiredNodeKubeletConfig()) { + mergeDesiredNodeKubeletConfig(other.getDesiredNodeKubeletConfig()); + } + if (other.hasDesiredNodePoolAutoConfigKubeletConfig()) { + mergeDesiredNodePoolAutoConfigKubeletConfig( + other.getDesiredNodePoolAutoConfigKubeletConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -5077,10 +5351,17 @@ public Builder mergeFrom( bitField1_ |= 0x00010000; break; } // case 1050 + case 1074: + { + input.readMessage( + getDesiredContainerdConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00020000; + break; + } // case 1074 case 1080: { desiredEnableMultiNetworking_ = input.readBool(); - bitField1_ |= 0x00020000; + bitField1_ |= 0x00040000; break; } // case 1080 case 1090: @@ -5088,21 +5369,36 @@ public Builder mergeFrom( input.readMessage( getDesiredNodePoolAutoConfigResourceManagerTagsFieldBuilder().getBuilder(), extensionRegistry); - bitField1_ |= 0x00040000; + bitField1_ |= 0x00080000; break; } // case 1090 case 1096: { desiredInTransitEncryptionConfig_ = input.readEnum(); - bitField1_ |= 0x00080000; + bitField1_ |= 0x00100000; break; } // case 1096 case 1104: { desiredEnableCiliumClusterwideNetworkPolicy_ = input.readBool(); - bitField1_ |= 0x00100000; + bitField1_ |= 0x00200000; break; } // case 1104 + case 1130: + { + input.readMessage( + getDesiredNodeKubeletConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00400000; + break; + } // case 1130 + case 1138: + { + input.readMessage( + getDesiredNodePoolAutoConfigKubeletConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00800000; + break; + } // case 1138 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -8624,7 +8920,12 @@ public Builder clearDesiredVerticalPodAutoscaling() { * * *
-     * The desired private cluster configuration.
+     * The desired private cluster configuration. master_global_access_config is
+     * the only field that can be changed via this field.
+     * See also
+     * [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
+     * for modifying other fields within
+     * [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
      * 
* * .google.container.v1.PrivateClusterConfig desired_private_cluster_config = 25; @@ -8638,7 +8939,12 @@ public boolean hasDesiredPrivateClusterConfig() { * * *
-     * The desired private cluster configuration.
+     * The desired private cluster configuration. master_global_access_config is
+     * the only field that can be changed via this field.
+     * See also
+     * [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
+     * for modifying other fields within
+     * [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
      * 
* * .google.container.v1.PrivateClusterConfig desired_private_cluster_config = 25; @@ -8658,7 +8964,12 @@ public com.google.container.v1.PrivateClusterConfig getDesiredPrivateClusterConf * * *
-     * The desired private cluster configuration.
+     * The desired private cluster configuration. master_global_access_config is
+     * the only field that can be changed via this field.
+     * See also
+     * [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
+     * for modifying other fields within
+     * [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
      * 
* * .google.container.v1.PrivateClusterConfig desired_private_cluster_config = 25; @@ -8681,7 +8992,12 @@ public Builder setDesiredPrivateClusterConfig( * * *
-     * The desired private cluster configuration.
+     * The desired private cluster configuration. master_global_access_config is
+     * the only field that can be changed via this field.
+     * See also
+     * [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
+     * for modifying other fields within
+     * [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
      * 
* * .google.container.v1.PrivateClusterConfig desired_private_cluster_config = 25; @@ -8701,7 +9017,12 @@ public Builder setDesiredPrivateClusterConfig( * * *
-     * The desired private cluster configuration.
+     * The desired private cluster configuration. master_global_access_config is
+     * the only field that can be changed via this field.
+     * See also
+     * [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
+     * for modifying other fields within
+     * [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
      * 
* * .google.container.v1.PrivateClusterConfig desired_private_cluster_config = 25; @@ -8730,7 +9051,12 @@ public Builder mergeDesiredPrivateClusterConfig( * * *
-     * The desired private cluster configuration.
+     * The desired private cluster configuration. master_global_access_config is
+     * the only field that can be changed via this field.
+     * See also
+     * [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
+     * for modifying other fields within
+     * [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
      * 
* * .google.container.v1.PrivateClusterConfig desired_private_cluster_config = 25; @@ -8749,7 +9075,12 @@ public Builder clearDesiredPrivateClusterConfig() { * * *
-     * The desired private cluster configuration.
+     * The desired private cluster configuration. master_global_access_config is
+     * the only field that can be changed via this field.
+     * See also
+     * [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
+     * for modifying other fields within
+     * [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
      * 
* * .google.container.v1.PrivateClusterConfig desired_private_cluster_config = 25; @@ -8764,7 +9095,12 @@ public Builder clearDesiredPrivateClusterConfig() { * * *
-     * The desired private cluster configuration.
+     * The desired private cluster configuration. master_global_access_config is
+     * the only field that can be changed via this field.
+     * See also
+     * [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
+     * for modifying other fields within
+     * [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
      * 
* * .google.container.v1.PrivateClusterConfig desired_private_cluster_config = 25; @@ -8783,7 +9119,12 @@ public Builder clearDesiredPrivateClusterConfig() { * * *
-     * The desired private cluster configuration.
+     * The desired private cluster configuration. master_global_access_config is
+     * the only field that can be changed via this field.
+     * See also
+     * [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
+     * for modifying other fields within
+     * [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
      * 
* * .google.container.v1.PrivateClusterConfig desired_private_cluster_config = 25; @@ -13844,52 +14185,64 @@ public com.google.container.v1.K8sBetaAPIConfigOrBuilder getDesiredK8SBetaApisOr return desiredK8SBetaApisBuilder_; } - private boolean desiredEnableMultiNetworking_; + private com.google.container.v1.ContainerdConfig desiredContainerdConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig, + com.google.container.v1.ContainerdConfig.Builder, + com.google.container.v1.ContainerdConfigOrBuilder> + desiredContainerdConfigBuilder_; /** * * *
-     * Enable/Disable Multi-Networking for the cluster
+     * The desired containerd config for the cluster.
      * 
* - * optional bool desired_enable_multi_networking = 135; + * .google.container.v1.ContainerdConfig desired_containerd_config = 134; * - * @return Whether the desiredEnableMultiNetworking field is set. + * @return Whether the desiredContainerdConfig field is set. */ - @java.lang.Override - public boolean hasDesiredEnableMultiNetworking() { + public boolean hasDesiredContainerdConfig() { return ((bitField1_ & 0x00020000) != 0); } /** * * *
-     * Enable/Disable Multi-Networking for the cluster
+     * The desired containerd config for the cluster.
      * 
* - * optional bool desired_enable_multi_networking = 135; + * .google.container.v1.ContainerdConfig desired_containerd_config = 134; * - * @return The desiredEnableMultiNetworking. + * @return The desiredContainerdConfig. */ - @java.lang.Override - public boolean getDesiredEnableMultiNetworking() { - return desiredEnableMultiNetworking_; + public com.google.container.v1.ContainerdConfig getDesiredContainerdConfig() { + if (desiredContainerdConfigBuilder_ == null) { + return desiredContainerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : desiredContainerdConfig_; + } else { + return desiredContainerdConfigBuilder_.getMessage(); + } } /** * * *
-     * Enable/Disable Multi-Networking for the cluster
+     * The desired containerd config for the cluster.
      * 
* - * optional bool desired_enable_multi_networking = 135; - * - * @param value The desiredEnableMultiNetworking to set. - * @return This builder for chaining. + * .google.container.v1.ContainerdConfig desired_containerd_config = 134; */ - public Builder setDesiredEnableMultiNetworking(boolean value) { - - desiredEnableMultiNetworking_ = value; + public Builder setDesiredContainerdConfig(com.google.container.v1.ContainerdConfig value) { + if (desiredContainerdConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + desiredContainerdConfig_ = value; + } else { + desiredContainerdConfigBuilder_.setMessage(value); + } bitField1_ |= 0x00020000; onChanged(); return this; @@ -13898,74 +14251,249 @@ public Builder setDesiredEnableMultiNetworking(boolean value) { * * *
-     * Enable/Disable Multi-Networking for the cluster
+     * The desired containerd config for the cluster.
      * 
* - * optional bool desired_enable_multi_networking = 135; - * - * @return This builder for chaining. + * .google.container.v1.ContainerdConfig desired_containerd_config = 134; */ - public Builder clearDesiredEnableMultiNetworking() { - bitField1_ = (bitField1_ & ~0x00020000); - desiredEnableMultiNetworking_ = false; + public Builder setDesiredContainerdConfig( + com.google.container.v1.ContainerdConfig.Builder builderForValue) { + if (desiredContainerdConfigBuilder_ == null) { + desiredContainerdConfig_ = builderForValue.build(); + } else { + desiredContainerdConfigBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00020000; onChanged(); return this; } - - private com.google.container.v1.ResourceManagerTags - desiredNodePoolAutoConfigResourceManagerTags_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.container.v1.ResourceManagerTags, - com.google.container.v1.ResourceManagerTags.Builder, - com.google.container.v1.ResourceManagerTagsOrBuilder> - desiredNodePoolAutoConfigResourceManagerTagsBuilder_; /** * * *
-     * The desired resource manager tags that apply to all auto-provisioned node
-     * pools in autopilot clusters and node auto-provisioning enabled clusters.
+     * The desired containerd config for the cluster.
      * 
* - * - * .google.container.v1.ResourceManagerTags desired_node_pool_auto_config_resource_manager_tags = 136; - * - * - * @return Whether the desiredNodePoolAutoConfigResourceManagerTags field is set. + * .google.container.v1.ContainerdConfig desired_containerd_config = 134; */ - public boolean hasDesiredNodePoolAutoConfigResourceManagerTags() { - return ((bitField1_ & 0x00040000) != 0); + public Builder mergeDesiredContainerdConfig(com.google.container.v1.ContainerdConfig value) { + if (desiredContainerdConfigBuilder_ == null) { + if (((bitField1_ & 0x00020000) != 0) + && desiredContainerdConfig_ != null + && desiredContainerdConfig_ + != com.google.container.v1.ContainerdConfig.getDefaultInstance()) { + getDesiredContainerdConfigBuilder().mergeFrom(value); + } else { + desiredContainerdConfig_ = value; + } + } else { + desiredContainerdConfigBuilder_.mergeFrom(value); + } + if (desiredContainerdConfig_ != null) { + bitField1_ |= 0x00020000; + onChanged(); + } + return this; } /** * * *
-     * The desired resource manager tags that apply to all auto-provisioned node
-     * pools in autopilot clusters and node auto-provisioning enabled clusters.
+     * The desired containerd config for the cluster.
      * 
* - * - * .google.container.v1.ResourceManagerTags desired_node_pool_auto_config_resource_manager_tags = 136; - * - * - * @return The desiredNodePoolAutoConfigResourceManagerTags. + * .google.container.v1.ContainerdConfig desired_containerd_config = 134; */ - public com.google.container.v1.ResourceManagerTags - getDesiredNodePoolAutoConfigResourceManagerTags() { - if (desiredNodePoolAutoConfigResourceManagerTagsBuilder_ == null) { - return desiredNodePoolAutoConfigResourceManagerTags_ == null - ? com.google.container.v1.ResourceManagerTags.getDefaultInstance() - : desiredNodePoolAutoConfigResourceManagerTags_; - } else { - return desiredNodePoolAutoConfigResourceManagerTagsBuilder_.getMessage(); + public Builder clearDesiredContainerdConfig() { + bitField1_ = (bitField1_ & ~0x00020000); + desiredContainerdConfig_ = null; + if (desiredContainerdConfigBuilder_ != null) { + desiredContainerdConfigBuilder_.dispose(); + desiredContainerdConfigBuilder_ = null; } + onChanged(); + return this; } /** * * *
-     * The desired resource manager tags that apply to all auto-provisioned node
-     * pools in autopilot clusters and node auto-provisioning enabled clusters.
+     * The desired containerd config for the cluster.
+     * 
+ * + * .google.container.v1.ContainerdConfig desired_containerd_config = 134; + */ + public com.google.container.v1.ContainerdConfig.Builder getDesiredContainerdConfigBuilder() { + bitField1_ |= 0x00020000; + onChanged(); + return getDesiredContainerdConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The desired containerd config for the cluster.
+     * 
+ * + * .google.container.v1.ContainerdConfig desired_containerd_config = 134; + */ + public com.google.container.v1.ContainerdConfigOrBuilder getDesiredContainerdConfigOrBuilder() { + if (desiredContainerdConfigBuilder_ != null) { + return desiredContainerdConfigBuilder_.getMessageOrBuilder(); + } else { + return desiredContainerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : desiredContainerdConfig_; + } + } + /** + * + * + *
+     * The desired containerd config for the cluster.
+     * 
+ * + * .google.container.v1.ContainerdConfig desired_containerd_config = 134; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig, + com.google.container.v1.ContainerdConfig.Builder, + com.google.container.v1.ContainerdConfigOrBuilder> + getDesiredContainerdConfigFieldBuilder() { + if (desiredContainerdConfigBuilder_ == null) { + desiredContainerdConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig, + com.google.container.v1.ContainerdConfig.Builder, + com.google.container.v1.ContainerdConfigOrBuilder>( + getDesiredContainerdConfig(), getParentForChildren(), isClean()); + desiredContainerdConfig_ = null; + } + return desiredContainerdConfigBuilder_; + } + + private boolean desiredEnableMultiNetworking_; + /** + * + * + *
+     * Enable/Disable Multi-Networking for the cluster
+     * 
+ * + * optional bool desired_enable_multi_networking = 135; + * + * @return Whether the desiredEnableMultiNetworking field is set. + */ + @java.lang.Override + public boolean hasDesiredEnableMultiNetworking() { + return ((bitField1_ & 0x00040000) != 0); + } + /** + * + * + *
+     * Enable/Disable Multi-Networking for the cluster
+     * 
+ * + * optional bool desired_enable_multi_networking = 135; + * + * @return The desiredEnableMultiNetworking. + */ + @java.lang.Override + public boolean getDesiredEnableMultiNetworking() { + return desiredEnableMultiNetworking_; + } + /** + * + * + *
+     * Enable/Disable Multi-Networking for the cluster
+     * 
+ * + * optional bool desired_enable_multi_networking = 135; + * + * @param value The desiredEnableMultiNetworking to set. + * @return This builder for chaining. + */ + public Builder setDesiredEnableMultiNetworking(boolean value) { + + desiredEnableMultiNetworking_ = value; + bitField1_ |= 0x00040000; + onChanged(); + return this; + } + /** + * + * + *
+     * Enable/Disable Multi-Networking for the cluster
+     * 
+ * + * optional bool desired_enable_multi_networking = 135; + * + * @return This builder for chaining. + */ + public Builder clearDesiredEnableMultiNetworking() { + bitField1_ = (bitField1_ & ~0x00040000); + desiredEnableMultiNetworking_ = false; + onChanged(); + return this; + } + + private com.google.container.v1.ResourceManagerTags + desiredNodePoolAutoConfigResourceManagerTags_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ResourceManagerTags, + com.google.container.v1.ResourceManagerTags.Builder, + com.google.container.v1.ResourceManagerTagsOrBuilder> + desiredNodePoolAutoConfigResourceManagerTagsBuilder_; + /** + * + * + *
+     * The desired resource manager tags that apply to all auto-provisioned node
+     * pools in autopilot clusters and node auto-provisioning enabled clusters.
+     * 
+ * + * + * .google.container.v1.ResourceManagerTags desired_node_pool_auto_config_resource_manager_tags = 136; + * + * + * @return Whether the desiredNodePoolAutoConfigResourceManagerTags field is set. + */ + public boolean hasDesiredNodePoolAutoConfigResourceManagerTags() { + return ((bitField1_ & 0x00080000) != 0); + } + /** + * + * + *
+     * The desired resource manager tags that apply to all auto-provisioned node
+     * pools in autopilot clusters and node auto-provisioning enabled clusters.
+     * 
+ * + * + * .google.container.v1.ResourceManagerTags desired_node_pool_auto_config_resource_manager_tags = 136; + * + * + * @return The desiredNodePoolAutoConfigResourceManagerTags. + */ + public com.google.container.v1.ResourceManagerTags + getDesiredNodePoolAutoConfigResourceManagerTags() { + if (desiredNodePoolAutoConfigResourceManagerTagsBuilder_ == null) { + return desiredNodePoolAutoConfigResourceManagerTags_ == null + ? com.google.container.v1.ResourceManagerTags.getDefaultInstance() + : desiredNodePoolAutoConfigResourceManagerTags_; + } else { + return desiredNodePoolAutoConfigResourceManagerTagsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The desired resource manager tags that apply to all auto-provisioned node
+     * pools in autopilot clusters and node auto-provisioning enabled clusters.
      * 
* * @@ -13982,7 +14510,7 @@ public Builder setDesiredNodePoolAutoConfigResourceManagerTags( } else { desiredNodePoolAutoConfigResourceManagerTagsBuilder_.setMessage(value); } - bitField1_ |= 0x00040000; + bitField1_ |= 0x00080000; onChanged(); return this; } @@ -14005,7 +14533,7 @@ public Builder setDesiredNodePoolAutoConfigResourceManagerTags( } else { desiredNodePoolAutoConfigResourceManagerTagsBuilder_.setMessage(builderForValue.build()); } - bitField1_ |= 0x00040000; + bitField1_ |= 0x00080000; onChanged(); return this; } @@ -14024,7 +14552,7 @@ public Builder setDesiredNodePoolAutoConfigResourceManagerTags( public Builder mergeDesiredNodePoolAutoConfigResourceManagerTags( com.google.container.v1.ResourceManagerTags value) { if (desiredNodePoolAutoConfigResourceManagerTagsBuilder_ == null) { - if (((bitField1_ & 0x00040000) != 0) + if (((bitField1_ & 0x00080000) != 0) && desiredNodePoolAutoConfigResourceManagerTags_ != null && desiredNodePoolAutoConfigResourceManagerTags_ != com.google.container.v1.ResourceManagerTags.getDefaultInstance()) { @@ -14036,7 +14564,7 @@ public Builder mergeDesiredNodePoolAutoConfigResourceManagerTags( desiredNodePoolAutoConfigResourceManagerTagsBuilder_.mergeFrom(value); } if (desiredNodePoolAutoConfigResourceManagerTags_ != null) { - bitField1_ |= 0x00040000; + bitField1_ |= 0x00080000; onChanged(); } return this; @@ -14054,7 +14582,7 @@ public Builder mergeDesiredNodePoolAutoConfigResourceManagerTags( * */ public Builder clearDesiredNodePoolAutoConfigResourceManagerTags() { - bitField1_ = (bitField1_ & ~0x00040000); + bitField1_ = (bitField1_ & ~0x00080000); desiredNodePoolAutoConfigResourceManagerTags_ = null; if (desiredNodePoolAutoConfigResourceManagerTagsBuilder_ != null) { desiredNodePoolAutoConfigResourceManagerTagsBuilder_.dispose(); @@ -14077,7 +14605,7 @@ public Builder clearDesiredNodePoolAutoConfigResourceManagerTags() { */ public com.google.container.v1.ResourceManagerTags.Builder getDesiredNodePoolAutoConfigResourceManagerTagsBuilder() { - bitField1_ |= 0x00040000; + bitField1_ |= 0x00080000; onChanged(); return getDesiredNodePoolAutoConfigResourceManagerTagsFieldBuilder().getBuilder(); } @@ -14150,7 +14678,7 @@ public Builder clearDesiredNodePoolAutoConfigResourceManagerTags() { */ @java.lang.Override public boolean hasDesiredInTransitEncryptionConfig() { - return ((bitField1_ & 0x00080000) != 0); + return ((bitField1_ & 0x00100000) != 0); } /** * @@ -14185,7 +14713,7 @@ public int getDesiredInTransitEncryptionConfigValue() { */ public Builder setDesiredInTransitEncryptionConfigValue(int value) { desiredInTransitEncryptionConfig_ = value; - bitField1_ |= 0x00080000; + bitField1_ |= 0x00100000; onChanged(); return this; } @@ -14230,7 +14758,7 @@ public Builder setDesiredInTransitEncryptionConfig( if (value == null) { throw new NullPointerException(); } - bitField1_ |= 0x00080000; + bitField1_ |= 0x00100000; desiredInTransitEncryptionConfig_ = value.getNumber(); onChanged(); return this; @@ -14249,7 +14777,7 @@ public Builder setDesiredInTransitEncryptionConfig( * @return This builder for chaining. */ public Builder clearDesiredInTransitEncryptionConfig() { - bitField1_ = (bitField1_ & ~0x00080000); + bitField1_ = (bitField1_ & ~0x00100000); desiredInTransitEncryptionConfig_ = 0; onChanged(); return this; @@ -14269,7 +14797,7 @@ public Builder clearDesiredInTransitEncryptionConfig() { */ @java.lang.Override public boolean hasDesiredEnableCiliumClusterwideNetworkPolicy() { - return ((bitField1_ & 0x00100000) != 0); + return ((bitField1_ & 0x00200000) != 0); } /** * @@ -14301,7 +14829,7 @@ public boolean getDesiredEnableCiliumClusterwideNetworkPolicy() { public Builder setDesiredEnableCiliumClusterwideNetworkPolicy(boolean value) { desiredEnableCiliumClusterwideNetworkPolicy_ = value; - bitField1_ |= 0x00100000; + bitField1_ |= 0x00200000; onChanged(); return this; } @@ -14317,12 +14845,418 @@ public Builder setDesiredEnableCiliumClusterwideNetworkPolicy(boolean value) { * @return This builder for chaining. */ public Builder clearDesiredEnableCiliumClusterwideNetworkPolicy() { - bitField1_ = (bitField1_ & ~0x00100000); + bitField1_ = (bitField1_ & ~0x00200000); desiredEnableCiliumClusterwideNetworkPolicy_ = false; onChanged(); return this; } + private com.google.container.v1.NodeKubeletConfig desiredNodeKubeletConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.NodeKubeletConfig, + com.google.container.v1.NodeKubeletConfig.Builder, + com.google.container.v1.NodeKubeletConfigOrBuilder> + desiredNodeKubeletConfigBuilder_; + /** + * + * + *
+     * The desired node kubelet config for the cluster.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig desired_node_kubelet_config = 141; + * + * @return Whether the desiredNodeKubeletConfig field is set. + */ + public boolean hasDesiredNodeKubeletConfig() { + return ((bitField1_ & 0x00400000) != 0); + } + /** + * + * + *
+     * The desired node kubelet config for the cluster.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig desired_node_kubelet_config = 141; + * + * @return The desiredNodeKubeletConfig. + */ + public com.google.container.v1.NodeKubeletConfig getDesiredNodeKubeletConfig() { + if (desiredNodeKubeletConfigBuilder_ == null) { + return desiredNodeKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : desiredNodeKubeletConfig_; + } else { + return desiredNodeKubeletConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The desired node kubelet config for the cluster.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig desired_node_kubelet_config = 141; + */ + public Builder setDesiredNodeKubeletConfig(com.google.container.v1.NodeKubeletConfig value) { + if (desiredNodeKubeletConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + desiredNodeKubeletConfig_ = value; + } else { + desiredNodeKubeletConfigBuilder_.setMessage(value); + } + bitField1_ |= 0x00400000; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired node kubelet config for the cluster.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig desired_node_kubelet_config = 141; + */ + public Builder setDesiredNodeKubeletConfig( + com.google.container.v1.NodeKubeletConfig.Builder builderForValue) { + if (desiredNodeKubeletConfigBuilder_ == null) { + desiredNodeKubeletConfig_ = builderForValue.build(); + } else { + desiredNodeKubeletConfigBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00400000; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired node kubelet config for the cluster.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig desired_node_kubelet_config = 141; + */ + public Builder mergeDesiredNodeKubeletConfig(com.google.container.v1.NodeKubeletConfig value) { + if (desiredNodeKubeletConfigBuilder_ == null) { + if (((bitField1_ & 0x00400000) != 0) + && desiredNodeKubeletConfig_ != null + && desiredNodeKubeletConfig_ + != com.google.container.v1.NodeKubeletConfig.getDefaultInstance()) { + getDesiredNodeKubeletConfigBuilder().mergeFrom(value); + } else { + desiredNodeKubeletConfig_ = value; + } + } else { + desiredNodeKubeletConfigBuilder_.mergeFrom(value); + } + if (desiredNodeKubeletConfig_ != null) { + bitField1_ |= 0x00400000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The desired node kubelet config for the cluster.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig desired_node_kubelet_config = 141; + */ + public Builder clearDesiredNodeKubeletConfig() { + bitField1_ = (bitField1_ & ~0x00400000); + desiredNodeKubeletConfig_ = null; + if (desiredNodeKubeletConfigBuilder_ != null) { + desiredNodeKubeletConfigBuilder_.dispose(); + desiredNodeKubeletConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The desired node kubelet config for the cluster.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig desired_node_kubelet_config = 141; + */ + public com.google.container.v1.NodeKubeletConfig.Builder getDesiredNodeKubeletConfigBuilder() { + bitField1_ |= 0x00400000; + onChanged(); + return getDesiredNodeKubeletConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The desired node kubelet config for the cluster.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig desired_node_kubelet_config = 141; + */ + public com.google.container.v1.NodeKubeletConfigOrBuilder + getDesiredNodeKubeletConfigOrBuilder() { + if (desiredNodeKubeletConfigBuilder_ != null) { + return desiredNodeKubeletConfigBuilder_.getMessageOrBuilder(); + } else { + return desiredNodeKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : desiredNodeKubeletConfig_; + } + } + /** + * + * + *
+     * The desired node kubelet config for the cluster.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig desired_node_kubelet_config = 141; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.NodeKubeletConfig, + com.google.container.v1.NodeKubeletConfig.Builder, + com.google.container.v1.NodeKubeletConfigOrBuilder> + getDesiredNodeKubeletConfigFieldBuilder() { + if (desiredNodeKubeletConfigBuilder_ == null) { + desiredNodeKubeletConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.NodeKubeletConfig, + com.google.container.v1.NodeKubeletConfig.Builder, + com.google.container.v1.NodeKubeletConfigOrBuilder>( + getDesiredNodeKubeletConfig(), getParentForChildren(), isClean()); + desiredNodeKubeletConfig_ = null; + } + return desiredNodeKubeletConfigBuilder_; + } + + private com.google.container.v1.NodeKubeletConfig desiredNodePoolAutoConfigKubeletConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.NodeKubeletConfig, + com.google.container.v1.NodeKubeletConfig.Builder, + com.google.container.v1.NodeKubeletConfigOrBuilder> + desiredNodePoolAutoConfigKubeletConfigBuilder_; + /** + * + * + *
+     * The desired node kubelet config for all auto-provisioned node pools
+     * in autopilot clusters and node auto-provisioning enabled clusters.
+     * 
+ * + * + * .google.container.v1.NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + * + * + * @return Whether the desiredNodePoolAutoConfigKubeletConfig field is set. + */ + public boolean hasDesiredNodePoolAutoConfigKubeletConfig() { + return ((bitField1_ & 0x00800000) != 0); + } + /** + * + * + *
+     * The desired node kubelet config for all auto-provisioned node pools
+     * in autopilot clusters and node auto-provisioning enabled clusters.
+     * 
+ * + * + * .google.container.v1.NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + * + * + * @return The desiredNodePoolAutoConfigKubeletConfig. + */ + public com.google.container.v1.NodeKubeletConfig getDesiredNodePoolAutoConfigKubeletConfig() { + if (desiredNodePoolAutoConfigKubeletConfigBuilder_ == null) { + return desiredNodePoolAutoConfigKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : desiredNodePoolAutoConfigKubeletConfig_; + } else { + return desiredNodePoolAutoConfigKubeletConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The desired node kubelet config for all auto-provisioned node pools
+     * in autopilot clusters and node auto-provisioning enabled clusters.
+     * 
+ * + * + * .google.container.v1.NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + * + */ + public Builder setDesiredNodePoolAutoConfigKubeletConfig( + com.google.container.v1.NodeKubeletConfig value) { + if (desiredNodePoolAutoConfigKubeletConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + desiredNodePoolAutoConfigKubeletConfig_ = value; + } else { + desiredNodePoolAutoConfigKubeletConfigBuilder_.setMessage(value); + } + bitField1_ |= 0x00800000; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired node kubelet config for all auto-provisioned node pools
+     * in autopilot clusters and node auto-provisioning enabled clusters.
+     * 
+ * + * + * .google.container.v1.NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + * + */ + public Builder setDesiredNodePoolAutoConfigKubeletConfig( + com.google.container.v1.NodeKubeletConfig.Builder builderForValue) { + if (desiredNodePoolAutoConfigKubeletConfigBuilder_ == null) { + desiredNodePoolAutoConfigKubeletConfig_ = builderForValue.build(); + } else { + desiredNodePoolAutoConfigKubeletConfigBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00800000; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired node kubelet config for all auto-provisioned node pools
+     * in autopilot clusters and node auto-provisioning enabled clusters.
+     * 
+ * + * + * .google.container.v1.NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + * + */ + public Builder mergeDesiredNodePoolAutoConfigKubeletConfig( + com.google.container.v1.NodeKubeletConfig value) { + if (desiredNodePoolAutoConfigKubeletConfigBuilder_ == null) { + if (((bitField1_ & 0x00800000) != 0) + && desiredNodePoolAutoConfigKubeletConfig_ != null + && desiredNodePoolAutoConfigKubeletConfig_ + != com.google.container.v1.NodeKubeletConfig.getDefaultInstance()) { + getDesiredNodePoolAutoConfigKubeletConfigBuilder().mergeFrom(value); + } else { + desiredNodePoolAutoConfigKubeletConfig_ = value; + } + } else { + desiredNodePoolAutoConfigKubeletConfigBuilder_.mergeFrom(value); + } + if (desiredNodePoolAutoConfigKubeletConfig_ != null) { + bitField1_ |= 0x00800000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The desired node kubelet config for all auto-provisioned node pools
+     * in autopilot clusters and node auto-provisioning enabled clusters.
+     * 
+ * + * + * .google.container.v1.NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + * + */ + public Builder clearDesiredNodePoolAutoConfigKubeletConfig() { + bitField1_ = (bitField1_ & ~0x00800000); + desiredNodePoolAutoConfigKubeletConfig_ = null; + if (desiredNodePoolAutoConfigKubeletConfigBuilder_ != null) { + desiredNodePoolAutoConfigKubeletConfigBuilder_.dispose(); + desiredNodePoolAutoConfigKubeletConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The desired node kubelet config for all auto-provisioned node pools
+     * in autopilot clusters and node auto-provisioning enabled clusters.
+     * 
+ * + * + * .google.container.v1.NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + * + */ + public com.google.container.v1.NodeKubeletConfig.Builder + getDesiredNodePoolAutoConfigKubeletConfigBuilder() { + bitField1_ |= 0x00800000; + onChanged(); + return getDesiredNodePoolAutoConfigKubeletConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The desired node kubelet config for all auto-provisioned node pools
+     * in autopilot clusters and node auto-provisioning enabled clusters.
+     * 
+ * + * + * .google.container.v1.NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + * + */ + public com.google.container.v1.NodeKubeletConfigOrBuilder + getDesiredNodePoolAutoConfigKubeletConfigOrBuilder() { + if (desiredNodePoolAutoConfigKubeletConfigBuilder_ != null) { + return desiredNodePoolAutoConfigKubeletConfigBuilder_.getMessageOrBuilder(); + } else { + return desiredNodePoolAutoConfigKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : desiredNodePoolAutoConfigKubeletConfig_; + } + } + /** + * + * + *
+     * The desired node kubelet config for all auto-provisioned node pools
+     * in autopilot clusters and node auto-provisioning enabled clusters.
+     * 
+ * + * + * .google.container.v1.NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.NodeKubeletConfig, + com.google.container.v1.NodeKubeletConfig.Builder, + com.google.container.v1.NodeKubeletConfigOrBuilder> + getDesiredNodePoolAutoConfigKubeletConfigFieldBuilder() { + if (desiredNodePoolAutoConfigKubeletConfigBuilder_ == null) { + desiredNodePoolAutoConfigKubeletConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.NodeKubeletConfig, + com.google.container.v1.NodeKubeletConfig.Builder, + com.google.container.v1.NodeKubeletConfigOrBuilder>( + getDesiredNodePoolAutoConfigKubeletConfig(), getParentForChildren(), isClean()); + desiredNodePoolAutoConfigKubeletConfig_ = null; + } + return desiredNodePoolAutoConfigKubeletConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterUpdateOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterUpdateOrBuilder.java index 6b10021f3a43..c51112ddd8d8 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterUpdateOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterUpdateOrBuilder.java @@ -780,7 +780,12 @@ public interface ClusterUpdateOrBuilder * * *
-   * The desired private cluster configuration.
+   * The desired private cluster configuration. master_global_access_config is
+   * the only field that can be changed via this field.
+   * See also
+   * [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
+   * for modifying other fields within
+   * [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
    * 
* * .google.container.v1.PrivateClusterConfig desired_private_cluster_config = 25; @@ -792,7 +797,12 @@ public interface ClusterUpdateOrBuilder * * *
-   * The desired private cluster configuration.
+   * The desired private cluster configuration. master_global_access_config is
+   * the only field that can be changed via this field.
+   * See also
+   * [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
+   * for modifying other fields within
+   * [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
    * 
* * .google.container.v1.PrivateClusterConfig desired_private_cluster_config = 25; @@ -804,7 +814,12 @@ public interface ClusterUpdateOrBuilder * * *
-   * The desired private cluster configuration.
+   * The desired private cluster configuration. master_global_access_config is
+   * the only field that can be changed via this field.
+   * See also
+   * [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint]
+   * for modifying other fields within
+   * [PrivateClusterConfig][google.container.v1.PrivateClusterConfig].
    * 
* * .google.container.v1.PrivateClusterConfig desired_private_cluster_config = 25; @@ -1831,6 +1846,41 @@ public interface ClusterUpdateOrBuilder */ com.google.container.v1.K8sBetaAPIConfigOrBuilder getDesiredK8SBetaApisOrBuilder(); + /** + * + * + *
+   * The desired containerd config for the cluster.
+   * 
+ * + * .google.container.v1.ContainerdConfig desired_containerd_config = 134; + * + * @return Whether the desiredContainerdConfig field is set. + */ + boolean hasDesiredContainerdConfig(); + /** + * + * + *
+   * The desired containerd config for the cluster.
+   * 
+ * + * .google.container.v1.ContainerdConfig desired_containerd_config = 134; + * + * @return The desiredContainerdConfig. + */ + com.google.container.v1.ContainerdConfig getDesiredContainerdConfig(); + /** + * + * + *
+   * The desired containerd config for the cluster.
+   * 
+ * + * .google.container.v1.ContainerdConfig desired_containerd_config = 134; + */ + com.google.container.v1.ContainerdConfigOrBuilder getDesiredContainerdConfigOrBuilder(); + /** * * @@ -1968,4 +2018,84 @@ public interface ClusterUpdateOrBuilder * @return The desiredEnableCiliumClusterwideNetworkPolicy. */ boolean getDesiredEnableCiliumClusterwideNetworkPolicy(); + + /** + * + * + *
+   * The desired node kubelet config for the cluster.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig desired_node_kubelet_config = 141; + * + * @return Whether the desiredNodeKubeletConfig field is set. + */ + boolean hasDesiredNodeKubeletConfig(); + /** + * + * + *
+   * The desired node kubelet config for the cluster.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig desired_node_kubelet_config = 141; + * + * @return The desiredNodeKubeletConfig. + */ + com.google.container.v1.NodeKubeletConfig getDesiredNodeKubeletConfig(); + /** + * + * + *
+   * The desired node kubelet config for the cluster.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig desired_node_kubelet_config = 141; + */ + com.google.container.v1.NodeKubeletConfigOrBuilder getDesiredNodeKubeletConfigOrBuilder(); + + /** + * + * + *
+   * The desired node kubelet config for all auto-provisioned node pools
+   * in autopilot clusters and node auto-provisioning enabled clusters.
+   * 
+ * + * + * .google.container.v1.NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + * + * + * @return Whether the desiredNodePoolAutoConfigKubeletConfig field is set. + */ + boolean hasDesiredNodePoolAutoConfigKubeletConfig(); + /** + * + * + *
+   * The desired node kubelet config for all auto-provisioned node pools
+   * in autopilot clusters and node auto-provisioning enabled clusters.
+   * 
+ * + * + * .google.container.v1.NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + * + * + * @return The desiredNodePoolAutoConfigKubeletConfig. + */ + com.google.container.v1.NodeKubeletConfig getDesiredNodePoolAutoConfigKubeletConfig(); + /** + * + * + *
+   * The desired node kubelet config for all auto-provisioned node pools
+   * in autopilot clusters and node auto-provisioning enabled clusters.
+   * 
+ * + * + * .google.container.v1.NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + * + */ + com.google.container.v1.NodeKubeletConfigOrBuilder + getDesiredNodePoolAutoConfigKubeletConfigOrBuilder(); } diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CompleteIPRotationRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CompleteIPRotationRequest.java index 6a82edbde9da..c5da3d98717f 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CompleteIPRotationRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CompleteIPRotationRequest.java @@ -82,7 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4140 + * google/container/v1/cluster_service.proto;l=4254 * @return The projectId. */ @java.lang.Override @@ -110,7 +110,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4140 + * google/container/v1/cluster_service.proto;l=4254 * @return The bytes for projectId. */ @java.lang.Override @@ -144,7 +144,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4146 + * google/container/v1/cluster_service.proto;l=4260 * @return The zone. */ @java.lang.Override @@ -173,7 +173,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4146 + * google/container/v1/cluster_service.proto;l=4260 * @return The bytes for zone. */ @java.lang.Override @@ -205,7 +205,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4150 + * google/container/v1/cluster_service.proto;l=4264 * @return The clusterId. */ @java.lang.Override @@ -232,7 +232,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4150 + * google/container/v1/cluster_service.proto;l=4264 * @return The bytes for clusterId. */ @java.lang.Override @@ -729,7 +729,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4140 + * google/container/v1/cluster_service.proto;l=4254 * @return The projectId. */ @java.lang.Deprecated @@ -756,7 +756,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4140 + * google/container/v1/cluster_service.proto;l=4254 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -783,7 +783,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4140 + * google/container/v1/cluster_service.proto;l=4254 * @param value The projectId to set. * @return This builder for chaining. */ @@ -809,7 +809,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4140 + * google/container/v1/cluster_service.proto;l=4254 * @return This builder for chaining. */ @java.lang.Deprecated @@ -831,7 +831,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4140 + * google/container/v1/cluster_service.proto;l=4254 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -861,7 +861,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4146 + * google/container/v1/cluster_service.proto;l=4260 * @return The zone. */ @java.lang.Deprecated @@ -889,7 +889,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4146 + * google/container/v1/cluster_service.proto;l=4260 * @return The bytes for zone. */ @java.lang.Deprecated @@ -917,7 +917,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4146 + * google/container/v1/cluster_service.proto;l=4260 * @param value The zone to set. * @return This builder for chaining. */ @@ -944,7 +944,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4146 + * google/container/v1/cluster_service.proto;l=4260 * @return This builder for chaining. */ @java.lang.Deprecated @@ -967,7 +967,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4146 + * google/container/v1/cluster_service.proto;l=4260 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -995,7 +995,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4150 + * google/container/v1/cluster_service.proto;l=4264 * @return The clusterId. */ @java.lang.Deprecated @@ -1021,7 +1021,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4150 + * google/container/v1/cluster_service.proto;l=4264 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1047,7 +1047,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4150 + * google/container/v1/cluster_service.proto;l=4264 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1072,7 +1072,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4150 + * google/container/v1/cluster_service.proto;l=4264 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1093,7 +1093,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4150 + * google/container/v1/cluster_service.proto;l=4264 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CompleteIPRotationRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CompleteIPRotationRequestOrBuilder.java index 52e46c31618b..3e07ed5373ea 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CompleteIPRotationRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CompleteIPRotationRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface CompleteIPRotationRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4140 + * google/container/v1/cluster_service.proto;l=4254 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface CompleteIPRotationRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4140 + * google/container/v1/cluster_service.proto;l=4254 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface CompleteIPRotationRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4146 + * google/container/v1/cluster_service.proto;l=4260 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface CompleteIPRotationRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4146 + * google/container/v1/cluster_service.proto;l=4260 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface CompleteIPRotationRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4150 + * google/container/v1/cluster_service.proto;l=4264 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface CompleteIPRotationRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CompleteIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4150 + * google/container/v1/cluster_service.proto;l=4264 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ContainerdConfig.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ContainerdConfig.java new file mode 100644 index 000000000000..0c6d471ca839 --- /dev/null +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ContainerdConfig.java @@ -0,0 +1,4217 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/container/v1/cluster_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.container.v1; + +/** + * + * + *
+ * ContainerdConfig contains configuration to customize containerd.
+ * 
+ * + * Protobuf type {@code google.container.v1.ContainerdConfig} + */ +public final class ContainerdConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.container.v1.ContainerdConfig) + ContainerdConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContainerdConfig.newBuilder() to construct. + private ContainerdConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContainerdConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContainerdConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.container.v1.ContainerdConfig.class, + com.google.container.v1.ContainerdConfig.Builder.class); + } + + public interface PrivateRegistryAccessConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Private registry access is enabled.
+     * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + boolean getEnabled(); + + /** + * + * + *
+     * Private registry access configuration.
+     * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + java.util.List< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig> + getCertificateAuthorityDomainConfigList(); + /** + * + * + *
+     * Private registry access configuration.
+     * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + getCertificateAuthorityDomainConfig(int index); + /** + * + * + *
+     * Private registry access configuration.
+     * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + int getCertificateAuthorityDomainConfigCount(); + /** + * + * + *
+     * Private registry access configuration.
+     * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + java.util.List< + ? extends + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfigOrBuilder> + getCertificateAuthorityDomainConfigOrBuilderList(); + /** + * + * + *
+     * Private registry access configuration.
+     * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfigOrBuilder + getCertificateAuthorityDomainConfigOrBuilder(int index); + } + /** + * + * + *
+   * PrivateRegistryAccessConfig contains access configuration for
+   * private container registries.
+   * 
+ * + * Protobuf type {@code google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig} + */ + public static final class PrivateRegistryAccessConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig) + PrivateRegistryAccessConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrivateRegistryAccessConfig.newBuilder() to construct. + private PrivateRegistryAccessConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PrivateRegistryAccessConfig() { + certificateAuthorityDomainConfig_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PrivateRegistryAccessConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.class, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.Builder.class); + } + + public interface CertificateAuthorityDomainConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * List of fully qualified domain names (FQDN).
+       * Specifying port is supported.
+       * Wilcards are NOT supported.
+       * Examples:
+       * - my.customdomain.com
+       * - 10.0.1.2:5000
+       * 
+ * + * repeated string fqdns = 1; + * + * @return A list containing the fqdns. + */ + java.util.List getFqdnsList(); + /** + * + * + *
+       * List of fully qualified domain names (FQDN).
+       * Specifying port is supported.
+       * Wilcards are NOT supported.
+       * Examples:
+       * - my.customdomain.com
+       * - 10.0.1.2:5000
+       * 
+ * + * repeated string fqdns = 1; + * + * @return The count of fqdns. + */ + int getFqdnsCount(); + /** + * + * + *
+       * List of fully qualified domain names (FQDN).
+       * Specifying port is supported.
+       * Wilcards are NOT supported.
+       * Examples:
+       * - my.customdomain.com
+       * - 10.0.1.2:5000
+       * 
+ * + * repeated string fqdns = 1; + * + * @param index The index of the element to return. + * @return The fqdns at the given index. + */ + java.lang.String getFqdns(int index); + /** + * + * + *
+       * List of fully qualified domain names (FQDN).
+       * Specifying port is supported.
+       * Wilcards are NOT supported.
+       * Examples:
+       * - my.customdomain.com
+       * - 10.0.1.2:5000
+       * 
+ * + * repeated string fqdns = 1; + * + * @param index The index of the value to return. + * @return The bytes of the fqdns at the given index. + */ + com.google.protobuf.ByteString getFqdnsBytes(int index); + + /** + * + * + *
+       * Google Secret Manager (GCP) certificate configuration.
+       * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig gcp_secret_manager_certificate_config = 2; + * + * + * @return Whether the gcpSecretManagerCertificateConfig field is set. + */ + boolean hasGcpSecretManagerCertificateConfig(); + /** + * + * + *
+       * Google Secret Manager (GCP) certificate configuration.
+       * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig gcp_secret_manager_certificate_config = 2; + * + * + * @return The gcpSecretManagerCertificateConfig. + */ + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + getGcpSecretManagerCertificateConfig(); + /** + * + * + *
+       * Google Secret Manager (GCP) certificate configuration.
+       * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig gcp_secret_manager_certificate_config = 2; + * + */ + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfigOrBuilder + getGcpSecretManagerCertificateConfigOrBuilder(); + + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.CertificateConfigCase + getCertificateConfigCase(); + } + /** + * + * + *
+     * CertificateAuthorityDomainConfig configures one or more fully qualified
+     * domain names (FQDN) to a specific certificate.
+     * 
+ * + * Protobuf type {@code + * google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} + */ + public static final class CertificateAuthorityDomainConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig) + CertificateAuthorityDomainConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use CertificateAuthorityDomainConfig.newBuilder() to construct. + private CertificateAuthorityDomainConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CertificateAuthorityDomainConfig() { + fqdns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CertificateAuthorityDomainConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.class, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.Builder.class); + } + + public interface GCPSecretManagerCertificateConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Secret URI, in the form
+         * "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION".
+         * Version can be fixed (e.g. "2") or "latest"
+         * 
+ * + * string secret_uri = 1; + * + * @return The secretUri. + */ + java.lang.String getSecretUri(); + /** + * + * + *
+         * Secret URI, in the form
+         * "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION".
+         * Version can be fixed (e.g. "2") or "latest"
+         * 
+ * + * string secret_uri = 1; + * + * @return The bytes for secretUri. + */ + com.google.protobuf.ByteString getSecretUriBytes(); + } + /** + * + * + *
+       * GCPSecretManagerCertificateConfig configures a secret from
+       * [Google Secret Manager](https://cloud.google.com/secret-manager).
+       * 
+ * + * Protobuf type {@code + * google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} + */ + public static final class GCPSecretManagerCertificateConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + GCPSecretManagerCertificateConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use GCPSecretManagerCertificateConfig.newBuilder() to construct. + private GCPSecretManagerCertificateConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GCPSecretManagerCertificateConfig() { + secretUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GCPSecretManagerCertificateConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.class, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.Builder + .class); + } + + public static final int SECRET_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object secretUri_ = ""; + /** + * + * + *
+         * Secret URI, in the form
+         * "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION".
+         * Version can be fixed (e.g. "2") or "latest"
+         * 
+ * + * string secret_uri = 1; + * + * @return The secretUri. + */ + @java.lang.Override + public java.lang.String getSecretUri() { + java.lang.Object ref = secretUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secretUri_ = s; + return s; + } + } + /** + * + * + *
+         * Secret URI, in the form
+         * "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION".
+         * Version can be fixed (e.g. "2") or "latest"
+         * 
+ * + * string secret_uri = 1; + * + * @return The bytes for secretUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecretUriBytes() { + java.lang.Object ref = secretUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretUri_ = 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.GeneratedMessageV3.isStringEmpty(secretUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, secretUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, secretUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig)) { + return super.equals(obj); + } + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + other = + (com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + obj; + + if (!getSecretUri().equals(other.getSecretUri())) 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) + SECRET_URI_FIELD_NUMBER; + hash = (53 * hash) + getSecretUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * GCPSecretManagerCertificateConfig configures a secret from
+         * [Google Secret Manager](https://cloud.google.com/secret-manager).
+         * 
+ * + * Protobuf type {@code + * google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.class, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.Builder + .class); + } + + // Construct using + // com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + secretUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig_descriptor; + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + getDefaultInstanceForType() { + return com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + build() { + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + buildPartial() { + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + result = + new com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.secretUri_ = secretUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) { + return mergeFrom( + (com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + other) { + if (other + == com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + .getDefaultInstance()) return this; + if (!other.getSecretUri().isEmpty()) { + secretUri_ = other.secretUri_; + 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: + { + secretUri_ = 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 secretUri_ = ""; + /** + * + * + *
+           * Secret URI, in the form
+           * "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION".
+           * Version can be fixed (e.g. "2") or "latest"
+           * 
+ * + * string secret_uri = 1; + * + * @return The secretUri. + */ + public java.lang.String getSecretUri() { + java.lang.Object ref = secretUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secretUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Secret URI, in the form
+           * "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION".
+           * Version can be fixed (e.g. "2") or "latest"
+           * 
+ * + * string secret_uri = 1; + * + * @return The bytes for secretUri. + */ + public com.google.protobuf.ByteString getSecretUriBytes() { + java.lang.Object ref = secretUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Secret URI, in the form
+           * "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION".
+           * Version can be fixed (e.g. "2") or "latest"
+           * 
+ * + * string secret_uri = 1; + * + * @param value The secretUri to set. + * @return This builder for chaining. + */ + public Builder setSecretUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + secretUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+           * Secret URI, in the form
+           * "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION".
+           * Version can be fixed (e.g. "2") or "latest"
+           * 
+ * + * string secret_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearSecretUri() { + secretUri_ = getDefaultInstance().getSecretUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * Secret URI, in the form
+           * "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION".
+           * Version can be fixed (e.g. "2") or "latest"
+           * 
+ * + * string secret_uri = 1; + * + * @param value The bytes for secretUri to set. + * @return This builder for chaining. + */ + public Builder setSecretUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + secretUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + } + + // @@protoc_insertion_point(class_scope:google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + private static final com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig(); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GCPSecretManagerCertificateConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int certificateConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object certificateConfig_; + + public enum CertificateConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCP_SECRET_MANAGER_CERTIFICATE_CONFIG(2), + CERTIFICATECONFIG_NOT_SET(0); + private final int value; + + private CertificateConfigCase(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 CertificateConfigCase valueOf(int value) { + return forNumber(value); + } + + public static CertificateConfigCase forNumber(int value) { + switch (value) { + case 2: + return GCP_SECRET_MANAGER_CERTIFICATE_CONFIG; + case 0: + return CERTIFICATECONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CertificateConfigCase getCertificateConfigCase() { + return CertificateConfigCase.forNumber(certificateConfigCase_); + } + + public static final int FQDNS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList fqdns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * List of fully qualified domain names (FQDN).
+       * Specifying port is supported.
+       * Wilcards are NOT supported.
+       * Examples:
+       * - my.customdomain.com
+       * - 10.0.1.2:5000
+       * 
+ * + * repeated string fqdns = 1; + * + * @return A list containing the fqdns. + */ + public com.google.protobuf.ProtocolStringList getFqdnsList() { + return fqdns_; + } + /** + * + * + *
+       * List of fully qualified domain names (FQDN).
+       * Specifying port is supported.
+       * Wilcards are NOT supported.
+       * Examples:
+       * - my.customdomain.com
+       * - 10.0.1.2:5000
+       * 
+ * + * repeated string fqdns = 1; + * + * @return The count of fqdns. + */ + public int getFqdnsCount() { + return fqdns_.size(); + } + /** + * + * + *
+       * List of fully qualified domain names (FQDN).
+       * Specifying port is supported.
+       * Wilcards are NOT supported.
+       * Examples:
+       * - my.customdomain.com
+       * - 10.0.1.2:5000
+       * 
+ * + * repeated string fqdns = 1; + * + * @param index The index of the element to return. + * @return The fqdns at the given index. + */ + public java.lang.String getFqdns(int index) { + return fqdns_.get(index); + } + /** + * + * + *
+       * List of fully qualified domain names (FQDN).
+       * Specifying port is supported.
+       * Wilcards are NOT supported.
+       * Examples:
+       * - my.customdomain.com
+       * - 10.0.1.2:5000
+       * 
+ * + * repeated string fqdns = 1; + * + * @param index The index of the value to return. + * @return The bytes of the fqdns at the given index. + */ + public com.google.protobuf.ByteString getFqdnsBytes(int index) { + return fqdns_.getByteString(index); + } + + public static final int GCP_SECRET_MANAGER_CERTIFICATE_CONFIG_FIELD_NUMBER = 2; + /** + * + * + *
+       * Google Secret Manager (GCP) certificate configuration.
+       * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig gcp_secret_manager_certificate_config = 2; + * + * + * @return Whether the gcpSecretManagerCertificateConfig field is set. + */ + @java.lang.Override + public boolean hasGcpSecretManagerCertificateConfig() { + return certificateConfigCase_ == 2; + } + /** + * + * + *
+       * Google Secret Manager (GCP) certificate configuration.
+       * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig gcp_secret_manager_certificate_config = 2; + * + * + * @return The gcpSecretManagerCertificateConfig. + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + getGcpSecretManagerCertificateConfig() { + if (certificateConfigCase_ == 2) { + return (com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + certificateConfig_; + } + return com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + .getDefaultInstance(); + } + /** + * + * + *
+       * Google Secret Manager (GCP) certificate configuration.
+       * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig gcp_secret_manager_certificate_config = 2; + * + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfigOrBuilder + getGcpSecretManagerCertificateConfigOrBuilder() { + if (certificateConfigCase_ == 2) { + return (com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + certificateConfig_; + } + return com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + .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 { + for (int i = 0; i < fqdns_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fqdns_.getRaw(i)); + } + if (certificateConfigCase_ == 2) { + output.writeMessage( + 2, + (com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + certificateConfig_); + } + 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 < fqdns_.size(); i++) { + dataSize += computeStringSizeNoTag(fqdns_.getRaw(i)); + } + size += dataSize; + size += 1 * getFqdnsList().size(); + } + if (certificateConfigCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + certificateConfig_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig)) { + return super.equals(obj); + } + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + other = + (com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig) + obj; + + if (!getFqdnsList().equals(other.getFqdnsList())) return false; + if (!getCertificateConfigCase().equals(other.getCertificateConfigCase())) return false; + switch (certificateConfigCase_) { + case 2: + if (!getGcpSecretManagerCertificateConfig() + .equals(other.getGcpSecretManagerCertificateConfig())) 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 (getFqdnsCount() > 0) { + hash = (37 * hash) + FQDNS_FIELD_NUMBER; + hash = (53 * hash) + getFqdnsList().hashCode(); + } + switch (certificateConfigCase_) { + case 2: + hash = (37 * hash) + GCP_SECRET_MANAGER_CERTIFICATE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getGcpSecretManagerCertificateConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * CertificateAuthorityDomainConfig configures one or more fully qualified
+       * domain names (FQDN) to a specific certificate.
+       * 
+ * + * Protobuf type {@code + * google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig) + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.class, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.Builder.class); + } + + // Construct using + // com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fqdns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (gcpSecretManagerCertificateConfigBuilder_ != null) { + gcpSecretManagerCertificateConfigBuilder_.clear(); + } + certificateConfigCase_ = 0; + certificateConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_descriptor; + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + getDefaultInstanceForType() { + return com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + build() { + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + buildPartial() { + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + result = + new com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + fqdns_.makeImmutable(); + result.fqdns_ = fqdns_; + } + } + + private void buildPartialOneofs( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + result) { + result.certificateConfigCase_ = certificateConfigCase_; + result.certificateConfig_ = this.certificateConfig_; + if (certificateConfigCase_ == 2 && gcpSecretManagerCertificateConfigBuilder_ != null) { + result.certificateConfig_ = gcpSecretManagerCertificateConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig) { + return mergeFrom( + (com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + other) { + if (other + == com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.getDefaultInstance()) return this; + if (!other.fqdns_.isEmpty()) { + if (fqdns_.isEmpty()) { + fqdns_ = other.fqdns_; + bitField0_ |= 0x00000001; + } else { + ensureFqdnsIsMutable(); + fqdns_.addAll(other.fqdns_); + } + onChanged(); + } + switch (other.getCertificateConfigCase()) { + case GCP_SECRET_MANAGER_CERTIFICATE_CONFIG: + { + mergeGcpSecretManagerCertificateConfig( + other.getGcpSecretManagerCertificateConfig()); + break; + } + case CERTIFICATECONFIG_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(); + ensureFqdnsIsMutable(); + fqdns_.add(s); + break; + } // case 10 + case 18: + { + input.readMessage( + getGcpSecretManagerCertificateConfigFieldBuilder().getBuilder(), + extensionRegistry); + certificateConfigCase_ = 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 certificateConfigCase_ = 0; + private java.lang.Object certificateConfig_; + + public CertificateConfigCase getCertificateConfigCase() { + return CertificateConfigCase.forNumber(certificateConfigCase_); + } + + public Builder clearCertificateConfig() { + certificateConfigCase_ = 0; + certificateConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList fqdns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureFqdnsIsMutable() { + if (!fqdns_.isModifiable()) { + fqdns_ = new com.google.protobuf.LazyStringArrayList(fqdns_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+         * List of fully qualified domain names (FQDN).
+         * Specifying port is supported.
+         * Wilcards are NOT supported.
+         * Examples:
+         * - my.customdomain.com
+         * - 10.0.1.2:5000
+         * 
+ * + * repeated string fqdns = 1; + * + * @return A list containing the fqdns. + */ + public com.google.protobuf.ProtocolStringList getFqdnsList() { + fqdns_.makeImmutable(); + return fqdns_; + } + /** + * + * + *
+         * List of fully qualified domain names (FQDN).
+         * Specifying port is supported.
+         * Wilcards are NOT supported.
+         * Examples:
+         * - my.customdomain.com
+         * - 10.0.1.2:5000
+         * 
+ * + * repeated string fqdns = 1; + * + * @return The count of fqdns. + */ + public int getFqdnsCount() { + return fqdns_.size(); + } + /** + * + * + *
+         * List of fully qualified domain names (FQDN).
+         * Specifying port is supported.
+         * Wilcards are NOT supported.
+         * Examples:
+         * - my.customdomain.com
+         * - 10.0.1.2:5000
+         * 
+ * + * repeated string fqdns = 1; + * + * @param index The index of the element to return. + * @return The fqdns at the given index. + */ + public java.lang.String getFqdns(int index) { + return fqdns_.get(index); + } + /** + * + * + *
+         * List of fully qualified domain names (FQDN).
+         * Specifying port is supported.
+         * Wilcards are NOT supported.
+         * Examples:
+         * - my.customdomain.com
+         * - 10.0.1.2:5000
+         * 
+ * + * repeated string fqdns = 1; + * + * @param index The index of the value to return. + * @return The bytes of the fqdns at the given index. + */ + public com.google.protobuf.ByteString getFqdnsBytes(int index) { + return fqdns_.getByteString(index); + } + /** + * + * + *
+         * List of fully qualified domain names (FQDN).
+         * Specifying port is supported.
+         * Wilcards are NOT supported.
+         * Examples:
+         * - my.customdomain.com
+         * - 10.0.1.2:5000
+         * 
+ * + * repeated string fqdns = 1; + * + * @param index The index to set the value at. + * @param value The fqdns to set. + * @return This builder for chaining. + */ + public Builder setFqdns(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFqdnsIsMutable(); + fqdns_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * List of fully qualified domain names (FQDN).
+         * Specifying port is supported.
+         * Wilcards are NOT supported.
+         * Examples:
+         * - my.customdomain.com
+         * - 10.0.1.2:5000
+         * 
+ * + * repeated string fqdns = 1; + * + * @param value The fqdns to add. + * @return This builder for chaining. + */ + public Builder addFqdns(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFqdnsIsMutable(); + fqdns_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * List of fully qualified domain names (FQDN).
+         * Specifying port is supported.
+         * Wilcards are NOT supported.
+         * Examples:
+         * - my.customdomain.com
+         * - 10.0.1.2:5000
+         * 
+ * + * repeated string fqdns = 1; + * + * @param values The fqdns to add. + * @return This builder for chaining. + */ + public Builder addAllFqdns(java.lang.Iterable values) { + ensureFqdnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fqdns_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * List of fully qualified domain names (FQDN).
+         * Specifying port is supported.
+         * Wilcards are NOT supported.
+         * Examples:
+         * - my.customdomain.com
+         * - 10.0.1.2:5000
+         * 
+ * + * repeated string fqdns = 1; + * + * @return This builder for chaining. + */ + public Builder clearFqdns() { + fqdns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * List of fully qualified domain names (FQDN).
+         * Specifying port is supported.
+         * Wilcards are NOT supported.
+         * Examples:
+         * - my.customdomain.com
+         * - 10.0.1.2:5000
+         * 
+ * + * repeated string fqdns = 1; + * + * @param value The bytes of the fqdns to add. + * @return This builder for chaining. + */ + public Builder addFqdnsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFqdnsIsMutable(); + fqdns_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.Builder, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfigOrBuilder> + gcpSecretManagerCertificateConfigBuilder_; + /** + * + * + *
+         * Google Secret Manager (GCP) certificate configuration.
+         * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig gcp_secret_manager_certificate_config = 2; + * + * + * @return Whether the gcpSecretManagerCertificateConfig field is set. + */ + @java.lang.Override + public boolean hasGcpSecretManagerCertificateConfig() { + return certificateConfigCase_ == 2; + } + /** + * + * + *
+         * Google Secret Manager (GCP) certificate configuration.
+         * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig gcp_secret_manager_certificate_config = 2; + * + * + * @return The gcpSecretManagerCertificateConfig. + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + getGcpSecretManagerCertificateConfig() { + if (gcpSecretManagerCertificateConfigBuilder_ == null) { + if (certificateConfigCase_ == 2) { + return (com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + certificateConfig_; + } + return com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + .getDefaultInstance(); + } else { + if (certificateConfigCase_ == 2) { + return gcpSecretManagerCertificateConfigBuilder_.getMessage(); + } + return com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Google Secret Manager (GCP) certificate configuration.
+         * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig gcp_secret_manager_certificate_config = 2; + * + */ + public Builder setGcpSecretManagerCertificateConfig( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + value) { + if (gcpSecretManagerCertificateConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificateConfig_ = value; + onChanged(); + } else { + gcpSecretManagerCertificateConfigBuilder_.setMessage(value); + } + certificateConfigCase_ = 2; + return this; + } + /** + * + * + *
+         * Google Secret Manager (GCP) certificate configuration.
+         * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig gcp_secret_manager_certificate_config = 2; + * + */ + public Builder setGcpSecretManagerCertificateConfig( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.Builder + builderForValue) { + if (gcpSecretManagerCertificateConfigBuilder_ == null) { + certificateConfig_ = builderForValue.build(); + onChanged(); + } else { + gcpSecretManagerCertificateConfigBuilder_.setMessage(builderForValue.build()); + } + certificateConfigCase_ = 2; + return this; + } + /** + * + * + *
+         * Google Secret Manager (GCP) certificate configuration.
+         * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig gcp_secret_manager_certificate_config = 2; + * + */ + public Builder mergeGcpSecretManagerCertificateConfig( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + value) { + if (gcpSecretManagerCertificateConfigBuilder_ == null) { + if (certificateConfigCase_ == 2 + && certificateConfig_ + != com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + .getDefaultInstance()) { + certificateConfig_ = + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + .newBuilder( + (com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + .GCPSecretManagerCertificateConfig) + certificateConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + certificateConfig_ = value; + } + onChanged(); + } else { + if (certificateConfigCase_ == 2) { + gcpSecretManagerCertificateConfigBuilder_.mergeFrom(value); + } else { + gcpSecretManagerCertificateConfigBuilder_.setMessage(value); + } + } + certificateConfigCase_ = 2; + return this; + } + /** + * + * + *
+         * Google Secret Manager (GCP) certificate configuration.
+         * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig gcp_secret_manager_certificate_config = 2; + * + */ + public Builder clearGcpSecretManagerCertificateConfig() { + if (gcpSecretManagerCertificateConfigBuilder_ == null) { + if (certificateConfigCase_ == 2) { + certificateConfigCase_ = 0; + certificateConfig_ = null; + onChanged(); + } + } else { + if (certificateConfigCase_ == 2) { + certificateConfigCase_ = 0; + certificateConfig_ = null; + } + gcpSecretManagerCertificateConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Google Secret Manager (GCP) certificate configuration.
+         * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig gcp_secret_manager_certificate_config = 2; + * + */ + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.Builder + getGcpSecretManagerCertificateConfigBuilder() { + return getGcpSecretManagerCertificateConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Google Secret Manager (GCP) certificate configuration.
+         * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig gcp_secret_manager_certificate_config = 2; + * + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfigOrBuilder + getGcpSecretManagerCertificateConfigOrBuilder() { + if ((certificateConfigCase_ == 2) + && (gcpSecretManagerCertificateConfigBuilder_ != null)) { + return gcpSecretManagerCertificateConfigBuilder_.getMessageOrBuilder(); + } else { + if (certificateConfigCase_ == 2) { + return (com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + certificateConfig_; + } + return com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Google Secret Manager (GCP) certificate configuration.
+         * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig gcp_secret_manager_certificate_config = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.Builder, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfigOrBuilder> + getGcpSecretManagerCertificateConfigFieldBuilder() { + if (gcpSecretManagerCertificateConfigBuilder_ == null) { + if (!(certificateConfigCase_ == 2)) { + certificateConfig_ = + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + .getDefaultInstance(); + } + gcpSecretManagerCertificateConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.Builder, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + .GCPSecretManagerCertificateConfigOrBuilder>( + (com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + certificateConfig_, + getParentForChildren(), + isClean()); + certificateConfig_ = null; + } + certificateConfigCase_ = 2; + onChanged(); + return gcpSecretManagerCertificateConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig) + } + + // @@protoc_insertion_point(class_scope:google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig) + private static final com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig(); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CertificateAuthorityDomainConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_ = false; + /** + * + * + *
+     * Private registry access is enabled.
+     * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + public static final int CERTIFICATE_AUTHORITY_DOMAIN_CONFIG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig> + certificateAuthorityDomainConfig_; + /** + * + * + *
+     * Private registry access configuration.
+     * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig> + getCertificateAuthorityDomainConfigList() { + return certificateAuthorityDomainConfig_; + } + /** + * + * + *
+     * Private registry access configuration.
+     * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfigOrBuilder> + getCertificateAuthorityDomainConfigOrBuilderList() { + return certificateAuthorityDomainConfig_; + } + /** + * + * + *
+     * Private registry access configuration.
+     * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + @java.lang.Override + public int getCertificateAuthorityDomainConfigCount() { + return certificateAuthorityDomainConfig_.size(); + } + /** + * + * + *
+     * Private registry access configuration.
+     * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + getCertificateAuthorityDomainConfig(int index) { + return certificateAuthorityDomainConfig_.get(index); + } + /** + * + * + *
+     * Private registry access configuration.
+     * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfigOrBuilder + getCertificateAuthorityDomainConfigOrBuilder(int index) { + return certificateAuthorityDomainConfig_.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 (enabled_ != false) { + output.writeBool(1, enabled_); + } + for (int i = 0; i < certificateAuthorityDomainConfig_.size(); i++) { + output.writeMessage(2, certificateAuthorityDomainConfig_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enabled_); + } + for (int i = 0; i < certificateAuthorityDomainConfig_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, certificateAuthorityDomainConfig_.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.container.v1.ContainerdConfig.PrivateRegistryAccessConfig)) { + return super.equals(obj); + } + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig other = + (com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig) obj; + + if (getEnabled() != other.getEnabled()) return false; + if (!getCertificateAuthorityDomainConfigList() + .equals(other.getCertificateAuthorityDomainConfigList())) 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) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); + if (getCertificateAuthorityDomainConfigCount() > 0) { + hash = (37 * hash) + CERTIFICATE_AUTHORITY_DOMAIN_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCertificateAuthorityDomainConfigList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * PrivateRegistryAccessConfig contains access configuration for
+     * private container registries.
+     * 
+ * + * Protobuf type {@code google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig) + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.class, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.Builder.class); + } + + // Construct using + // com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enabled_ = false; + if (certificateAuthorityDomainConfigBuilder_ == null) { + certificateAuthorityDomainConfig_ = java.util.Collections.emptyList(); + } else { + certificateAuthorityDomainConfig_ = null; + certificateAuthorityDomainConfigBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_PrivateRegistryAccessConfig_descriptor; + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + getDefaultInstanceForType() { + return com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig build() { + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig buildPartial() { + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig result = + new com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig result) { + if (certificateAuthorityDomainConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + certificateAuthorityDomainConfig_ = + java.util.Collections.unmodifiableList(certificateAuthorityDomainConfig_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.certificateAuthorityDomainConfig_ = certificateAuthorityDomainConfig_; + } else { + result.certificateAuthorityDomainConfig_ = + certificateAuthorityDomainConfigBuilder_.build(); + } + } + + private void buildPartial0( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enabled_ = enabled_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig) { + return mergeFrom( + (com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig other) { + if (other + == com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + if (certificateAuthorityDomainConfigBuilder_ == null) { + if (!other.certificateAuthorityDomainConfig_.isEmpty()) { + if (certificateAuthorityDomainConfig_.isEmpty()) { + certificateAuthorityDomainConfig_ = other.certificateAuthorityDomainConfig_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCertificateAuthorityDomainConfigIsMutable(); + certificateAuthorityDomainConfig_.addAll(other.certificateAuthorityDomainConfig_); + } + onChanged(); + } + } else { + if (!other.certificateAuthorityDomainConfig_.isEmpty()) { + if (certificateAuthorityDomainConfigBuilder_.isEmpty()) { + certificateAuthorityDomainConfigBuilder_.dispose(); + certificateAuthorityDomainConfigBuilder_ = null; + certificateAuthorityDomainConfig_ = other.certificateAuthorityDomainConfig_; + bitField0_ = (bitField0_ & ~0x00000002); + certificateAuthorityDomainConfigBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCertificateAuthorityDomainConfigFieldBuilder() + : null; + } else { + certificateAuthorityDomainConfigBuilder_.addAllMessages( + other.certificateAuthorityDomainConfig_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + enabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + m = + input.readMessage( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.parser(), + extensionRegistry); + if (certificateAuthorityDomainConfigBuilder_ == null) { + ensureCertificateAuthorityDomainConfigIsMutable(); + certificateAuthorityDomainConfig_.add(m); + } else { + certificateAuthorityDomainConfigBuilder_.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 boolean enabled_; + /** + * + * + *
+       * Private registry access is enabled.
+       * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * + * + *
+       * Private registry access is enabled.
+       * 
+ * + * bool enabled = 1; + * + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Private registry access is enabled.
+       * 
+ * + * bool enabled = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + + private java.util.List< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig> + certificateAuthorityDomainConfig_ = java.util.Collections.emptyList(); + + private void ensureCertificateAuthorityDomainConfigIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + certificateAuthorityDomainConfig_ = + new java.util.ArrayList< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig>(certificateAuthorityDomainConfig_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.Builder, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfigOrBuilder> + certificateAuthorityDomainConfigBuilder_; + + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public java.util.List< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig> + getCertificateAuthorityDomainConfigList() { + if (certificateAuthorityDomainConfigBuilder_ == null) { + return java.util.Collections.unmodifiableList(certificateAuthorityDomainConfig_); + } else { + return certificateAuthorityDomainConfigBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public int getCertificateAuthorityDomainConfigCount() { + if (certificateAuthorityDomainConfigBuilder_ == null) { + return certificateAuthorityDomainConfig_.size(); + } else { + return certificateAuthorityDomainConfigBuilder_.getCount(); + } + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + getCertificateAuthorityDomainConfig(int index) { + if (certificateAuthorityDomainConfigBuilder_ == null) { + return certificateAuthorityDomainConfig_.get(index); + } else { + return certificateAuthorityDomainConfigBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public Builder setCertificateAuthorityDomainConfig( + int index, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + value) { + if (certificateAuthorityDomainConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificateAuthorityDomainConfigIsMutable(); + certificateAuthorityDomainConfig_.set(index, value); + onChanged(); + } else { + certificateAuthorityDomainConfigBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public Builder setCertificateAuthorityDomainConfig( + int index, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.Builder + builderForValue) { + if (certificateAuthorityDomainConfigBuilder_ == null) { + ensureCertificateAuthorityDomainConfigIsMutable(); + certificateAuthorityDomainConfig_.set(index, builderForValue.build()); + onChanged(); + } else { + certificateAuthorityDomainConfigBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public Builder addCertificateAuthorityDomainConfig( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + value) { + if (certificateAuthorityDomainConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificateAuthorityDomainConfigIsMutable(); + certificateAuthorityDomainConfig_.add(value); + onChanged(); + } else { + certificateAuthorityDomainConfigBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public Builder addCertificateAuthorityDomainConfig( + int index, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig + value) { + if (certificateAuthorityDomainConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificateAuthorityDomainConfigIsMutable(); + certificateAuthorityDomainConfig_.add(index, value); + onChanged(); + } else { + certificateAuthorityDomainConfigBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public Builder addCertificateAuthorityDomainConfig( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.Builder + builderForValue) { + if (certificateAuthorityDomainConfigBuilder_ == null) { + ensureCertificateAuthorityDomainConfigIsMutable(); + certificateAuthorityDomainConfig_.add(builderForValue.build()); + onChanged(); + } else { + certificateAuthorityDomainConfigBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public Builder addCertificateAuthorityDomainConfig( + int index, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.Builder + builderForValue) { + if (certificateAuthorityDomainConfigBuilder_ == null) { + ensureCertificateAuthorityDomainConfigIsMutable(); + certificateAuthorityDomainConfig_.add(index, builderForValue.build()); + onChanged(); + } else { + certificateAuthorityDomainConfigBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public Builder addAllCertificateAuthorityDomainConfig( + java.lang.Iterable< + ? extends + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig> + values) { + if (certificateAuthorityDomainConfigBuilder_ == null) { + ensureCertificateAuthorityDomainConfigIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, certificateAuthorityDomainConfig_); + onChanged(); + } else { + certificateAuthorityDomainConfigBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public Builder clearCertificateAuthorityDomainConfig() { + if (certificateAuthorityDomainConfigBuilder_ == null) { + certificateAuthorityDomainConfig_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + certificateAuthorityDomainConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public Builder removeCertificateAuthorityDomainConfig(int index) { + if (certificateAuthorityDomainConfigBuilder_ == null) { + ensureCertificateAuthorityDomainConfigIsMutable(); + certificateAuthorityDomainConfig_.remove(index); + onChanged(); + } else { + certificateAuthorityDomainConfigBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.Builder + getCertificateAuthorityDomainConfigBuilder(int index) { + return getCertificateAuthorityDomainConfigFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfigOrBuilder + getCertificateAuthorityDomainConfigOrBuilder(int index) { + if (certificateAuthorityDomainConfigBuilder_ == null) { + return certificateAuthorityDomainConfig_.get(index); + } else { + return certificateAuthorityDomainConfigBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public java.util.List< + ? extends + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfigOrBuilder> + getCertificateAuthorityDomainConfigOrBuilderList() { + if (certificateAuthorityDomainConfigBuilder_ != null) { + return certificateAuthorityDomainConfigBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(certificateAuthorityDomainConfig_); + } + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.Builder + addCertificateAuthorityDomainConfigBuilder() { + return getCertificateAuthorityDomainConfigFieldBuilder() + .addBuilder( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.getDefaultInstance()); + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.Builder + addCertificateAuthorityDomainConfigBuilder(int index) { + return getCertificateAuthorityDomainConfigFieldBuilder() + .addBuilder( + index, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.getDefaultInstance()); + } + /** + * + * + *
+       * Private registry access configuration.
+       * 
+ * + * + * repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2; + * + */ + public java.util.List< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.Builder> + getCertificateAuthorityDomainConfigBuilderList() { + return getCertificateAuthorityDomainConfigFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.Builder, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfigOrBuilder> + getCertificateAuthorityDomainConfigFieldBuilder() { + if (certificateAuthorityDomainConfigBuilder_ == null) { + certificateAuthorityDomainConfigBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfig.Builder, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .CertificateAuthorityDomainConfigOrBuilder>( + certificateAuthorityDomainConfig_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + certificateAuthorityDomainConfig_ = null; + } + return certificateAuthorityDomainConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig) + } + + // @@protoc_insertion_point(class_scope:google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig) + private static final com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig(); + } + + public static com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrivateRegistryAccessConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int PRIVATE_REGISTRY_ACCESS_CONFIG_FIELD_NUMBER = 1; + private com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + privateRegistryAccessConfig_; + /** + * + * + *
+   * PrivateRegistryAccessConfig is used to configure access configuration
+   * for private container registries.
+   * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig private_registry_access_config = 1; + * + * + * @return Whether the privateRegistryAccessConfig field is set. + */ + @java.lang.Override + public boolean hasPrivateRegistryAccessConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * PrivateRegistryAccessConfig is used to configure access configuration
+   * for private container registries.
+   * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig private_registry_access_config = 1; + * + * + * @return The privateRegistryAccessConfig. + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + getPrivateRegistryAccessConfig() { + return privateRegistryAccessConfig_ == null + ? com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.getDefaultInstance() + : privateRegistryAccessConfig_; + } + /** + * + * + *
+   * PrivateRegistryAccessConfig is used to configure access configuration
+   * for private container registries.
+   * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig private_registry_access_config = 1; + * + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfigOrBuilder + getPrivateRegistryAccessConfigOrBuilder() { + return privateRegistryAccessConfig_ == null + ? com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.getDefaultInstance() + : privateRegistryAccessConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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, getPrivateRegistryAccessConfig()); + } + 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, getPrivateRegistryAccessConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.container.v1.ContainerdConfig)) { + return super.equals(obj); + } + com.google.container.v1.ContainerdConfig other = (com.google.container.v1.ContainerdConfig) obj; + + if (hasPrivateRegistryAccessConfig() != other.hasPrivateRegistryAccessConfig()) return false; + if (hasPrivateRegistryAccessConfig()) { + if (!getPrivateRegistryAccessConfig().equals(other.getPrivateRegistryAccessConfig())) + 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 (hasPrivateRegistryAccessConfig()) { + hash = (37 * hash) + PRIVATE_REGISTRY_ACCESS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPrivateRegistryAccessConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.container.v1.ContainerdConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.container.v1.ContainerdConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.container.v1.ContainerdConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.container.v1.ContainerdConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.container.v1.ContainerdConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.container.v1.ContainerdConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.container.v1.ContainerdConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.container.v1.ContainerdConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.container.v1.ContainerdConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * ContainerdConfig contains configuration to customize containerd.
+   * 
+ * + * Protobuf type {@code google.container.v1.ContainerdConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.container.v1.ContainerdConfig) + com.google.container.v1.ContainerdConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.container.v1.ContainerdConfig.class, + com.google.container.v1.ContainerdConfig.Builder.class); + } + + // Construct using com.google.container.v1.ContainerdConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPrivateRegistryAccessConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + privateRegistryAccessConfig_ = null; + if (privateRegistryAccessConfigBuilder_ != null) { + privateRegistryAccessConfigBuilder_.dispose(); + privateRegistryAccessConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_ContainerdConfig_descriptor; + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig getDefaultInstanceForType() { + return com.google.container.v1.ContainerdConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig build() { + com.google.container.v1.ContainerdConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig buildPartial() { + com.google.container.v1.ContainerdConfig result = + new com.google.container.v1.ContainerdConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.container.v1.ContainerdConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.privateRegistryAccessConfig_ = + privateRegistryAccessConfigBuilder_ == null + ? privateRegistryAccessConfig_ + : privateRegistryAccessConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.container.v1.ContainerdConfig) { + return mergeFrom((com.google.container.v1.ContainerdConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.container.v1.ContainerdConfig other) { + if (other == com.google.container.v1.ContainerdConfig.getDefaultInstance()) return this; + if (other.hasPrivateRegistryAccessConfig()) { + mergePrivateRegistryAccessConfig(other.getPrivateRegistryAccessConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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( + getPrivateRegistryAccessConfigFieldBuilder().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.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + privateRegistryAccessConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.Builder, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfigOrBuilder> + privateRegistryAccessConfigBuilder_; + /** + * + * + *
+     * PrivateRegistryAccessConfig is used to configure access configuration
+     * for private container registries.
+     * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig private_registry_access_config = 1; + * + * + * @return Whether the privateRegistryAccessConfig field is set. + */ + public boolean hasPrivateRegistryAccessConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * PrivateRegistryAccessConfig is used to configure access configuration
+     * for private container registries.
+     * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig private_registry_access_config = 1; + * + * + * @return The privateRegistryAccessConfig. + */ + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + getPrivateRegistryAccessConfig() { + if (privateRegistryAccessConfigBuilder_ == null) { + return privateRegistryAccessConfig_ == null + ? com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .getDefaultInstance() + : privateRegistryAccessConfig_; + } else { + return privateRegistryAccessConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * PrivateRegistryAccessConfig is used to configure access configuration
+     * for private container registries.
+     * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig private_registry_access_config = 1; + * + */ + public Builder setPrivateRegistryAccessConfig( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig value) { + if (privateRegistryAccessConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + privateRegistryAccessConfig_ = value; + } else { + privateRegistryAccessConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * PrivateRegistryAccessConfig is used to configure access configuration
+     * for private container registries.
+     * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig private_registry_access_config = 1; + * + */ + public Builder setPrivateRegistryAccessConfig( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.Builder + builderForValue) { + if (privateRegistryAccessConfigBuilder_ == null) { + privateRegistryAccessConfig_ = builderForValue.build(); + } else { + privateRegistryAccessConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * PrivateRegistryAccessConfig is used to configure access configuration
+     * for private container registries.
+     * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig private_registry_access_config = 1; + * + */ + public Builder mergePrivateRegistryAccessConfig( + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig value) { + if (privateRegistryAccessConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && privateRegistryAccessConfig_ != null + && privateRegistryAccessConfig_ + != com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .getDefaultInstance()) { + getPrivateRegistryAccessConfigBuilder().mergeFrom(value); + } else { + privateRegistryAccessConfig_ = value; + } + } else { + privateRegistryAccessConfigBuilder_.mergeFrom(value); + } + if (privateRegistryAccessConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * PrivateRegistryAccessConfig is used to configure access configuration
+     * for private container registries.
+     * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig private_registry_access_config = 1; + * + */ + public Builder clearPrivateRegistryAccessConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + privateRegistryAccessConfig_ = null; + if (privateRegistryAccessConfigBuilder_ != null) { + privateRegistryAccessConfigBuilder_.dispose(); + privateRegistryAccessConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * PrivateRegistryAccessConfig is used to configure access configuration
+     * for private container registries.
+     * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig private_registry_access_config = 1; + * + */ + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.Builder + getPrivateRegistryAccessConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPrivateRegistryAccessConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * PrivateRegistryAccessConfig is used to configure access configuration
+     * for private container registries.
+     * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig private_registry_access_config = 1; + * + */ + public com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfigOrBuilder + getPrivateRegistryAccessConfigOrBuilder() { + if (privateRegistryAccessConfigBuilder_ != null) { + return privateRegistryAccessConfigBuilder_.getMessageOrBuilder(); + } else { + return privateRegistryAccessConfig_ == null + ? com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + .getDefaultInstance() + : privateRegistryAccessConfig_; + } + } + /** + * + * + *
+     * PrivateRegistryAccessConfig is used to configure access configuration
+     * for private container registries.
+     * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig private_registry_access_config = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.Builder, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfigOrBuilder> + getPrivateRegistryAccessConfigFieldBuilder() { + if (privateRegistryAccessConfigBuilder_ == null) { + privateRegistryAccessConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.Builder, + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfigOrBuilder>( + getPrivateRegistryAccessConfig(), getParentForChildren(), isClean()); + privateRegistryAccessConfig_ = null; + } + return privateRegistryAccessConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.container.v1.ContainerdConfig) + } + + // @@protoc_insertion_point(class_scope:google.container.v1.ContainerdConfig) + private static final com.google.container.v1.ContainerdConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.container.v1.ContainerdConfig(); + } + + public static com.google.container.v1.ContainerdConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContainerdConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.container.v1.ContainerdConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ContainerdConfigOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ContainerdConfigOrBuilder.java new file mode 100644 index 000000000000..4eda5918476a --- /dev/null +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ContainerdConfigOrBuilder.java @@ -0,0 +1,72 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/container/v1/cluster_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.container.v1; + +public interface ContainerdConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.container.v1.ContainerdConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * PrivateRegistryAccessConfig is used to configure access configuration
+   * for private container registries.
+   * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig private_registry_access_config = 1; + * + * + * @return Whether the privateRegistryAccessConfig field is set. + */ + boolean hasPrivateRegistryAccessConfig(); + /** + * + * + *
+   * PrivateRegistryAccessConfig is used to configure access configuration
+   * for private container registries.
+   * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig private_registry_access_config = 1; + * + * + * @return The privateRegistryAccessConfig. + */ + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + getPrivateRegistryAccessConfig(); + /** + * + * + *
+   * PrivateRegistryAccessConfig is used to configure access configuration
+   * for private container registries.
+   * 
+ * + * + * .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig private_registry_access_config = 1; + * + */ + com.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfigOrBuilder + getPrivateRegistryAccessConfigOrBuilder(); +} diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateClusterRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateClusterRequest.java index e3fe3f6fc5e2..ed8b79ed1e95 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateClusterRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateClusterRequest.java @@ -82,7 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2587 + * google/container/v1/cluster_service.proto;l=2691 * @return The projectId. */ @java.lang.Override @@ -110,7 +110,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2587 + * google/container/v1/cluster_service.proto;l=2691 * @return The bytes for projectId. */ @java.lang.Override @@ -144,7 +144,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2593 + * google/container/v1/cluster_service.proto;l=2697 * @return The zone. */ @java.lang.Override @@ -173,7 +173,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2593 + * google/container/v1/cluster_service.proto;l=2697 * @return The bytes for zone. */ @java.lang.Override @@ -740,7 +740,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2587 + * google/container/v1/cluster_service.proto;l=2691 * @return The projectId. */ @java.lang.Deprecated @@ -767,7 +767,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2587 + * google/container/v1/cluster_service.proto;l=2691 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -794,7 +794,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2587 + * google/container/v1/cluster_service.proto;l=2691 * @param value The projectId to set. * @return This builder for chaining. */ @@ -820,7 +820,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2587 + * google/container/v1/cluster_service.proto;l=2691 * @return This builder for chaining. */ @java.lang.Deprecated @@ -842,7 +842,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2587 + * google/container/v1/cluster_service.proto;l=2691 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -872,7 +872,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2593 + * google/container/v1/cluster_service.proto;l=2697 * @return The zone. */ @java.lang.Deprecated @@ -900,7 +900,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2593 + * google/container/v1/cluster_service.proto;l=2697 * @return The bytes for zone. */ @java.lang.Deprecated @@ -928,7 +928,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2593 + * google/container/v1/cluster_service.proto;l=2697 * @param value The zone to set. * @return This builder for chaining. */ @@ -955,7 +955,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2593 + * google/container/v1/cluster_service.proto;l=2697 * @return This builder for chaining. */ @java.lang.Deprecated @@ -978,7 +978,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2593 + * google/container/v1/cluster_service.proto;l=2697 * @param value The bytes for zone to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateClusterRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateClusterRequestOrBuilder.java index 76d9aa666587..0b7812d5afef 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateClusterRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateClusterRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface CreateClusterRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2587 + * google/container/v1/cluster_service.proto;l=2691 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface CreateClusterRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2587 + * google/container/v1/cluster_service.proto;l=2691 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface CreateClusterRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2593 + * google/container/v1/cluster_service.proto;l=2697 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface CreateClusterRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2593 + * google/container/v1/cluster_service.proto;l=2697 * @return The bytes for zone. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateNodePoolRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateNodePoolRequest.java index 4e9593574b50..5988dad46f9b 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateNodePoolRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateNodePoolRequest.java @@ -83,7 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3205 + * google/container/v1/cluster_service.proto;l=3319 * @return The projectId. */ @java.lang.Override @@ -111,7 +111,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3205 + * google/container/v1/cluster_service.proto;l=3319 * @return The bytes for projectId. */ @java.lang.Override @@ -145,7 +145,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3211 + * google/container/v1/cluster_service.proto;l=3325 * @return The zone. */ @java.lang.Override @@ -174,7 +174,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3211 + * google/container/v1/cluster_service.proto;l=3325 * @return The bytes for zone. */ @java.lang.Override @@ -206,7 +206,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3215 + * google/container/v1/cluster_service.proto;l=3329 * @return The clusterId. */ @java.lang.Override @@ -233,7 +233,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3215 + * google/container/v1/cluster_service.proto;l=3329 * @return The bytes for clusterId. */ @java.lang.Override @@ -823,7 +823,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3205 + * google/container/v1/cluster_service.proto;l=3319 * @return The projectId. */ @java.lang.Deprecated @@ -850,7 +850,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3205 + * google/container/v1/cluster_service.proto;l=3319 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -877,7 +877,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3205 + * google/container/v1/cluster_service.proto;l=3319 * @param value The projectId to set. * @return This builder for chaining. */ @@ -903,7 +903,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3205 + * google/container/v1/cluster_service.proto;l=3319 * @return This builder for chaining. */ @java.lang.Deprecated @@ -925,7 +925,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3205 + * google/container/v1/cluster_service.proto;l=3319 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -955,7 +955,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3211 + * google/container/v1/cluster_service.proto;l=3325 * @return The zone. */ @java.lang.Deprecated @@ -983,7 +983,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3211 + * google/container/v1/cluster_service.proto;l=3325 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1011,7 +1011,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3211 + * google/container/v1/cluster_service.proto;l=3325 * @param value The zone to set. * @return This builder for chaining. */ @@ -1038,7 +1038,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3211 + * google/container/v1/cluster_service.proto;l=3325 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1061,7 +1061,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3211 + * google/container/v1/cluster_service.proto;l=3325 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1089,7 +1089,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3215 + * google/container/v1/cluster_service.proto;l=3329 * @return The clusterId. */ @java.lang.Deprecated @@ -1115,7 +1115,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3215 + * google/container/v1/cluster_service.proto;l=3329 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1141,7 +1141,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3215 + * google/container/v1/cluster_service.proto;l=3329 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1166,7 +1166,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3215 + * google/container/v1/cluster_service.proto;l=3329 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1187,7 +1187,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3215 + * google/container/v1/cluster_service.proto;l=3329 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateNodePoolRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateNodePoolRequestOrBuilder.java index 6803fc18449a..e235692e9db0 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateNodePoolRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/CreateNodePoolRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface CreateNodePoolRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3205 + * google/container/v1/cluster_service.proto;l=3319 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface CreateNodePoolRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3205 + * google/container/v1/cluster_service.proto;l=3319 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface CreateNodePoolRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3211 + * google/container/v1/cluster_service.proto;l=3325 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface CreateNodePoolRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3211 + * google/container/v1/cluster_service.proto;l=3325 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface CreateNodePoolRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3215 + * google/container/v1/cluster_service.proto;l=3329 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface CreateNodePoolRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.CreateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3215 + * google/container/v1/cluster_service.proto;l=3329 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DNSConfig.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DNSConfig.java index 0deb081b51c4..f13e9cd43b1c 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DNSConfig.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DNSConfig.java @@ -42,6 +42,7 @@ private DNSConfig() { clusterDns_ = 0; clusterDnsScope_ = 0; clusterDnsDomain_ = ""; + additiveVpcScopeDnsDomain_ = ""; } @java.lang.Override @@ -522,6 +523,59 @@ public com.google.protobuf.ByteString getClusterDnsDomainBytes() { } } + public static final int ADDITIVE_VPC_SCOPE_DNS_DOMAIN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object additiveVpcScopeDnsDomain_ = ""; + /** + * + * + *
+   * Optional. The domain used in Additive VPC scope.
+   * 
+ * + * string additive_vpc_scope_dns_domain = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The additiveVpcScopeDnsDomain. + */ + @java.lang.Override + public java.lang.String getAdditiveVpcScopeDnsDomain() { + java.lang.Object ref = additiveVpcScopeDnsDomain_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + additiveVpcScopeDnsDomain_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The domain used in Additive VPC scope.
+   * 
+ * + * string additive_vpc_scope_dns_domain = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for additiveVpcScopeDnsDomain. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAdditiveVpcScopeDnsDomainBytes() { + java.lang.Object ref = additiveVpcScopeDnsDomain_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + additiveVpcScopeDnsDomain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -547,6 +601,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterDnsDomain_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, clusterDnsDomain_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(additiveVpcScopeDnsDomain_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, additiveVpcScopeDnsDomain_); + } getUnknownFields().writeTo(output); } @@ -567,6 +624,10 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterDnsDomain_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, clusterDnsDomain_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(additiveVpcScopeDnsDomain_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(5, additiveVpcScopeDnsDomain_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -585,6 +646,7 @@ public boolean equals(final java.lang.Object obj) { if (clusterDns_ != other.clusterDns_) return false; if (clusterDnsScope_ != other.clusterDnsScope_) return false; if (!getClusterDnsDomain().equals(other.getClusterDnsDomain())) return false; + if (!getAdditiveVpcScopeDnsDomain().equals(other.getAdditiveVpcScopeDnsDomain())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -602,6 +664,8 @@ public int hashCode() { hash = (53 * hash) + clusterDnsScope_; hash = (37 * hash) + CLUSTER_DNS_DOMAIN_FIELD_NUMBER; hash = (53 * hash) + getClusterDnsDomain().hashCode(); + hash = (37 * hash) + ADDITIVE_VPC_SCOPE_DNS_DOMAIN_FIELD_NUMBER; + hash = (53 * hash) + getAdditiveVpcScopeDnsDomain().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -743,6 +807,7 @@ public Builder clear() { clusterDns_ = 0; clusterDnsScope_ = 0; clusterDnsDomain_ = ""; + additiveVpcScopeDnsDomain_ = ""; return this; } @@ -787,6 +852,9 @@ private void buildPartial0(com.google.container.v1.DNSConfig result) { if (((from_bitField0_ & 0x00000004) != 0)) { result.clusterDnsDomain_ = clusterDnsDomain_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.additiveVpcScopeDnsDomain_ = additiveVpcScopeDnsDomain_; + } } @java.lang.Override @@ -845,6 +913,11 @@ public Builder mergeFrom(com.google.container.v1.DNSConfig other) { bitField0_ |= 0x00000004; onChanged(); } + if (!other.getAdditiveVpcScopeDnsDomain().isEmpty()) { + additiveVpcScopeDnsDomain_ = other.additiveVpcScopeDnsDomain_; + bitField0_ |= 0x00000008; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -889,6 +962,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 42: + { + additiveVpcScopeDnsDomain_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1194,6 +1273,117 @@ public Builder setClusterDnsDomainBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object additiveVpcScopeDnsDomain_ = ""; + /** + * + * + *
+     * Optional. The domain used in Additive VPC scope.
+     * 
+ * + * string additive_vpc_scope_dns_domain = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The additiveVpcScopeDnsDomain. + */ + public java.lang.String getAdditiveVpcScopeDnsDomain() { + java.lang.Object ref = additiveVpcScopeDnsDomain_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + additiveVpcScopeDnsDomain_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The domain used in Additive VPC scope.
+     * 
+ * + * string additive_vpc_scope_dns_domain = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for additiveVpcScopeDnsDomain. + */ + public com.google.protobuf.ByteString getAdditiveVpcScopeDnsDomainBytes() { + java.lang.Object ref = additiveVpcScopeDnsDomain_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + additiveVpcScopeDnsDomain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The domain used in Additive VPC scope.
+     * 
+ * + * string additive_vpc_scope_dns_domain = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The additiveVpcScopeDnsDomain to set. + * @return This builder for chaining. + */ + public Builder setAdditiveVpcScopeDnsDomain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + additiveVpcScopeDnsDomain_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The domain used in Additive VPC scope.
+     * 
+ * + * string additive_vpc_scope_dns_domain = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAdditiveVpcScopeDnsDomain() { + additiveVpcScopeDnsDomain_ = getDefaultInstance().getAdditiveVpcScopeDnsDomain(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The domain used in Additive VPC scope.
+     * 
+ * + * string additive_vpc_scope_dns_domain = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for additiveVpcScopeDnsDomain to set. + * @return This builder for chaining. + */ + public Builder setAdditiveVpcScopeDnsDomainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + additiveVpcScopeDnsDomain_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DNSConfigOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DNSConfigOrBuilder.java index 9a6ebcea6fb0..94b2c6bb3bc5 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DNSConfigOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DNSConfigOrBuilder.java @@ -98,4 +98,31 @@ public interface DNSConfigOrBuilder * @return The bytes for clusterDnsDomain. */ com.google.protobuf.ByteString getClusterDnsDomainBytes(); + + /** + * + * + *
+   * Optional. The domain used in Additive VPC scope.
+   * 
+ * + * string additive_vpc_scope_dns_domain = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The additiveVpcScopeDnsDomain. + */ + java.lang.String getAdditiveVpcScopeDnsDomain(); + /** + * + * + *
+   * Optional. The domain used in Additive VPC scope.
+   * 
+ * + * string additive_vpc_scope_dns_domain = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for additiveVpcScopeDnsDomain. + */ + com.google.protobuf.ByteString getAdditiveVpcScopeDnsDomainBytes(); } diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteClusterRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteClusterRequest.java index f1b1a2f1c10f..bc56f224a27c 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteClusterRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteClusterRequest.java @@ -82,7 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3029 + * google/container/v1/cluster_service.proto;l=3143 * @return The projectId. */ @java.lang.Override @@ -110,7 +110,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3029 + * google/container/v1/cluster_service.proto;l=3143 * @return The bytes for projectId. */ @java.lang.Override @@ -144,7 +144,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3035 + * google/container/v1/cluster_service.proto;l=3149 * @return The zone. */ @java.lang.Override @@ -173,7 +173,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3035 + * google/container/v1/cluster_service.proto;l=3149 * @return The bytes for zone. */ @java.lang.Override @@ -205,7 +205,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3039 + * google/container/v1/cluster_service.proto;l=3153 * @return The clusterId. */ @java.lang.Override @@ -232,7 +232,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3039 + * google/container/v1/cluster_service.proto;l=3153 * @return The bytes for clusterId. */ @java.lang.Override @@ -728,7 +728,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3029 + * google/container/v1/cluster_service.proto;l=3143 * @return The projectId. */ @java.lang.Deprecated @@ -755,7 +755,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3029 + * google/container/v1/cluster_service.proto;l=3143 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -782,7 +782,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3029 + * google/container/v1/cluster_service.proto;l=3143 * @param value The projectId to set. * @return This builder for chaining. */ @@ -808,7 +808,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3029 + * google/container/v1/cluster_service.proto;l=3143 * @return This builder for chaining. */ @java.lang.Deprecated @@ -830,7 +830,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3029 + * google/container/v1/cluster_service.proto;l=3143 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -860,7 +860,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3035 + * google/container/v1/cluster_service.proto;l=3149 * @return The zone. */ @java.lang.Deprecated @@ -888,7 +888,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3035 + * google/container/v1/cluster_service.proto;l=3149 * @return The bytes for zone. */ @java.lang.Deprecated @@ -916,7 +916,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3035 + * google/container/v1/cluster_service.proto;l=3149 * @param value The zone to set. * @return This builder for chaining. */ @@ -943,7 +943,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3035 + * google/container/v1/cluster_service.proto;l=3149 * @return This builder for chaining. */ @java.lang.Deprecated @@ -966,7 +966,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3035 + * google/container/v1/cluster_service.proto;l=3149 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -994,7 +994,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3039 + * google/container/v1/cluster_service.proto;l=3153 * @return The clusterId. */ @java.lang.Deprecated @@ -1020,7 +1020,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3039 + * google/container/v1/cluster_service.proto;l=3153 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1046,7 +1046,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3039 + * google/container/v1/cluster_service.proto;l=3153 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1071,7 +1071,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3039 + * google/container/v1/cluster_service.proto;l=3153 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1092,7 +1092,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3039 + * google/container/v1/cluster_service.proto;l=3153 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteClusterRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteClusterRequestOrBuilder.java index 2dced349c56a..d016db82ba1e 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteClusterRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteClusterRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface DeleteClusterRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3029 + * google/container/v1/cluster_service.proto;l=3143 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface DeleteClusterRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3029 + * google/container/v1/cluster_service.proto;l=3143 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface DeleteClusterRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3035 + * google/container/v1/cluster_service.proto;l=3149 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface DeleteClusterRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3035 + * google/container/v1/cluster_service.proto;l=3149 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface DeleteClusterRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3039 + * google/container/v1/cluster_service.proto;l=3153 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface DeleteClusterRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3039 + * google/container/v1/cluster_service.proto;l=3153 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteNodePoolRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteNodePoolRequest.java index 55bb07733b55..efaa21060966 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteNodePoolRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteNodePoolRequest.java @@ -83,7 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3231 + * google/container/v1/cluster_service.proto;l=3345 * @return The projectId. */ @java.lang.Override @@ -111,7 +111,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3231 + * google/container/v1/cluster_service.proto;l=3345 * @return The bytes for projectId. */ @java.lang.Override @@ -145,7 +145,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3237 + * google/container/v1/cluster_service.proto;l=3351 * @return The zone. */ @java.lang.Override @@ -174,7 +174,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3237 + * google/container/v1/cluster_service.proto;l=3351 * @return The bytes for zone. */ @java.lang.Override @@ -206,7 +206,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3241 + * google/container/v1/cluster_service.proto;l=3355 * @return The clusterId. */ @java.lang.Override @@ -233,7 +233,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3241 + * google/container/v1/cluster_service.proto;l=3355 * @return The bytes for clusterId. */ @java.lang.Override @@ -265,7 +265,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3245 + * google/container/v1/cluster_service.proto;l=3359 * @return The nodePoolId. */ @java.lang.Override @@ -292,7 +292,7 @@ public java.lang.String getNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3245 + * google/container/v1/cluster_service.proto;l=3359 * @return The bytes for nodePoolId. */ @java.lang.Override @@ -814,7 +814,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3231 + * google/container/v1/cluster_service.proto;l=3345 * @return The projectId. */ @java.lang.Deprecated @@ -841,7 +841,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3231 + * google/container/v1/cluster_service.proto;l=3345 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -868,7 +868,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3231 + * google/container/v1/cluster_service.proto;l=3345 * @param value The projectId to set. * @return This builder for chaining. */ @@ -894,7 +894,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3231 + * google/container/v1/cluster_service.proto;l=3345 * @return This builder for chaining. */ @java.lang.Deprecated @@ -916,7 +916,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3231 + * google/container/v1/cluster_service.proto;l=3345 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -946,7 +946,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3237 + * google/container/v1/cluster_service.proto;l=3351 * @return The zone. */ @java.lang.Deprecated @@ -974,7 +974,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3237 + * google/container/v1/cluster_service.proto;l=3351 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1002,7 +1002,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3237 + * google/container/v1/cluster_service.proto;l=3351 * @param value The zone to set. * @return This builder for chaining. */ @@ -1029,7 +1029,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3237 + * google/container/v1/cluster_service.proto;l=3351 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1052,7 +1052,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3237 + * google/container/v1/cluster_service.proto;l=3351 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1080,7 +1080,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3241 + * google/container/v1/cluster_service.proto;l=3355 * @return The clusterId. */ @java.lang.Deprecated @@ -1106,7 +1106,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3241 + * google/container/v1/cluster_service.proto;l=3355 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1132,7 +1132,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3241 + * google/container/v1/cluster_service.proto;l=3355 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1157,7 +1157,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3241 + * google/container/v1/cluster_service.proto;l=3355 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1178,7 +1178,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3241 + * google/container/v1/cluster_service.proto;l=3355 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ @@ -1206,7 +1206,7 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3245 + * google/container/v1/cluster_service.proto;l=3359 * @return The nodePoolId. */ @java.lang.Deprecated @@ -1232,7 +1232,7 @@ public java.lang.String getNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3245 + * google/container/v1/cluster_service.proto;l=3359 * @return The bytes for nodePoolId. */ @java.lang.Deprecated @@ -1258,7 +1258,7 @@ public com.google.protobuf.ByteString getNodePoolIdBytes() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3245 + * google/container/v1/cluster_service.proto;l=3359 * @param value The nodePoolId to set. * @return This builder for chaining. */ @@ -1283,7 +1283,7 @@ public Builder setNodePoolId(java.lang.String value) { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3245 + * google/container/v1/cluster_service.proto;l=3359 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1304,7 +1304,7 @@ public Builder clearNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3245 + * google/container/v1/cluster_service.proto;l=3359 * @param value The bytes for nodePoolId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteNodePoolRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteNodePoolRequestOrBuilder.java index 6682c2b6c7e9..e12c15178465 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteNodePoolRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/DeleteNodePoolRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface DeleteNodePoolRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3231 + * google/container/v1/cluster_service.proto;l=3345 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface DeleteNodePoolRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3231 + * google/container/v1/cluster_service.proto;l=3345 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface DeleteNodePoolRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3237 + * google/container/v1/cluster_service.proto;l=3351 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface DeleteNodePoolRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3237 + * google/container/v1/cluster_service.proto;l=3351 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface DeleteNodePoolRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3241 + * google/container/v1/cluster_service.proto;l=3355 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface DeleteNodePoolRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3241 + * google/container/v1/cluster_service.proto;l=3355 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -140,7 +140,7 @@ public interface DeleteNodePoolRequestOrBuilder * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3245 + * google/container/v1/cluster_service.proto;l=3359 * @return The nodePoolId. */ @java.lang.Deprecated @@ -156,7 +156,7 @@ public interface DeleteNodePoolRequestOrBuilder * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.DeleteNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3245 + * google/container/v1/cluster_service.proto;l=3359 * @return The bytes for nodePoolId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GPUSharingConfig.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GPUSharingConfig.java index fca2fa1ffcf5..75eda76df61c 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GPUSharingConfig.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GPUSharingConfig.java @@ -94,6 +94,16 @@ public enum GPUSharingStrategy implements com.google.protobuf.ProtocolMessageEnu * TIME_SHARING = 1; */ TIME_SHARING(1), + /** + * + * + *
+     * GPUs are shared between containers with NVIDIA MPS.
+     * 
+ * + * MPS = 2; + */ + MPS(2), UNRECOGNIZED(-1), ; @@ -117,6 +127,16 @@ public enum GPUSharingStrategy implements com.google.protobuf.ProtocolMessageEnu * TIME_SHARING = 1; */ public static final int TIME_SHARING_VALUE = 1; + /** + * + * + *
+     * GPUs are shared between containers with NVIDIA MPS.
+     * 
+ * + * MPS = 2; + */ + public static final int MPS_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -146,6 +166,8 @@ public static GPUSharingStrategy forNumber(int value) { return GPU_SHARING_STRATEGY_UNSPECIFIED; case 1: return TIME_SHARING; + case 2: + return MPS; default: return null; } diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetClusterRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetClusterRequest.java index 78ad580a7ebe..a427ad30c558 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetClusterRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetClusterRequest.java @@ -82,7 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2609 + * google/container/v1/cluster_service.proto;l=2713 * @return The projectId. */ @java.lang.Override @@ -110,7 +110,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2609 + * google/container/v1/cluster_service.proto;l=2713 * @return The bytes for projectId. */ @java.lang.Override @@ -144,7 +144,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2615 + * google/container/v1/cluster_service.proto;l=2719 * @return The zone. */ @java.lang.Override @@ -173,7 +173,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2615 + * google/container/v1/cluster_service.proto;l=2719 * @return The bytes for zone. */ @java.lang.Override @@ -205,7 +205,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2619 + * google/container/v1/cluster_service.proto;l=2723 * @return The clusterId. */ @java.lang.Override @@ -232,7 +232,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2619 + * google/container/v1/cluster_service.proto;l=2723 * @return The bytes for clusterId. */ @java.lang.Override @@ -728,7 +728,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2609 + * google/container/v1/cluster_service.proto;l=2713 * @return The projectId. */ @java.lang.Deprecated @@ -755,7 +755,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2609 + * google/container/v1/cluster_service.proto;l=2713 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -782,7 +782,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2609 + * google/container/v1/cluster_service.proto;l=2713 * @param value The projectId to set. * @return This builder for chaining. */ @@ -808,7 +808,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2609 + * google/container/v1/cluster_service.proto;l=2713 * @return This builder for chaining. */ @java.lang.Deprecated @@ -830,7 +830,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2609 + * google/container/v1/cluster_service.proto;l=2713 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -860,7 +860,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2615 + * google/container/v1/cluster_service.proto;l=2719 * @return The zone. */ @java.lang.Deprecated @@ -888,7 +888,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2615 + * google/container/v1/cluster_service.proto;l=2719 * @return The bytes for zone. */ @java.lang.Deprecated @@ -916,7 +916,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2615 + * google/container/v1/cluster_service.proto;l=2719 * @param value The zone to set. * @return This builder for chaining. */ @@ -943,7 +943,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2615 + * google/container/v1/cluster_service.proto;l=2719 * @return This builder for chaining. */ @java.lang.Deprecated @@ -966,7 +966,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2615 + * google/container/v1/cluster_service.proto;l=2719 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -994,7 +994,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2619 + * google/container/v1/cluster_service.proto;l=2723 * @return The clusterId. */ @java.lang.Deprecated @@ -1020,7 +1020,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2619 + * google/container/v1/cluster_service.proto;l=2723 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1046,7 +1046,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2619 + * google/container/v1/cluster_service.proto;l=2723 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1071,7 +1071,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2619 + * google/container/v1/cluster_service.proto;l=2723 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1092,7 +1092,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2619 + * google/container/v1/cluster_service.proto;l=2723 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetClusterRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetClusterRequestOrBuilder.java index 6273cfb0d228..940f84716e73 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetClusterRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetClusterRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface GetClusterRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2609 + * google/container/v1/cluster_service.proto;l=2713 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface GetClusterRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2609 + * google/container/v1/cluster_service.proto;l=2713 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface GetClusterRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2615 + * google/container/v1/cluster_service.proto;l=2719 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface GetClusterRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2615 + * google/container/v1/cluster_service.proto;l=2719 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface GetClusterRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2619 + * google/container/v1/cluster_service.proto;l=2723 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface GetClusterRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2619 + * google/container/v1/cluster_service.proto;l=2723 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetNodePoolRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetNodePoolRequest.java index 910708e12a9f..69020d1a28ba 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetNodePoolRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetNodePoolRequest.java @@ -83,7 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3280 + * google/container/v1/cluster_service.proto;l=3394 * @return The projectId. */ @java.lang.Override @@ -111,7 +111,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3280 + * google/container/v1/cluster_service.proto;l=3394 * @return The bytes for projectId. */ @java.lang.Override @@ -145,7 +145,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3286 + * google/container/v1/cluster_service.proto;l=3400 * @return The zone. */ @java.lang.Override @@ -174,7 +174,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3286 + * google/container/v1/cluster_service.proto;l=3400 * @return The bytes for zone. */ @java.lang.Override @@ -206,7 +206,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3290 + * google/container/v1/cluster_service.proto;l=3404 * @return The clusterId. */ @java.lang.Override @@ -233,7 +233,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3290 + * google/container/v1/cluster_service.proto;l=3404 * @return The bytes for clusterId. */ @java.lang.Override @@ -265,7 +265,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3294 + * google/container/v1/cluster_service.proto;l=3408 * @return The nodePoolId. */ @java.lang.Override @@ -292,7 +292,7 @@ public java.lang.String getNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3294 + * google/container/v1/cluster_service.proto;l=3408 * @return The bytes for nodePoolId. */ @java.lang.Override @@ -814,7 +814,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3280 + * google/container/v1/cluster_service.proto;l=3394 * @return The projectId. */ @java.lang.Deprecated @@ -841,7 +841,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3280 + * google/container/v1/cluster_service.proto;l=3394 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -868,7 +868,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3280 + * google/container/v1/cluster_service.proto;l=3394 * @param value The projectId to set. * @return This builder for chaining. */ @@ -894,7 +894,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3280 + * google/container/v1/cluster_service.proto;l=3394 * @return This builder for chaining. */ @java.lang.Deprecated @@ -916,7 +916,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3280 + * google/container/v1/cluster_service.proto;l=3394 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -946,7 +946,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3286 + * google/container/v1/cluster_service.proto;l=3400 * @return The zone. */ @java.lang.Deprecated @@ -974,7 +974,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3286 + * google/container/v1/cluster_service.proto;l=3400 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1002,7 +1002,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3286 + * google/container/v1/cluster_service.proto;l=3400 * @param value The zone to set. * @return This builder for chaining. */ @@ -1029,7 +1029,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3286 + * google/container/v1/cluster_service.proto;l=3400 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1052,7 +1052,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3286 + * google/container/v1/cluster_service.proto;l=3400 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1080,7 +1080,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3290 + * google/container/v1/cluster_service.proto;l=3404 * @return The clusterId. */ @java.lang.Deprecated @@ -1106,7 +1106,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3290 + * google/container/v1/cluster_service.proto;l=3404 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1132,7 +1132,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3290 + * google/container/v1/cluster_service.proto;l=3404 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1157,7 +1157,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3290 + * google/container/v1/cluster_service.proto;l=3404 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1178,7 +1178,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3290 + * google/container/v1/cluster_service.proto;l=3404 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ @@ -1206,7 +1206,7 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3294 + * google/container/v1/cluster_service.proto;l=3408 * @return The nodePoolId. */ @java.lang.Deprecated @@ -1232,7 +1232,7 @@ public java.lang.String getNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3294 + * google/container/v1/cluster_service.proto;l=3408 * @return The bytes for nodePoolId. */ @java.lang.Deprecated @@ -1258,7 +1258,7 @@ public com.google.protobuf.ByteString getNodePoolIdBytes() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3294 + * google/container/v1/cluster_service.proto;l=3408 * @param value The nodePoolId to set. * @return This builder for chaining. */ @@ -1283,7 +1283,7 @@ public Builder setNodePoolId(java.lang.String value) { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3294 + * google/container/v1/cluster_service.proto;l=3408 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1304,7 +1304,7 @@ public Builder clearNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3294 + * google/container/v1/cluster_service.proto;l=3408 * @param value The bytes for nodePoolId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetNodePoolRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetNodePoolRequestOrBuilder.java index ec08619e1cb6..033d4ff5ea1b 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetNodePoolRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetNodePoolRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface GetNodePoolRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3280 + * google/container/v1/cluster_service.proto;l=3394 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface GetNodePoolRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3280 + * google/container/v1/cluster_service.proto;l=3394 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface GetNodePoolRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3286 + * google/container/v1/cluster_service.proto;l=3400 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface GetNodePoolRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3286 + * google/container/v1/cluster_service.proto;l=3400 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface GetNodePoolRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3290 + * google/container/v1/cluster_service.proto;l=3404 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface GetNodePoolRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3290 + * google/container/v1/cluster_service.proto;l=3404 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -140,7 +140,7 @@ public interface GetNodePoolRequestOrBuilder * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3294 + * google/container/v1/cluster_service.proto;l=3408 * @return The nodePoolId. */ @java.lang.Deprecated @@ -156,7 +156,7 @@ public interface GetNodePoolRequestOrBuilder * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.GetNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3294 + * google/container/v1/cluster_service.proto;l=3408 * @return The bytes for nodePoolId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetOperationRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetOperationRequest.java index 437a504366c2..9fe009188101 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetOperationRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetOperationRequest.java @@ -82,7 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3081 + * google/container/v1/cluster_service.proto;l=3195 * @return The projectId. */ @java.lang.Override @@ -110,7 +110,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3081 + * google/container/v1/cluster_service.proto;l=3195 * @return The bytes for projectId. */ @java.lang.Override @@ -144,7 +144,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3087 + * google/container/v1/cluster_service.proto;l=3201 * @return The zone. */ @java.lang.Override @@ -173,7 +173,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3087 + * google/container/v1/cluster_service.proto;l=3201 * @return The bytes for zone. */ @java.lang.Override @@ -205,7 +205,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3091 + * google/container/v1/cluster_service.proto;l=3205 * @return The operationId. */ @java.lang.Override @@ -232,7 +232,7 @@ public java.lang.String getOperationId() { * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3091 + * google/container/v1/cluster_service.proto;l=3205 * @return The bytes for operationId. */ @java.lang.Override @@ -728,7 +728,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3081 + * google/container/v1/cluster_service.proto;l=3195 * @return The projectId. */ @java.lang.Deprecated @@ -755,7 +755,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3081 + * google/container/v1/cluster_service.proto;l=3195 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -782,7 +782,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3081 + * google/container/v1/cluster_service.proto;l=3195 * @param value The projectId to set. * @return This builder for chaining. */ @@ -808,7 +808,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3081 + * google/container/v1/cluster_service.proto;l=3195 * @return This builder for chaining. */ @java.lang.Deprecated @@ -830,7 +830,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3081 + * google/container/v1/cluster_service.proto;l=3195 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -860,7 +860,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3087 + * google/container/v1/cluster_service.proto;l=3201 * @return The zone. */ @java.lang.Deprecated @@ -888,7 +888,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3087 + * google/container/v1/cluster_service.proto;l=3201 * @return The bytes for zone. */ @java.lang.Deprecated @@ -916,7 +916,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3087 + * google/container/v1/cluster_service.proto;l=3201 * @param value The zone to set. * @return This builder for chaining. */ @@ -943,7 +943,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3087 + * google/container/v1/cluster_service.proto;l=3201 * @return This builder for chaining. */ @java.lang.Deprecated @@ -966,7 +966,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3087 + * google/container/v1/cluster_service.proto;l=3201 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -994,7 +994,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3091 + * google/container/v1/cluster_service.proto;l=3205 * @return The operationId. */ @java.lang.Deprecated @@ -1020,7 +1020,7 @@ public java.lang.String getOperationId() { * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3091 + * google/container/v1/cluster_service.proto;l=3205 * @return The bytes for operationId. */ @java.lang.Deprecated @@ -1046,7 +1046,7 @@ public com.google.protobuf.ByteString getOperationIdBytes() { * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3091 + * google/container/v1/cluster_service.proto;l=3205 * @param value The operationId to set. * @return This builder for chaining. */ @@ -1071,7 +1071,7 @@ public Builder setOperationId(java.lang.String value) { * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3091 + * google/container/v1/cluster_service.proto;l=3205 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1092,7 +1092,7 @@ public Builder clearOperationId() { * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3091 + * google/container/v1/cluster_service.proto;l=3205 * @param value The bytes for operationId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetOperationRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetOperationRequestOrBuilder.java index b206e3bef86a..4d0100bd19fc 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetOperationRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetOperationRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface GetOperationRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3081 + * google/container/v1/cluster_service.proto;l=3195 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface GetOperationRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3081 + * google/container/v1/cluster_service.proto;l=3195 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface GetOperationRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3087 + * google/container/v1/cluster_service.proto;l=3201 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface GetOperationRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3087 + * google/container/v1/cluster_service.proto;l=3201 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface GetOperationRequestOrBuilder * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3091 + * google/container/v1/cluster_service.proto;l=3205 * @return The operationId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface GetOperationRequestOrBuilder * string operation_id = 3 [deprecated = true]; * * @deprecated google.container.v1.GetOperationRequest.operation_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3091 + * google/container/v1/cluster_service.proto;l=3205 * @return The bytes for operationId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetServerConfigRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetServerConfigRequest.java index 16525cac029d..06cb5914effb 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetServerConfigRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetServerConfigRequest.java @@ -81,7 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3154 + * google/container/v1/cluster_service.proto;l=3268 * @return The projectId. */ @java.lang.Override @@ -109,7 +109,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3154 + * google/container/v1/cluster_service.proto;l=3268 * @return The bytes for projectId. */ @java.lang.Override @@ -143,7 +143,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3160 + * google/container/v1/cluster_service.proto;l=3274 * @return The zone. */ @java.lang.Override @@ -172,7 +172,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3160 + * google/container/v1/cluster_service.proto;l=3274 * @return The bytes for zone. */ @java.lang.Override @@ -644,7 +644,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3154 + * google/container/v1/cluster_service.proto;l=3268 * @return The projectId. */ @java.lang.Deprecated @@ -671,7 +671,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3154 + * google/container/v1/cluster_service.proto;l=3268 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -698,7 +698,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3154 + * google/container/v1/cluster_service.proto;l=3268 * @param value The projectId to set. * @return This builder for chaining. */ @@ -724,7 +724,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3154 + * google/container/v1/cluster_service.proto;l=3268 * @return This builder for chaining. */ @java.lang.Deprecated @@ -746,7 +746,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3154 + * google/container/v1/cluster_service.proto;l=3268 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -776,7 +776,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3160 + * google/container/v1/cluster_service.proto;l=3274 * @return The zone. */ @java.lang.Deprecated @@ -804,7 +804,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3160 + * google/container/v1/cluster_service.proto;l=3274 * @return The bytes for zone. */ @java.lang.Deprecated @@ -832,7 +832,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3160 + * google/container/v1/cluster_service.proto;l=3274 * @param value The zone to set. * @return This builder for chaining. */ @@ -859,7 +859,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3160 + * google/container/v1/cluster_service.proto;l=3274 * @return This builder for chaining. */ @java.lang.Deprecated @@ -882,7 +882,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3160 + * google/container/v1/cluster_service.proto;l=3274 * @param value The bytes for zone to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetServerConfigRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetServerConfigRequestOrBuilder.java index e7888354c66a..23d8a037729e 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetServerConfigRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/GetServerConfigRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface GetServerConfigRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3154 + * google/container/v1/cluster_service.proto;l=3268 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface GetServerConfigRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3154 + * google/container/v1/cluster_service.proto;l=3268 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface GetServerConfigRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3160 + * google/container/v1/cluster_service.proto;l=3274 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface GetServerConfigRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.GetServerConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3160 + * google/container/v1/cluster_service.proto;l=3274 * @return The bytes for zone. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/IPAllocationPolicy.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/IPAllocationPolicy.java index 1527224c2270..b13e71171148 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/IPAllocationPolicy.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/IPAllocationPolicy.java @@ -187,7 +187,7 @@ public com.google.protobuf.ByteString getSubnetworkNameBytes() { * string cluster_ipv4_cidr = 4 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.cluster_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1495 + * google/container/v1/cluster_service.proto;l=1562 * @return The clusterIpv4Cidr. */ @java.lang.Override @@ -213,7 +213,7 @@ public java.lang.String getClusterIpv4Cidr() { * string cluster_ipv4_cidr = 4 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.cluster_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1495 + * google/container/v1/cluster_service.proto;l=1562 * @return The bytes for clusterIpv4Cidr. */ @java.lang.Override @@ -244,7 +244,7 @@ public com.google.protobuf.ByteString getClusterIpv4CidrBytes() { * string node_ipv4_cidr = 5 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.node_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1498 + * google/container/v1/cluster_service.proto;l=1565 * @return The nodeIpv4Cidr. */ @java.lang.Override @@ -270,7 +270,7 @@ public java.lang.String getNodeIpv4Cidr() { * string node_ipv4_cidr = 5 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.node_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1498 + * google/container/v1/cluster_service.proto;l=1565 * @return The bytes for nodeIpv4Cidr. */ @java.lang.Override @@ -301,7 +301,7 @@ public com.google.protobuf.ByteString getNodeIpv4CidrBytes() { * string services_ipv4_cidr = 6 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.services_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1501 + * google/container/v1/cluster_service.proto;l=1568 * @return The servicesIpv4Cidr. */ @java.lang.Override @@ -327,7 +327,7 @@ public java.lang.String getServicesIpv4Cidr() { * string services_ipv4_cidr = 6 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.services_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1501 + * google/container/v1/cluster_service.proto;l=1568 * @return The bytes for servicesIpv4Cidr. */ @java.lang.Override @@ -2241,7 +2241,7 @@ public Builder setSubnetworkNameBytes(com.google.protobuf.ByteString value) { * string cluster_ipv4_cidr = 4 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.cluster_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1495 + * google/container/v1/cluster_service.proto;l=1562 * @return The clusterIpv4Cidr. */ @java.lang.Deprecated @@ -2266,7 +2266,7 @@ public java.lang.String getClusterIpv4Cidr() { * string cluster_ipv4_cidr = 4 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.cluster_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1495 + * google/container/v1/cluster_service.proto;l=1562 * @return The bytes for clusterIpv4Cidr. */ @java.lang.Deprecated @@ -2291,7 +2291,7 @@ public com.google.protobuf.ByteString getClusterIpv4CidrBytes() { * string cluster_ipv4_cidr = 4 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.cluster_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1495 + * google/container/v1/cluster_service.proto;l=1562 * @param value The clusterIpv4Cidr to set. * @return This builder for chaining. */ @@ -2315,7 +2315,7 @@ public Builder setClusterIpv4Cidr(java.lang.String value) { * string cluster_ipv4_cidr = 4 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.cluster_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1495 + * google/container/v1/cluster_service.proto;l=1562 * @return This builder for chaining. */ @java.lang.Deprecated @@ -2335,7 +2335,7 @@ public Builder clearClusterIpv4Cidr() { * string cluster_ipv4_cidr = 4 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.cluster_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1495 + * google/container/v1/cluster_service.proto;l=1562 * @param value The bytes for clusterIpv4Cidr to set. * @return This builder for chaining. */ @@ -2362,7 +2362,7 @@ public Builder setClusterIpv4CidrBytes(com.google.protobuf.ByteString value) { * string node_ipv4_cidr = 5 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.node_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1498 + * google/container/v1/cluster_service.proto;l=1565 * @return The nodeIpv4Cidr. */ @java.lang.Deprecated @@ -2387,7 +2387,7 @@ public java.lang.String getNodeIpv4Cidr() { * string node_ipv4_cidr = 5 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.node_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1498 + * google/container/v1/cluster_service.proto;l=1565 * @return The bytes for nodeIpv4Cidr. */ @java.lang.Deprecated @@ -2412,7 +2412,7 @@ public com.google.protobuf.ByteString getNodeIpv4CidrBytes() { * string node_ipv4_cidr = 5 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.node_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1498 + * google/container/v1/cluster_service.proto;l=1565 * @param value The nodeIpv4Cidr to set. * @return This builder for chaining. */ @@ -2436,7 +2436,7 @@ public Builder setNodeIpv4Cidr(java.lang.String value) { * string node_ipv4_cidr = 5 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.node_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1498 + * google/container/v1/cluster_service.proto;l=1565 * @return This builder for chaining. */ @java.lang.Deprecated @@ -2456,7 +2456,7 @@ public Builder clearNodeIpv4Cidr() { * string node_ipv4_cidr = 5 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.node_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1498 + * google/container/v1/cluster_service.proto;l=1565 * @param value The bytes for nodeIpv4Cidr to set. * @return This builder for chaining. */ @@ -2483,7 +2483,7 @@ public Builder setNodeIpv4CidrBytes(com.google.protobuf.ByteString value) { * string services_ipv4_cidr = 6 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.services_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1501 + * google/container/v1/cluster_service.proto;l=1568 * @return The servicesIpv4Cidr. */ @java.lang.Deprecated @@ -2508,7 +2508,7 @@ public java.lang.String getServicesIpv4Cidr() { * string services_ipv4_cidr = 6 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.services_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1501 + * google/container/v1/cluster_service.proto;l=1568 * @return The bytes for servicesIpv4Cidr. */ @java.lang.Deprecated @@ -2533,7 +2533,7 @@ public com.google.protobuf.ByteString getServicesIpv4CidrBytes() { * string services_ipv4_cidr = 6 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.services_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1501 + * google/container/v1/cluster_service.proto;l=1568 * @param value The servicesIpv4Cidr to set. * @return This builder for chaining. */ @@ -2557,7 +2557,7 @@ public Builder setServicesIpv4Cidr(java.lang.String value) { * string services_ipv4_cidr = 6 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.services_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1501 + * google/container/v1/cluster_service.proto;l=1568 * @return This builder for chaining. */ @java.lang.Deprecated @@ -2577,7 +2577,7 @@ public Builder clearServicesIpv4Cidr() { * string services_ipv4_cidr = 6 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.services_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1501 + * google/container/v1/cluster_service.proto;l=1568 * @param value The bytes for servicesIpv4Cidr to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/IPAllocationPolicyOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/IPAllocationPolicyOrBuilder.java index 4e6bd9798d62..86f6def1eeb8 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/IPAllocationPolicyOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/IPAllocationPolicyOrBuilder.java @@ -94,7 +94,7 @@ public interface IPAllocationPolicyOrBuilder * string cluster_ipv4_cidr = 4 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.cluster_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1495 + * google/container/v1/cluster_service.proto;l=1562 * @return The clusterIpv4Cidr. */ @java.lang.Deprecated @@ -109,7 +109,7 @@ public interface IPAllocationPolicyOrBuilder * string cluster_ipv4_cidr = 4 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.cluster_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1495 + * google/container/v1/cluster_service.proto;l=1562 * @return The bytes for clusterIpv4Cidr. */ @java.lang.Deprecated @@ -125,7 +125,7 @@ public interface IPAllocationPolicyOrBuilder * string node_ipv4_cidr = 5 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.node_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1498 + * google/container/v1/cluster_service.proto;l=1565 * @return The nodeIpv4Cidr. */ @java.lang.Deprecated @@ -140,7 +140,7 @@ public interface IPAllocationPolicyOrBuilder * string node_ipv4_cidr = 5 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.node_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1498 + * google/container/v1/cluster_service.proto;l=1565 * @return The bytes for nodeIpv4Cidr. */ @java.lang.Deprecated @@ -156,7 +156,7 @@ public interface IPAllocationPolicyOrBuilder * string services_ipv4_cidr = 6 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.services_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1501 + * google/container/v1/cluster_service.proto;l=1568 * @return The servicesIpv4Cidr. */ @java.lang.Deprecated @@ -171,7 +171,7 @@ public interface IPAllocationPolicyOrBuilder * string services_ipv4_cidr = 6 [deprecated = true]; * * @deprecated google.container.v1.IPAllocationPolicy.services_ipv4_cidr is deprecated. See - * google/container/v1/cluster_service.proto;l=1501 + * google/container/v1/cluster_service.proto;l=1568 * @return The bytes for servicesIpv4Cidr. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/LinuxNodeConfig.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/LinuxNodeConfig.java index 9bf40d6ad955..1f27c378ebca 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/LinuxNodeConfig.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/LinuxNodeConfig.java @@ -238,6 +238,752 @@ private CgroupMode(int value) { // @@protoc_insertion_point(enum_scope:google.container.v1.LinuxNodeConfig.CgroupMode) } + public interface HugepagesConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.container.v1.LinuxNodeConfig.HugepagesConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Amount of 2M hugepages
+     * 
+ * + * optional int32 hugepage_size2m = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the hugepageSize2m field is set. + */ + boolean hasHugepageSize2M(); + /** + * + * + *
+     * Optional. Amount of 2M hugepages
+     * 
+ * + * optional int32 hugepage_size2m = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hugepageSize2m. + */ + int getHugepageSize2M(); + + /** + * + * + *
+     * Optional. Amount of 1G hugepages
+     * 
+ * + * optional int32 hugepage_size1g = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the hugepageSize1g field is set. + */ + boolean hasHugepageSize1G(); + /** + * + * + *
+     * Optional. Amount of 1G hugepages
+     * 
+ * + * optional int32 hugepage_size1g = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hugepageSize1g. + */ + int getHugepageSize1G(); + } + /** + * + * + *
+   * Hugepages amount in both 2m and 1g size
+   * 
+ * + * Protobuf type {@code google.container.v1.LinuxNodeConfig.HugepagesConfig} + */ + public static final class HugepagesConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.container.v1.LinuxNodeConfig.HugepagesConfig) + HugepagesConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use HugepagesConfig.newBuilder() to construct. + private HugepagesConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HugepagesConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HugepagesConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_LinuxNodeConfig_HugepagesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_LinuxNodeConfig_HugepagesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.container.v1.LinuxNodeConfig.HugepagesConfig.class, + com.google.container.v1.LinuxNodeConfig.HugepagesConfig.Builder.class); + } + + private int bitField0_; + public static final int HUGEPAGE_SIZE2M_FIELD_NUMBER = 1; + private int hugepageSize2M_ = 0; + /** + * + * + *
+     * Optional. Amount of 2M hugepages
+     * 
+ * + * optional int32 hugepage_size2m = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the hugepageSize2m field is set. + */ + @java.lang.Override + public boolean hasHugepageSize2M() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. Amount of 2M hugepages
+     * 
+ * + * optional int32 hugepage_size2m = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hugepageSize2m. + */ + @java.lang.Override + public int getHugepageSize2M() { + return hugepageSize2M_; + } + + public static final int HUGEPAGE_SIZE1G_FIELD_NUMBER = 2; + private int hugepageSize1G_ = 0; + /** + * + * + *
+     * Optional. Amount of 1G hugepages
+     * 
+ * + * optional int32 hugepage_size1g = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the hugepageSize1g field is set. + */ + @java.lang.Override + public boolean hasHugepageSize1G() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. Amount of 1G hugepages
+     * 
+ * + * optional int32 hugepage_size1g = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hugepageSize1g. + */ + @java.lang.Override + public int getHugepageSize1G() { + return hugepageSize1G_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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, hugepageSize2M_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(2, hugepageSize1G_); + } + 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, hugepageSize2M_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, hugepageSize1G_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.container.v1.LinuxNodeConfig.HugepagesConfig)) { + return super.equals(obj); + } + com.google.container.v1.LinuxNodeConfig.HugepagesConfig other = + (com.google.container.v1.LinuxNodeConfig.HugepagesConfig) obj; + + if (hasHugepageSize2M() != other.hasHugepageSize2M()) return false; + if (hasHugepageSize2M()) { + if (getHugepageSize2M() != other.getHugepageSize2M()) return false; + } + if (hasHugepageSize1G() != other.hasHugepageSize1G()) return false; + if (hasHugepageSize1G()) { + if (getHugepageSize1G() != other.getHugepageSize1G()) 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 (hasHugepageSize2M()) { + hash = (37 * hash) + HUGEPAGE_SIZE2M_FIELD_NUMBER; + hash = (53 * hash) + getHugepageSize2M(); + } + if (hasHugepageSize1G()) { + hash = (37 * hash) + HUGEPAGE_SIZE1G_FIELD_NUMBER; + hash = (53 * hash) + getHugepageSize1G(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.container.v1.LinuxNodeConfig.HugepagesConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.container.v1.LinuxNodeConfig.HugepagesConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.container.v1.LinuxNodeConfig.HugepagesConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.container.v1.LinuxNodeConfig.HugepagesConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.container.v1.LinuxNodeConfig.HugepagesConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.container.v1.LinuxNodeConfig.HugepagesConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.container.v1.LinuxNodeConfig.HugepagesConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.container.v1.LinuxNodeConfig.HugepagesConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.container.v1.LinuxNodeConfig.HugepagesConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.container.v1.LinuxNodeConfig.HugepagesConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.container.v1.LinuxNodeConfig.HugepagesConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.container.v1.LinuxNodeConfig.HugepagesConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.container.v1.LinuxNodeConfig.HugepagesConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Hugepages amount in both 2m and 1g size
+     * 
+ * + * Protobuf type {@code google.container.v1.LinuxNodeConfig.HugepagesConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.container.v1.LinuxNodeConfig.HugepagesConfig) + com.google.container.v1.LinuxNodeConfig.HugepagesConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_LinuxNodeConfig_HugepagesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_LinuxNodeConfig_HugepagesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.container.v1.LinuxNodeConfig.HugepagesConfig.class, + com.google.container.v1.LinuxNodeConfig.HugepagesConfig.Builder.class); + } + + // Construct using com.google.container.v1.LinuxNodeConfig.HugepagesConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + hugepageSize2M_ = 0; + hugepageSize1G_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.container.v1.ClusterServiceProto + .internal_static_google_container_v1_LinuxNodeConfig_HugepagesConfig_descriptor; + } + + @java.lang.Override + public com.google.container.v1.LinuxNodeConfig.HugepagesConfig getDefaultInstanceForType() { + return com.google.container.v1.LinuxNodeConfig.HugepagesConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.container.v1.LinuxNodeConfig.HugepagesConfig build() { + com.google.container.v1.LinuxNodeConfig.HugepagesConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.container.v1.LinuxNodeConfig.HugepagesConfig buildPartial() { + com.google.container.v1.LinuxNodeConfig.HugepagesConfig result = + new com.google.container.v1.LinuxNodeConfig.HugepagesConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.container.v1.LinuxNodeConfig.HugepagesConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.hugepageSize2M_ = hugepageSize2M_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.hugepageSize1G_ = hugepageSize1G_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.container.v1.LinuxNodeConfig.HugepagesConfig) { + return mergeFrom((com.google.container.v1.LinuxNodeConfig.HugepagesConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.container.v1.LinuxNodeConfig.HugepagesConfig other) { + if (other == com.google.container.v1.LinuxNodeConfig.HugepagesConfig.getDefaultInstance()) + return this; + if (other.hasHugepageSize2M()) { + setHugepageSize2M(other.getHugepageSize2M()); + } + if (other.hasHugepageSize1G()) { + setHugepageSize1G(other.getHugepageSize1G()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + hugepageSize2M_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + hugepageSize1G_ = 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 hugepageSize2M_; + /** + * + * + *
+       * Optional. Amount of 2M hugepages
+       * 
+ * + * optional int32 hugepage_size2m = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the hugepageSize2m field is set. + */ + @java.lang.Override + public boolean hasHugepageSize2M() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Optional. Amount of 2M hugepages
+       * 
+ * + * optional int32 hugepage_size2m = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hugepageSize2m. + */ + @java.lang.Override + public int getHugepageSize2M() { + return hugepageSize2M_; + } + /** + * + * + *
+       * Optional. Amount of 2M hugepages
+       * 
+ * + * optional int32 hugepage_size2m = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The hugepageSize2m to set. + * @return This builder for chaining. + */ + public Builder setHugepageSize2M(int value) { + + hugepageSize2M_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Amount of 2M hugepages
+       * 
+ * + * optional int32 hugepage_size2m = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearHugepageSize2M() { + bitField0_ = (bitField0_ & ~0x00000001); + hugepageSize2M_ = 0; + onChanged(); + return this; + } + + private int hugepageSize1G_; + /** + * + * + *
+       * Optional. Amount of 1G hugepages
+       * 
+ * + * optional int32 hugepage_size1g = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the hugepageSize1g field is set. + */ + @java.lang.Override + public boolean hasHugepageSize1G() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Optional. Amount of 1G hugepages
+       * 
+ * + * optional int32 hugepage_size1g = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hugepageSize1g. + */ + @java.lang.Override + public int getHugepageSize1G() { + return hugepageSize1G_; + } + /** + * + * + *
+       * Optional. Amount of 1G hugepages
+       * 
+ * + * optional int32 hugepage_size1g = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The hugepageSize1g to set. + * @return This builder for chaining. + */ + public Builder setHugepageSize1G(int value) { + + hugepageSize1G_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Amount of 1G hugepages
+       * 
+ * + * optional int32 hugepage_size1g = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearHugepageSize1G() { + bitField0_ = (bitField0_ & ~0x00000002); + hugepageSize1G_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.container.v1.LinuxNodeConfig.HugepagesConfig) + } + + // @@protoc_insertion_point(class_scope:google.container.v1.LinuxNodeConfig.HugepagesConfig) + private static final com.google.container.v1.LinuxNodeConfig.HugepagesConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.container.v1.LinuxNodeConfig.HugepagesConfig(); + } + + public static com.google.container.v1.LinuxNodeConfig.HugepagesConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HugepagesConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.container.v1.LinuxNodeConfig.HugepagesConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; public static final int SYSCTLS_FIELD_NUMBER = 1; private static final class SysctlsDefaultEntryHolder { @@ -437,6 +1183,62 @@ public com.google.container.v1.LinuxNodeConfig.CgroupMode getCgroupMode() { : result; } + public static final int HUGEPAGES_FIELD_NUMBER = 3; + private com.google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages_; + /** + * + * + *
+   * Optional. Amounts for 2M and 1G hugepages
+   * 
+ * + * + * optional .google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the hugepages field is set. + */ + @java.lang.Override + public boolean hasHugepages() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Amounts for 2M and 1G hugepages
+   * 
+ * + * + * optional .google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The hugepages. + */ + @java.lang.Override + public com.google.container.v1.LinuxNodeConfig.HugepagesConfig getHugepages() { + return hugepages_ == null + ? com.google.container.v1.LinuxNodeConfig.HugepagesConfig.getDefaultInstance() + : hugepages_; + } + /** + * + * + *
+   * Optional. Amounts for 2M and 1G hugepages
+   * 
+ * + * + * optional .google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.container.v1.LinuxNodeConfig.HugepagesConfigOrBuilder getHugepagesOrBuilder() { + return hugepages_ == null + ? com.google.container.v1.LinuxNodeConfig.HugepagesConfig.getDefaultInstance() + : hugepages_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -457,6 +1259,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io != com.google.container.v1.LinuxNodeConfig.CgroupMode.CGROUP_MODE_UNSPECIFIED.getNumber()) { output.writeEnum(2, cgroupMode_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getHugepages()); + } getUnknownFields().writeTo(output); } @@ -480,6 +1285,9 @@ public int getSerializedSize() { != com.google.container.v1.LinuxNodeConfig.CgroupMode.CGROUP_MODE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, cgroupMode_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getHugepages()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -497,6 +1305,10 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetSysctls().equals(other.internalGetSysctls())) return false; if (cgroupMode_ != other.cgroupMode_) return false; + if (hasHugepages() != other.hasHugepages()) return false; + if (hasHugepages()) { + if (!getHugepages().equals(other.getHugepages())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -514,6 +1326,10 @@ public int hashCode() { } hash = (37 * hash) + CGROUP_MODE_FIELD_NUMBER; hash = (53 * hash) + cgroupMode_; + if (hasHugepages()) { + hash = (37 * hash) + HUGEPAGES_FIELD_NUMBER; + hash = (53 * hash) + getHugepages().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -665,10 +1481,19 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } // Construct using com.google.container.v1.LinuxNodeConfig.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHugepagesFieldBuilder(); + } } @java.lang.Override @@ -677,6 +1502,11 @@ public Builder clear() { bitField0_ = 0; internalGetMutableSysctls().clear(); cgroupMode_ = 0; + hugepages_ = null; + if (hugepagesBuilder_ != null) { + hugepagesBuilder_.dispose(); + hugepagesBuilder_ = null; + } return this; } @@ -720,6 +1550,12 @@ private void buildPartial0(com.google.container.v1.LinuxNodeConfig result) { if (((from_bitField0_ & 0x00000002) != 0)) { result.cgroupMode_ = cgroupMode_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.hugepages_ = hugepagesBuilder_ == null ? hugepages_ : hugepagesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -772,6 +1608,9 @@ public Builder mergeFrom(com.google.container.v1.LinuxNodeConfig other) { if (other.cgroupMode_ != 0) { setCgroupModeValue(other.getCgroupModeValue()); } + if (other.hasHugepages()) { + mergeHugepages(other.getHugepages()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -816,6 +1655,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 16 + case 26: + { + input.readMessage(getHugepagesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1195,6 +2040,212 @@ public Builder clearCgroupMode() { return this; } + private com.google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.LinuxNodeConfig.HugepagesConfig, + com.google.container.v1.LinuxNodeConfig.HugepagesConfig.Builder, + com.google.container.v1.LinuxNodeConfig.HugepagesConfigOrBuilder> + hugepagesBuilder_; + /** + * + * + *
+     * Optional. Amounts for 2M and 1G hugepages
+     * 
+ * + * + * optional .google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the hugepages field is set. + */ + public boolean hasHugepages() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. Amounts for 2M and 1G hugepages
+     * 
+ * + * + * optional .google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The hugepages. + */ + public com.google.container.v1.LinuxNodeConfig.HugepagesConfig getHugepages() { + if (hugepagesBuilder_ == null) { + return hugepages_ == null + ? com.google.container.v1.LinuxNodeConfig.HugepagesConfig.getDefaultInstance() + : hugepages_; + } else { + return hugepagesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Amounts for 2M and 1G hugepages
+     * 
+ * + * + * optional .google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHugepages(com.google.container.v1.LinuxNodeConfig.HugepagesConfig value) { + if (hugepagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hugepages_ = value; + } else { + hugepagesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Amounts for 2M and 1G hugepages
+     * 
+ * + * + * optional .google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHugepages( + com.google.container.v1.LinuxNodeConfig.HugepagesConfig.Builder builderForValue) { + if (hugepagesBuilder_ == null) { + hugepages_ = builderForValue.build(); + } else { + hugepagesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Amounts for 2M and 1G hugepages
+     * 
+ * + * + * optional .google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHugepages(com.google.container.v1.LinuxNodeConfig.HugepagesConfig value) { + if (hugepagesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && hugepages_ != null + && hugepages_ + != com.google.container.v1.LinuxNodeConfig.HugepagesConfig.getDefaultInstance()) { + getHugepagesBuilder().mergeFrom(value); + } else { + hugepages_ = value; + } + } else { + hugepagesBuilder_.mergeFrom(value); + } + if (hugepages_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Amounts for 2M and 1G hugepages
+     * 
+ * + * + * optional .google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHugepages() { + bitField0_ = (bitField0_ & ~0x00000004); + hugepages_ = null; + if (hugepagesBuilder_ != null) { + hugepagesBuilder_.dispose(); + hugepagesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Amounts for 2M and 1G hugepages
+     * 
+ * + * + * optional .google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.container.v1.LinuxNodeConfig.HugepagesConfig.Builder getHugepagesBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getHugepagesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Amounts for 2M and 1G hugepages
+     * 
+ * + * + * optional .google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.container.v1.LinuxNodeConfig.HugepagesConfigOrBuilder + getHugepagesOrBuilder() { + if (hugepagesBuilder_ != null) { + return hugepagesBuilder_.getMessageOrBuilder(); + } else { + return hugepages_ == null + ? com.google.container.v1.LinuxNodeConfig.HugepagesConfig.getDefaultInstance() + : hugepages_; + } + } + /** + * + * + *
+     * Optional. Amounts for 2M and 1G hugepages
+     * 
+ * + * + * optional .google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.LinuxNodeConfig.HugepagesConfig, + com.google.container.v1.LinuxNodeConfig.HugepagesConfig.Builder, + com.google.container.v1.LinuxNodeConfig.HugepagesConfigOrBuilder> + getHugepagesFieldBuilder() { + if (hugepagesBuilder_ == null) { + hugepagesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.LinuxNodeConfig.HugepagesConfig, + com.google.container.v1.LinuxNodeConfig.HugepagesConfig.Builder, + com.google.container.v1.LinuxNodeConfig.HugepagesConfigOrBuilder>( + getHugepages(), getParentForChildren(), isClean()); + hugepages_ = null; + } + return hugepagesBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/LinuxNodeConfigOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/LinuxNodeConfigOrBuilder.java index 020961ee8213..0ec1b61426e0 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/LinuxNodeConfigOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/LinuxNodeConfigOrBuilder.java @@ -181,4 +181,45 @@ java.lang.String getSysctlsOrDefault( * @return The cgroupMode. */ com.google.container.v1.LinuxNodeConfig.CgroupMode getCgroupMode(); + + /** + * + * + *
+   * Optional. Amounts for 2M and 1G hugepages
+   * 
+ * + * + * optional .google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the hugepages field is set. + */ + boolean hasHugepages(); + /** + * + * + *
+   * Optional. Amounts for 2M and 1G hugepages
+   * 
+ * + * + * optional .google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The hugepages. + */ + com.google.container.v1.LinuxNodeConfig.HugepagesConfig getHugepages(); + /** + * + * + *
+   * Optional. Amounts for 2M and 1G hugepages
+   * 
+ * + * + * optional .google.container.v1.LinuxNodeConfig.HugepagesConfig hugepages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.container.v1.LinuxNodeConfig.HugepagesConfigOrBuilder getHugepagesOrBuilder(); } diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListClustersRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListClustersRequest.java index 0585da30fd76..5216155496ba 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListClustersRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListClustersRequest.java @@ -81,7 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3051 + * google/container/v1/cluster_service.proto;l=3165 * @return The projectId. */ @java.lang.Override @@ -109,7 +109,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3051 + * google/container/v1/cluster_service.proto;l=3165 * @return The bytes for projectId. */ @java.lang.Override @@ -143,7 +143,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3057 + * google/container/v1/cluster_service.proto;l=3171 * @return The zone. */ @java.lang.Override @@ -172,7 +172,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3057 + * google/container/v1/cluster_service.proto;l=3171 * @return The bytes for zone. */ @java.lang.Override @@ -646,7 +646,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3051 + * google/container/v1/cluster_service.proto;l=3165 * @return The projectId. */ @java.lang.Deprecated @@ -673,7 +673,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3051 + * google/container/v1/cluster_service.proto;l=3165 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -700,7 +700,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3051 + * google/container/v1/cluster_service.proto;l=3165 * @param value The projectId to set. * @return This builder for chaining. */ @@ -726,7 +726,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3051 + * google/container/v1/cluster_service.proto;l=3165 * @return This builder for chaining. */ @java.lang.Deprecated @@ -748,7 +748,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3051 + * google/container/v1/cluster_service.proto;l=3165 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -778,7 +778,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3057 + * google/container/v1/cluster_service.proto;l=3171 * @return The zone. */ @java.lang.Deprecated @@ -806,7 +806,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3057 + * google/container/v1/cluster_service.proto;l=3171 * @return The bytes for zone. */ @java.lang.Deprecated @@ -834,7 +834,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3057 + * google/container/v1/cluster_service.proto;l=3171 * @param value The zone to set. * @return This builder for chaining. */ @@ -861,7 +861,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3057 + * google/container/v1/cluster_service.proto;l=3171 * @return This builder for chaining. */ @java.lang.Deprecated @@ -884,7 +884,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3057 + * google/container/v1/cluster_service.proto;l=3171 * @param value The bytes for zone to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListClustersRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListClustersRequestOrBuilder.java index 7b2a3993df66..a052fd8e737b 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListClustersRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListClustersRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface ListClustersRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3051 + * google/container/v1/cluster_service.proto;l=3165 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface ListClustersRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3051 + * google/container/v1/cluster_service.proto;l=3165 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface ListClustersRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3057 + * google/container/v1/cluster_service.proto;l=3171 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface ListClustersRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListClustersRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3057 + * google/container/v1/cluster_service.proto;l=3171 * @return The bytes for zone. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListNodePoolsRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListNodePoolsRequest.java index 05e6377731d3..45b10e828b48 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListNodePoolsRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListNodePoolsRequest.java @@ -82,7 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3258 + * google/container/v1/cluster_service.proto;l=3372 * @return The projectId. */ @java.lang.Override @@ -110,7 +110,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3258 + * google/container/v1/cluster_service.proto;l=3372 * @return The bytes for projectId. */ @java.lang.Override @@ -144,7 +144,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3264 + * google/container/v1/cluster_service.proto;l=3378 * @return The zone. */ @java.lang.Override @@ -173,7 +173,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3264 + * google/container/v1/cluster_service.proto;l=3378 * @return The bytes for zone. */ @java.lang.Override @@ -205,7 +205,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3268 + * google/container/v1/cluster_service.proto;l=3382 * @return The clusterId. */ @java.lang.Override @@ -232,7 +232,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3268 + * google/container/v1/cluster_service.proto;l=3382 * @return The bytes for clusterId. */ @java.lang.Override @@ -728,7 +728,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3258 + * google/container/v1/cluster_service.proto;l=3372 * @return The projectId. */ @java.lang.Deprecated @@ -755,7 +755,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3258 + * google/container/v1/cluster_service.proto;l=3372 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -782,7 +782,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3258 + * google/container/v1/cluster_service.proto;l=3372 * @param value The projectId to set. * @return This builder for chaining. */ @@ -808,7 +808,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3258 + * google/container/v1/cluster_service.proto;l=3372 * @return This builder for chaining. */ @java.lang.Deprecated @@ -830,7 +830,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3258 + * google/container/v1/cluster_service.proto;l=3372 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -860,7 +860,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3264 + * google/container/v1/cluster_service.proto;l=3378 * @return The zone. */ @java.lang.Deprecated @@ -888,7 +888,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3264 + * google/container/v1/cluster_service.proto;l=3378 * @return The bytes for zone. */ @java.lang.Deprecated @@ -916,7 +916,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3264 + * google/container/v1/cluster_service.proto;l=3378 * @param value The zone to set. * @return This builder for chaining. */ @@ -943,7 +943,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3264 + * google/container/v1/cluster_service.proto;l=3378 * @return This builder for chaining. */ @java.lang.Deprecated @@ -966,7 +966,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3264 + * google/container/v1/cluster_service.proto;l=3378 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -994,7 +994,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3268 + * google/container/v1/cluster_service.proto;l=3382 * @return The clusterId. */ @java.lang.Deprecated @@ -1020,7 +1020,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3268 + * google/container/v1/cluster_service.proto;l=3382 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1046,7 +1046,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3268 + * google/container/v1/cluster_service.proto;l=3382 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1071,7 +1071,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3268 + * google/container/v1/cluster_service.proto;l=3382 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1092,7 +1092,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3268 + * google/container/v1/cluster_service.proto;l=3382 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListNodePoolsRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListNodePoolsRequestOrBuilder.java index 1d263c00d79b..6f2634febe19 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListNodePoolsRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListNodePoolsRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface ListNodePoolsRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3258 + * google/container/v1/cluster_service.proto;l=3372 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface ListNodePoolsRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3258 + * google/container/v1/cluster_service.proto;l=3372 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface ListNodePoolsRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3264 + * google/container/v1/cluster_service.proto;l=3378 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface ListNodePoolsRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3264 + * google/container/v1/cluster_service.proto;l=3378 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface ListNodePoolsRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3268 + * google/container/v1/cluster_service.proto;l=3382 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface ListNodePoolsRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.ListNodePoolsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3268 + * google/container/v1/cluster_service.proto;l=3382 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListOperationsRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListOperationsRequest.java index 4ef45c157c2d..b92e5cd876c7 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListOperationsRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListOperationsRequest.java @@ -81,7 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3103 + * google/container/v1/cluster_service.proto;l=3217 * @return The projectId. */ @java.lang.Override @@ -109,7 +109,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3103 + * google/container/v1/cluster_service.proto;l=3217 * @return The bytes for projectId. */ @java.lang.Override @@ -143,7 +143,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3109 + * google/container/v1/cluster_service.proto;l=3223 * @return The zone. */ @java.lang.Override @@ -172,7 +172,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3109 + * google/container/v1/cluster_service.proto;l=3223 * @return The bytes for zone. */ @java.lang.Override @@ -646,7 +646,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3103 + * google/container/v1/cluster_service.proto;l=3217 * @return The projectId. */ @java.lang.Deprecated @@ -673,7 +673,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3103 + * google/container/v1/cluster_service.proto;l=3217 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -700,7 +700,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3103 + * google/container/v1/cluster_service.proto;l=3217 * @param value The projectId to set. * @return This builder for chaining. */ @@ -726,7 +726,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3103 + * google/container/v1/cluster_service.proto;l=3217 * @return This builder for chaining. */ @java.lang.Deprecated @@ -748,7 +748,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3103 + * google/container/v1/cluster_service.proto;l=3217 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -778,7 +778,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3109 + * google/container/v1/cluster_service.proto;l=3223 * @return The zone. */ @java.lang.Deprecated @@ -806,7 +806,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3109 + * google/container/v1/cluster_service.proto;l=3223 * @return The bytes for zone. */ @java.lang.Deprecated @@ -834,7 +834,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3109 + * google/container/v1/cluster_service.proto;l=3223 * @param value The zone to set. * @return This builder for chaining. */ @@ -861,7 +861,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3109 + * google/container/v1/cluster_service.proto;l=3223 * @return This builder for chaining. */ @java.lang.Deprecated @@ -884,7 +884,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3109 + * google/container/v1/cluster_service.proto;l=3223 * @param value The bytes for zone to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListOperationsRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListOperationsRequestOrBuilder.java index 41419b0e60fd..fa20dbc5de91 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListOperationsRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/ListOperationsRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface ListOperationsRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3103 + * google/container/v1/cluster_service.proto;l=3217 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface ListOperationsRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3103 + * google/container/v1/cluster_service.proto;l=3217 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface ListOperationsRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3109 + * google/container/v1/cluster_service.proto;l=3223 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface ListOperationsRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.ListOperationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3109 + * google/container/v1/cluster_service.proto;l=3223 * @return The bytes for zone. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/MasterAuth.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/MasterAuth.java index cc3a207bf665..47bdd716671a 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/MasterAuth.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/MasterAuth.java @@ -91,7 +91,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string username = 1 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.username is deprecated. See - * google/container/v1/cluster_service.proto;l=1153 + * google/container/v1/cluster_service.proto;l=1220 * @return The username. */ @java.lang.Override @@ -124,7 +124,7 @@ public java.lang.String getUsername() { * string username = 1 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.username is deprecated. See - * google/container/v1/cluster_service.proto;l=1153 + * google/container/v1/cluster_service.proto;l=1220 * @return The bytes for username. */ @java.lang.Override @@ -163,7 +163,7 @@ public com.google.protobuf.ByteString getUsernameBytes() { * string password = 2 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.password is deprecated. See - * google/container/v1/cluster_service.proto;l=1164 + * google/container/v1/cluster_service.proto;l=1231 * @return The password. */ @java.lang.Override @@ -197,7 +197,7 @@ public java.lang.String getPassword() { * string password = 2 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.password is deprecated. See - * google/container/v1/cluster_service.proto;l=1164 + * google/container/v1/cluster_service.proto;l=1231 * @return The bytes for password. */ @java.lang.Override @@ -932,7 +932,7 @@ public Builder mergeFrom( * string username = 1 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.username is deprecated. See - * google/container/v1/cluster_service.proto;l=1153 + * google/container/v1/cluster_service.proto;l=1220 * @return The username. */ @java.lang.Deprecated @@ -964,7 +964,7 @@ public java.lang.String getUsername() { * string username = 1 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.username is deprecated. See - * google/container/v1/cluster_service.proto;l=1153 + * google/container/v1/cluster_service.proto;l=1220 * @return The bytes for username. */ @java.lang.Deprecated @@ -996,7 +996,7 @@ public com.google.protobuf.ByteString getUsernameBytes() { * string username = 1 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.username is deprecated. See - * google/container/v1/cluster_service.proto;l=1153 + * google/container/v1/cluster_service.proto;l=1220 * @param value The username to set. * @return This builder for chaining. */ @@ -1027,7 +1027,7 @@ public Builder setUsername(java.lang.String value) { * string username = 1 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.username is deprecated. See - * google/container/v1/cluster_service.proto;l=1153 + * google/container/v1/cluster_service.proto;l=1220 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1054,7 +1054,7 @@ public Builder clearUsername() { * string username = 1 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.username is deprecated. See - * google/container/v1/cluster_service.proto;l=1153 + * google/container/v1/cluster_service.proto;l=1220 * @param value The bytes for username to set. * @return This builder for chaining. */ @@ -1089,7 +1089,7 @@ public Builder setUsernameBytes(com.google.protobuf.ByteString value) { * string password = 2 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.password is deprecated. See - * google/container/v1/cluster_service.proto;l=1164 + * google/container/v1/cluster_service.proto;l=1231 * @return The password. */ @java.lang.Deprecated @@ -1122,7 +1122,7 @@ public java.lang.String getPassword() { * string password = 2 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.password is deprecated. See - * google/container/v1/cluster_service.proto;l=1164 + * google/container/v1/cluster_service.proto;l=1231 * @return The bytes for password. */ @java.lang.Deprecated @@ -1155,7 +1155,7 @@ public com.google.protobuf.ByteString getPasswordBytes() { * string password = 2 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.password is deprecated. See - * google/container/v1/cluster_service.proto;l=1164 + * google/container/v1/cluster_service.proto;l=1231 * @param value The password to set. * @return This builder for chaining. */ @@ -1187,7 +1187,7 @@ public Builder setPassword(java.lang.String value) { * string password = 2 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.password is deprecated. See - * google/container/v1/cluster_service.proto;l=1164 + * google/container/v1/cluster_service.proto;l=1231 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1215,7 +1215,7 @@ public Builder clearPassword() { * string password = 2 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.password is deprecated. See - * google/container/v1/cluster_service.proto;l=1164 + * google/container/v1/cluster_service.proto;l=1231 * @param value The bytes for password to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/MasterAuthOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/MasterAuthOrBuilder.java index 26a21c56d04b..5fc383de4564 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/MasterAuthOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/MasterAuthOrBuilder.java @@ -41,7 +41,7 @@ public interface MasterAuthOrBuilder * string username = 1 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.username is deprecated. See - * google/container/v1/cluster_service.proto;l=1153 + * google/container/v1/cluster_service.proto;l=1220 * @return The username. */ @java.lang.Deprecated @@ -63,7 +63,7 @@ public interface MasterAuthOrBuilder * string username = 1 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.username is deprecated. See - * google/container/v1/cluster_service.proto;l=1153 + * google/container/v1/cluster_service.proto;l=1220 * @return The bytes for username. */ @java.lang.Deprecated @@ -87,7 +87,7 @@ public interface MasterAuthOrBuilder * string password = 2 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.password is deprecated. See - * google/container/v1/cluster_service.proto;l=1164 + * google/container/v1/cluster_service.proto;l=1231 * @return The password. */ @java.lang.Deprecated @@ -110,7 +110,7 @@ public interface MasterAuthOrBuilder * string password = 2 [deprecated = true]; * * @deprecated google.container.v1.MasterAuth.password is deprecated. See - * google/container/v1/cluster_service.proto;l=1164 + * google/container/v1/cluster_service.proto;l=1231 * @return The bytes for password. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/MonitoringComponentConfig.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/MonitoringComponentConfig.java index 3485df67d69e..e7ff49ed96a8 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/MonitoringComponentConfig.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/MonitoringComponentConfig.java @@ -183,6 +183,26 @@ public enum Component implements com.google.protobuf.ProtocolMessageEnum { * STATEFULSET = 12; */ STATEFULSET(12), + /** + * + * + *
+     * CADVISOR
+     * 
+ * + * CADVISOR = 13; + */ + CADVISOR(13), + /** + * + * + *
+     * KUBELET
+     * 
+ * + * KUBELET = 14; + */ + KUBELET(14), UNRECOGNIZED(-1), ; @@ -296,6 +316,26 @@ public enum Component implements com.google.protobuf.ProtocolMessageEnum { * STATEFULSET = 12; */ public static final int STATEFULSET_VALUE = 12; + /** + * + * + *
+     * CADVISOR
+     * 
+ * + * CADVISOR = 13; + */ + public static final int CADVISOR_VALUE = 13; + /** + * + * + *
+     * KUBELET
+     * 
+ * + * KUBELET = 14; + */ + public static final int KUBELET_VALUE = 14; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -343,6 +383,10 @@ public static Component forNumber(int value) { return DEPLOYMENT; case 12: return STATEFULSET; + case 13: + return CADVISOR; + case 14: + return KUBELET; default: return null; } diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NetworkConfig.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NetworkConfig.java index 920dd157b740..7fbf3fc8864c 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NetworkConfig.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NetworkConfig.java @@ -1472,6 +1472,7 @@ public boolean getEnableFqdnNetworkPolicy() { * *
    * Specify the details of in-transit encryption.
+   * Now named inter-node transparent encryption.
    * 
* * @@ -1489,6 +1490,7 @@ public boolean hasInTransitEncryptionConfig() { * *
    * Specify the details of in-transit encryption.
+   * Now named inter-node transparent encryption.
    * 
* * @@ -1506,6 +1508,7 @@ public int getInTransitEncryptionConfigValue() { * *
    * Specify the details of in-transit encryption.
+   * Now named inter-node transparent encryption.
    * 
* * @@ -3999,6 +4002,7 @@ public Builder clearEnableFqdnNetworkPolicy() { * *
      * Specify the details of in-transit encryption.
+     * Now named inter-node transparent encryption.
      * 
* * @@ -4016,6 +4020,7 @@ public boolean hasInTransitEncryptionConfig() { * *
      * Specify the details of in-transit encryption.
+     * Now named inter-node transparent encryption.
      * 
* * @@ -4033,6 +4038,7 @@ public int getInTransitEncryptionConfigValue() { * *
      * Specify the details of in-transit encryption.
+     * Now named inter-node transparent encryption.
      * 
* * @@ -4053,6 +4059,7 @@ public Builder setInTransitEncryptionConfigValue(int value) { * *
      * Specify the details of in-transit encryption.
+     * Now named inter-node transparent encryption.
      * 
* * @@ -4074,6 +4081,7 @@ public com.google.container.v1.InTransitEncryptionConfig getInTransitEncryptionC * *
      * Specify the details of in-transit encryption.
+     * Now named inter-node transparent encryption.
      * 
* * @@ -4098,6 +4106,7 @@ public Builder setInTransitEncryptionConfig( * *
      * Specify the details of in-transit encryption.
+     * Now named inter-node transparent encryption.
      * 
* * diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NetworkConfigOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NetworkConfigOrBuilder.java index f6c5bc641ebd..df6e276b4011 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NetworkConfigOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NetworkConfigOrBuilder.java @@ -410,6 +410,7 @@ public interface NetworkConfigOrBuilder * *
    * Specify the details of in-transit encryption.
+   * Now named inter-node transparent encryption.
    * 
* * @@ -424,6 +425,7 @@ public interface NetworkConfigOrBuilder * *
    * Specify the details of in-transit encryption.
+   * Now named inter-node transparent encryption.
    * 
* * @@ -438,6 +440,7 @@ public interface NetworkConfigOrBuilder * *
    * Specify the details of in-transit encryption.
+   * Now named inter-node transparent encryption.
    * 
* * diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfig.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfig.java index c0c7a7c02e11..af1cfedc6b0b 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfig.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfig.java @@ -2238,6 +2238,56 @@ public com.google.container.v1.SoleTenantConfigOrBuilder getSoleTenantConfigOrBu : soleTenantConfig_; } + public static final int CONTAINERD_CONFIG_FIELD_NUMBER = 43; + private com.google.container.v1.ContainerdConfig containerdConfig_; + /** + * + * + *
+   * Parameters for containerd customization.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 43; + * + * @return Whether the containerdConfig field is set. + */ + @java.lang.Override + public boolean hasContainerdConfig() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+   * Parameters for containerd customization.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 43; + * + * @return The containerdConfig. + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfig getContainerdConfig() { + return containerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : containerdConfig_; + } + /** + * + * + *
+   * Parameters for containerd customization.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 43; + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfigOrBuilder getContainerdConfigOrBuilder() { + return containerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : containerdConfig_; + } + public static final int RESOURCE_MANAGER_TAGS_FIELD_NUMBER = 45; private com.google.container.v1.ResourceManagerTags resourceManagerTags_; /** @@ -2253,7 +2303,7 @@ public com.google.container.v1.SoleTenantConfigOrBuilder getSoleTenantConfigOrBu */ @java.lang.Override public boolean hasResourceManagerTags() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** * @@ -2395,7 +2445,7 @@ public com.google.container.v1.SecondaryBootDiskOrBuilder getSecondaryBootDisksO */ @java.lang.Override public boolean hasSecondaryBootDiskUpdateStrategy() { - return ((bitField0_ & 0x00020000) != 0); + return ((bitField0_ & 0x00040000) != 0); } /** * @@ -2550,6 +2600,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage(42, getSoleTenantConfig()); } if (((bitField0_ & 0x00010000) != 0)) { + output.writeMessage(43, getContainerdConfig()); + } + if (((bitField0_ & 0x00020000) != 0)) { output.writeMessage(45, getResourceManagerTags()); } if (enableConfidentialStorage_ != false) { @@ -2558,7 +2611,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < secondaryBootDisks_.size(); i++) { output.writeMessage(48, secondaryBootDisks_.get(i)); } - if (((bitField0_ & 0x00020000) != 0)) { + if (((bitField0_ & 0x00040000) != 0)) { output.writeMessage(50, getSecondaryBootDiskUpdateStrategy()); } getUnknownFields().writeTo(output); @@ -2713,6 +2766,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(42, getSoleTenantConfig()); } if (((bitField0_ & 0x00010000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(43, getContainerdConfig()); + } + if (((bitField0_ & 0x00020000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(45, getResourceManagerTags()); } @@ -2723,7 +2779,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(48, secondaryBootDisks_.get(i)); } - if (((bitField0_ & 0x00020000) != 0)) { + if (((bitField0_ & 0x00040000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 50, getSecondaryBootDiskUpdateStrategy()); @@ -2827,6 +2883,10 @@ public boolean equals(final java.lang.Object obj) { if (hasSoleTenantConfig()) { if (!getSoleTenantConfig().equals(other.getSoleTenantConfig())) return false; } + if (hasContainerdConfig() != other.hasContainerdConfig()) return false; + if (hasContainerdConfig()) { + if (!getContainerdConfig().equals(other.getContainerdConfig())) return false; + } if (hasResourceManagerTags() != other.hasResourceManagerTags()) return false; if (hasResourceManagerTags()) { if (!getResourceManagerTags().equals(other.getResourceManagerTags())) return false; @@ -2964,6 +3024,10 @@ public int hashCode() { hash = (37 * hash) + SOLE_TENANT_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getSoleTenantConfig().hashCode(); } + if (hasContainerdConfig()) { + hash = (37 * hash) + CONTAINERD_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getContainerdConfig().hashCode(); + } if (hasResourceManagerTags()) { hash = (37 * hash) + RESOURCE_MANAGER_TAGS_FIELD_NUMBER; hash = (53 * hash) + getResourceManagerTags().hashCode(); @@ -3170,6 +3234,7 @@ private void maybeForceBuilderInitialization() { getLocalNvmeSsdBlockConfigFieldBuilder(); getEphemeralStorageLocalSsdConfigFieldBuilder(); getSoleTenantConfigFieldBuilder(); + getContainerdConfigFieldBuilder(); getResourceManagerTagsFieldBuilder(); getSecondaryBootDisksFieldBuilder(); getSecondaryBootDiskUpdateStrategyFieldBuilder(); @@ -3291,6 +3356,11 @@ public Builder clear() { soleTenantConfigBuilder_.dispose(); soleTenantConfigBuilder_ = null; } + containerdConfig_ = null; + if (containerdConfigBuilder_ != null) { + containerdConfigBuilder_.dispose(); + containerdConfigBuilder_ = null; + } resourceManagerTags_ = null; if (resourceManagerTagsBuilder_ != null) { resourceManagerTagsBuilder_.dispose(); @@ -3303,7 +3373,7 @@ public Builder clear() { secondaryBootDisks_ = null; secondaryBootDisksBuilder_.clear(); } - bitField1_ = (bitField1_ & ~0x00000010); + bitField1_ = (bitField1_ & ~0x00000020); secondaryBootDiskUpdateStrategy_ = null; if (secondaryBootDiskUpdateStrategyBuilder_ != null) { secondaryBootDiskUpdateStrategyBuilder_.dispose(); @@ -3366,9 +3436,9 @@ private void buildPartialRepeatedFields(com.google.container.v1.NodeConfig resul result.taints_ = taintsBuilder_.build(); } if (secondaryBootDisksBuilder_ == null) { - if (((bitField1_ & 0x00000010) != 0)) { + if (((bitField1_ & 0x00000020) != 0)) { secondaryBootDisks_ = java.util.Collections.unmodifiableList(secondaryBootDisks_); - bitField1_ = (bitField1_ & ~0x00000010); + bitField1_ = (bitField1_ & ~0x00000020); } result.secondaryBootDisks_ = secondaryBootDisks_; } else { @@ -3532,21 +3602,26 @@ private void buildPartial1(com.google.container.v1.NodeConfig result) { to_bitField0_ |= 0x00008000; } if (((from_bitField1_ & 0x00000004) != 0)) { + result.containerdConfig_ = + containerdConfigBuilder_ == null ? containerdConfig_ : containerdConfigBuilder_.build(); + to_bitField0_ |= 0x00010000; + } + if (((from_bitField1_ & 0x00000008) != 0)) { result.resourceManagerTags_ = resourceManagerTagsBuilder_ == null ? resourceManagerTags_ : resourceManagerTagsBuilder_.build(); - to_bitField0_ |= 0x00010000; + to_bitField0_ |= 0x00020000; } - if (((from_bitField1_ & 0x00000008) != 0)) { + if (((from_bitField1_ & 0x00000010) != 0)) { result.enableConfidentialStorage_ = enableConfidentialStorage_; } - if (((from_bitField1_ & 0x00000020) != 0)) { + if (((from_bitField1_ & 0x00000040) != 0)) { result.secondaryBootDiskUpdateStrategy_ = secondaryBootDiskUpdateStrategyBuilder_ == null ? secondaryBootDiskUpdateStrategy_ : secondaryBootDiskUpdateStrategyBuilder_.build(); - to_bitField0_ |= 0x00020000; + to_bitField0_ |= 0x00040000; } result.bitField0_ |= to_bitField0_; } @@ -3771,6 +3846,9 @@ public Builder mergeFrom(com.google.container.v1.NodeConfig other) { if (other.hasSoleTenantConfig()) { mergeSoleTenantConfig(other.getSoleTenantConfig()); } + if (other.hasContainerdConfig()) { + mergeContainerdConfig(other.getContainerdConfig()); + } if (other.hasResourceManagerTags()) { mergeResourceManagerTags(other.getResourceManagerTags()); } @@ -3781,7 +3859,7 @@ public Builder mergeFrom(com.google.container.v1.NodeConfig other) { if (!other.secondaryBootDisks_.isEmpty()) { if (secondaryBootDisks_.isEmpty()) { secondaryBootDisks_ = other.secondaryBootDisks_; - bitField1_ = (bitField1_ & ~0x00000010); + bitField1_ = (bitField1_ & ~0x00000020); } else { ensureSecondaryBootDisksIsMutable(); secondaryBootDisks_.addAll(other.secondaryBootDisks_); @@ -3794,7 +3872,7 @@ public Builder mergeFrom(com.google.container.v1.NodeConfig other) { secondaryBootDisksBuilder_.dispose(); secondaryBootDisksBuilder_ = null; secondaryBootDisks_ = other.secondaryBootDisks_; - bitField1_ = (bitField1_ & ~0x00000010); + bitField1_ = (bitField1_ & ~0x00000020); secondaryBootDisksBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSecondaryBootDisksFieldBuilder() @@ -4081,17 +4159,24 @@ public Builder mergeFrom( bitField1_ |= 0x00000002; break; } // case 338 + case 346: + { + input.readMessage( + getContainerdConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000004; + break; + } // case 346 case 362: { input.readMessage( getResourceManagerTagsFieldBuilder().getBuilder(), extensionRegistry); - bitField1_ |= 0x00000004; + bitField1_ |= 0x00000008; break; } // case 362 case 368: { enableConfidentialStorage_ = input.readBool(); - bitField1_ |= 0x00000008; + bitField1_ |= 0x00000010; break; } // case 368 case 386: @@ -4112,7 +4197,7 @@ public Builder mergeFrom( input.readMessage( getSecondaryBootDiskUpdateStrategyFieldBuilder().getBuilder(), extensionRegistry); - bitField1_ |= 0x00000020; + bitField1_ |= 0x00000040; break; } // case 402 default: @@ -10365,6 +10450,192 @@ public com.google.container.v1.SoleTenantConfigOrBuilder getSoleTenantConfigOrBu return soleTenantConfigBuilder_; } + private com.google.container.v1.ContainerdConfig containerdConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig, + com.google.container.v1.ContainerdConfig.Builder, + com.google.container.v1.ContainerdConfigOrBuilder> + containerdConfigBuilder_; + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 43; + * + * @return Whether the containerdConfig field is set. + */ + public boolean hasContainerdConfig() { + return ((bitField1_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 43; + * + * @return The containerdConfig. + */ + public com.google.container.v1.ContainerdConfig getContainerdConfig() { + if (containerdConfigBuilder_ == null) { + return containerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : containerdConfig_; + } else { + return containerdConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 43; + */ + public Builder setContainerdConfig(com.google.container.v1.ContainerdConfig value) { + if (containerdConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + containerdConfig_ = value; + } else { + containerdConfigBuilder_.setMessage(value); + } + bitField1_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 43; + */ + public Builder setContainerdConfig( + com.google.container.v1.ContainerdConfig.Builder builderForValue) { + if (containerdConfigBuilder_ == null) { + containerdConfig_ = builderForValue.build(); + } else { + containerdConfigBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 43; + */ + public Builder mergeContainerdConfig(com.google.container.v1.ContainerdConfig value) { + if (containerdConfigBuilder_ == null) { + if (((bitField1_ & 0x00000004) != 0) + && containerdConfig_ != null + && containerdConfig_ != com.google.container.v1.ContainerdConfig.getDefaultInstance()) { + getContainerdConfigBuilder().mergeFrom(value); + } else { + containerdConfig_ = value; + } + } else { + containerdConfigBuilder_.mergeFrom(value); + } + if (containerdConfig_ != null) { + bitField1_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 43; + */ + public Builder clearContainerdConfig() { + bitField1_ = (bitField1_ & ~0x00000004); + containerdConfig_ = null; + if (containerdConfigBuilder_ != null) { + containerdConfigBuilder_.dispose(); + containerdConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 43; + */ + public com.google.container.v1.ContainerdConfig.Builder getContainerdConfigBuilder() { + bitField1_ |= 0x00000004; + onChanged(); + return getContainerdConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 43; + */ + public com.google.container.v1.ContainerdConfigOrBuilder getContainerdConfigOrBuilder() { + if (containerdConfigBuilder_ != null) { + return containerdConfigBuilder_.getMessageOrBuilder(); + } else { + return containerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : containerdConfig_; + } + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 43; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig, + com.google.container.v1.ContainerdConfig.Builder, + com.google.container.v1.ContainerdConfigOrBuilder> + getContainerdConfigFieldBuilder() { + if (containerdConfigBuilder_ == null) { + containerdConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig, + com.google.container.v1.ContainerdConfig.Builder, + com.google.container.v1.ContainerdConfigOrBuilder>( + getContainerdConfig(), getParentForChildren(), isClean()); + containerdConfig_ = null; + } + return containerdConfigBuilder_; + } + private com.google.container.v1.ResourceManagerTags resourceManagerTags_; private com.google.protobuf.SingleFieldBuilderV3< com.google.container.v1.ResourceManagerTags, @@ -10383,7 +10654,7 @@ public com.google.container.v1.SoleTenantConfigOrBuilder getSoleTenantConfigOrBu * @return Whether the resourceManagerTags field is set. */ public boolean hasResourceManagerTags() { - return ((bitField1_ & 0x00000004) != 0); + return ((bitField1_ & 0x00000008) != 0); } /** * @@ -10423,7 +10694,7 @@ public Builder setResourceManagerTags(com.google.container.v1.ResourceManagerTag } else { resourceManagerTagsBuilder_.setMessage(value); } - bitField1_ |= 0x00000004; + bitField1_ |= 0x00000008; onChanged(); return this; } @@ -10443,7 +10714,7 @@ public Builder setResourceManagerTags( } else { resourceManagerTagsBuilder_.setMessage(builderForValue.build()); } - bitField1_ |= 0x00000004; + bitField1_ |= 0x00000008; onChanged(); return this; } @@ -10458,7 +10729,7 @@ public Builder setResourceManagerTags( */ public Builder mergeResourceManagerTags(com.google.container.v1.ResourceManagerTags value) { if (resourceManagerTagsBuilder_ == null) { - if (((bitField1_ & 0x00000004) != 0) + if (((bitField1_ & 0x00000008) != 0) && resourceManagerTags_ != null && resourceManagerTags_ != com.google.container.v1.ResourceManagerTags.getDefaultInstance()) { @@ -10470,7 +10741,7 @@ public Builder mergeResourceManagerTags(com.google.container.v1.ResourceManagerT resourceManagerTagsBuilder_.mergeFrom(value); } if (resourceManagerTags_ != null) { - bitField1_ |= 0x00000004; + bitField1_ |= 0x00000008; onChanged(); } return this; @@ -10485,7 +10756,7 @@ public Builder mergeResourceManagerTags(com.google.container.v1.ResourceManagerT * .google.container.v1.ResourceManagerTags resource_manager_tags = 45; */ public Builder clearResourceManagerTags() { - bitField1_ = (bitField1_ & ~0x00000004); + bitField1_ = (bitField1_ & ~0x00000008); resourceManagerTags_ = null; if (resourceManagerTagsBuilder_ != null) { resourceManagerTagsBuilder_.dispose(); @@ -10504,7 +10775,7 @@ public Builder clearResourceManagerTags() { * .google.container.v1.ResourceManagerTags resource_manager_tags = 45; */ public com.google.container.v1.ResourceManagerTags.Builder getResourceManagerTagsBuilder() { - bitField1_ |= 0x00000004; + bitField1_ |= 0x00000008; onChanged(); return getResourceManagerTagsFieldBuilder().getBuilder(); } @@ -10583,7 +10854,7 @@ public boolean getEnableConfidentialStorage() { public Builder setEnableConfidentialStorage(boolean value) { enableConfidentialStorage_ = value; - bitField1_ |= 0x00000008; + bitField1_ |= 0x00000010; onChanged(); return this; } @@ -10599,7 +10870,7 @@ public Builder setEnableConfidentialStorage(boolean value) { * @return This builder for chaining. */ public Builder clearEnableConfidentialStorage() { - bitField1_ = (bitField1_ & ~0x00000008); + bitField1_ = (bitField1_ & ~0x00000010); enableConfidentialStorage_ = false; onChanged(); return this; @@ -10609,10 +10880,10 @@ public Builder clearEnableConfidentialStorage() { java.util.Collections.emptyList(); private void ensureSecondaryBootDisksIsMutable() { - if (!((bitField1_ & 0x00000010) != 0)) { + if (!((bitField1_ & 0x00000020) != 0)) { secondaryBootDisks_ = new java.util.ArrayList(secondaryBootDisks_); - bitField1_ |= 0x00000010; + bitField1_ |= 0x00000020; } } @@ -10830,7 +11101,7 @@ public Builder addAllSecondaryBootDisks( public Builder clearSecondaryBootDisks() { if (secondaryBootDisksBuilder_ == null) { secondaryBootDisks_ = java.util.Collections.emptyList(); - bitField1_ = (bitField1_ & ~0x00000010); + bitField1_ = (bitField1_ & ~0x00000020); onChanged(); } else { secondaryBootDisksBuilder_.clear(); @@ -10956,7 +11227,7 @@ public com.google.container.v1.SecondaryBootDisk.Builder addSecondaryBootDisksBu com.google.container.v1.SecondaryBootDisk.Builder, com.google.container.v1.SecondaryBootDiskOrBuilder>( secondaryBootDisks_, - ((bitField1_ & 0x00000010) != 0), + ((bitField1_ & 0x00000020) != 0), getParentForChildren(), isClean()); secondaryBootDisks_ = null; @@ -10985,7 +11256,7 @@ public com.google.container.v1.SecondaryBootDisk.Builder addSecondaryBootDisksBu * @return Whether the secondaryBootDiskUpdateStrategy field is set. */ public boolean hasSecondaryBootDiskUpdateStrategy() { - return ((bitField1_ & 0x00000020) != 0); + return ((bitField1_ & 0x00000040) != 0); } /** * @@ -11031,7 +11302,7 @@ public Builder setSecondaryBootDiskUpdateStrategy( } else { secondaryBootDiskUpdateStrategyBuilder_.setMessage(value); } - bitField1_ |= 0x00000020; + bitField1_ |= 0x00000040; onChanged(); return this; } @@ -11053,7 +11324,7 @@ public Builder setSecondaryBootDiskUpdateStrategy( } else { secondaryBootDiskUpdateStrategyBuilder_.setMessage(builderForValue.build()); } - bitField1_ |= 0x00000020; + bitField1_ |= 0x00000040; onChanged(); return this; } @@ -11071,7 +11342,7 @@ public Builder setSecondaryBootDiskUpdateStrategy( public Builder mergeSecondaryBootDiskUpdateStrategy( com.google.container.v1.SecondaryBootDiskUpdateStrategy value) { if (secondaryBootDiskUpdateStrategyBuilder_ == null) { - if (((bitField1_ & 0x00000020) != 0) + if (((bitField1_ & 0x00000040) != 0) && secondaryBootDiskUpdateStrategy_ != null && secondaryBootDiskUpdateStrategy_ != com.google.container.v1.SecondaryBootDiskUpdateStrategy.getDefaultInstance()) { @@ -11083,7 +11354,7 @@ public Builder mergeSecondaryBootDiskUpdateStrategy( secondaryBootDiskUpdateStrategyBuilder_.mergeFrom(value); } if (secondaryBootDiskUpdateStrategy_ != null) { - bitField1_ |= 0x00000020; + bitField1_ |= 0x00000040; onChanged(); } return this; @@ -11100,7 +11371,7 @@ public Builder mergeSecondaryBootDiskUpdateStrategy( *
*/ public Builder clearSecondaryBootDiskUpdateStrategy() { - bitField1_ = (bitField1_ & ~0x00000020); + bitField1_ = (bitField1_ & ~0x00000040); secondaryBootDiskUpdateStrategy_ = null; if (secondaryBootDiskUpdateStrategyBuilder_ != null) { secondaryBootDiskUpdateStrategyBuilder_.dispose(); @@ -11122,7 +11393,7 @@ public Builder clearSecondaryBootDiskUpdateStrategy() { */ public com.google.container.v1.SecondaryBootDiskUpdateStrategy.Builder getSecondaryBootDiskUpdateStrategyBuilder() { - bitField1_ |= 0x00000020; + bitField1_ |= 0x00000040; onChanged(); return getSecondaryBootDiskUpdateStrategyFieldBuilder().getBuilder(); } diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfigDefaults.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfigDefaults.java index 8e307227f95d..d0930305a4bb 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfigDefaults.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfigDefaults.java @@ -162,6 +162,112 @@ public com.google.container.v1.NodePoolLoggingConfigOrBuilder getLoggingConfigOr : loggingConfig_; } + public static final int CONTAINERD_CONFIG_FIELD_NUMBER = 4; + private com.google.container.v1.ContainerdConfig containerdConfig_; + /** + * + * + *
+   * Parameters for containerd customization.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 4; + * + * @return Whether the containerdConfig field is set. + */ + @java.lang.Override + public boolean hasContainerdConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Parameters for containerd customization.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 4; + * + * @return The containerdConfig. + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfig getContainerdConfig() { + return containerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : containerdConfig_; + } + /** + * + * + *
+   * Parameters for containerd customization.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 4; + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfigOrBuilder getContainerdConfigOrBuilder() { + return containerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : containerdConfig_; + } + + public static final int NODE_KUBELET_CONFIG_FIELD_NUMBER = 6; + private com.google.container.v1.NodeKubeletConfig nodeKubeletConfig_; + /** + * + * + *
+   * NodeKubeletConfig controls the defaults for new node-pools.
+   *
+   * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 6; + * + * @return Whether the nodeKubeletConfig field is set. + */ + @java.lang.Override + public boolean hasNodeKubeletConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * NodeKubeletConfig controls the defaults for new node-pools.
+   *
+   * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 6; + * + * @return The nodeKubeletConfig. + */ + @java.lang.Override + public com.google.container.v1.NodeKubeletConfig getNodeKubeletConfig() { + return nodeKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : nodeKubeletConfig_; + } + /** + * + * + *
+   * NodeKubeletConfig controls the defaults for new node-pools.
+   *
+   * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 6; + */ + @java.lang.Override + public com.google.container.v1.NodeKubeletConfigOrBuilder getNodeKubeletConfigOrBuilder() { + return nodeKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : nodeKubeletConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -182,6 +288,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getLoggingConfig()); } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getContainerdConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(6, getNodeKubeletConfig()); + } getUnknownFields().writeTo(output); } @@ -197,6 +309,12 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLoggingConfig()); } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getContainerdConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getNodeKubeletConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -221,6 +339,14 @@ public boolean equals(final java.lang.Object obj) { if (hasLoggingConfig()) { if (!getLoggingConfig().equals(other.getLoggingConfig())) return false; } + if (hasContainerdConfig() != other.hasContainerdConfig()) return false; + if (hasContainerdConfig()) { + if (!getContainerdConfig().equals(other.getContainerdConfig())) return false; + } + if (hasNodeKubeletConfig() != other.hasNodeKubeletConfig()) return false; + if (hasNodeKubeletConfig()) { + if (!getNodeKubeletConfig().equals(other.getNodeKubeletConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -240,6 +366,14 @@ public int hashCode() { hash = (37 * hash) + LOGGING_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getLoggingConfig().hashCode(); } + if (hasContainerdConfig()) { + hash = (37 * hash) + CONTAINERD_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getContainerdConfig().hashCode(); + } + if (hasNodeKubeletConfig()) { + hash = (37 * hash) + NODE_KUBELET_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNodeKubeletConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -382,6 +516,8 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getGcfsConfigFieldBuilder(); getLoggingConfigFieldBuilder(); + getContainerdConfigFieldBuilder(); + getNodeKubeletConfigFieldBuilder(); } } @@ -399,6 +535,16 @@ public Builder clear() { loggingConfigBuilder_.dispose(); loggingConfigBuilder_ = null; } + containerdConfig_ = null; + if (containerdConfigBuilder_ != null) { + containerdConfigBuilder_.dispose(); + containerdConfigBuilder_ = null; + } + nodeKubeletConfig_ = null; + if (nodeKubeletConfigBuilder_ != null) { + nodeKubeletConfigBuilder_.dispose(); + nodeKubeletConfigBuilder_ = null; + } return this; } @@ -445,6 +591,18 @@ private void buildPartial0(com.google.container.v1.NodeConfigDefaults result) { loggingConfigBuilder_ == null ? loggingConfig_ : loggingConfigBuilder_.build(); to_bitField0_ |= 0x00000002; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.containerdConfig_ = + containerdConfigBuilder_ == null ? containerdConfig_ : containerdConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.nodeKubeletConfig_ = + nodeKubeletConfigBuilder_ == null + ? nodeKubeletConfig_ + : nodeKubeletConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -499,6 +657,12 @@ public Builder mergeFrom(com.google.container.v1.NodeConfigDefaults other) { if (other.hasLoggingConfig()) { mergeLoggingConfig(other.getLoggingConfig()); } + if (other.hasContainerdConfig()) { + mergeContainerdConfig(other.getContainerdConfig()); + } + if (other.hasNodeKubeletConfig()) { + mergeNodeKubeletConfig(other.getNodeKubeletConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -537,6 +701,20 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 26 + case 34: + { + input.readMessage( + getContainerdConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 50: + { + input.readMessage( + getNodeKubeletConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -928,6 +1106,397 @@ public com.google.container.v1.NodePoolLoggingConfigOrBuilder getLoggingConfigOr return loggingConfigBuilder_; } + private com.google.container.v1.ContainerdConfig containerdConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig, + com.google.container.v1.ContainerdConfig.Builder, + com.google.container.v1.ContainerdConfigOrBuilder> + containerdConfigBuilder_; + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 4; + * + * @return Whether the containerdConfig field is set. + */ + public boolean hasContainerdConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 4; + * + * @return The containerdConfig. + */ + public com.google.container.v1.ContainerdConfig getContainerdConfig() { + if (containerdConfigBuilder_ == null) { + return containerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : containerdConfig_; + } else { + return containerdConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 4; + */ + public Builder setContainerdConfig(com.google.container.v1.ContainerdConfig value) { + if (containerdConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + containerdConfig_ = value; + } else { + containerdConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 4; + */ + public Builder setContainerdConfig( + com.google.container.v1.ContainerdConfig.Builder builderForValue) { + if (containerdConfigBuilder_ == null) { + containerdConfig_ = builderForValue.build(); + } else { + containerdConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 4; + */ + public Builder mergeContainerdConfig(com.google.container.v1.ContainerdConfig value) { + if (containerdConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && containerdConfig_ != null + && containerdConfig_ != com.google.container.v1.ContainerdConfig.getDefaultInstance()) { + getContainerdConfigBuilder().mergeFrom(value); + } else { + containerdConfig_ = value; + } + } else { + containerdConfigBuilder_.mergeFrom(value); + } + if (containerdConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 4; + */ + public Builder clearContainerdConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + containerdConfig_ = null; + if (containerdConfigBuilder_ != null) { + containerdConfigBuilder_.dispose(); + containerdConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 4; + */ + public com.google.container.v1.ContainerdConfig.Builder getContainerdConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getContainerdConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 4; + */ + public com.google.container.v1.ContainerdConfigOrBuilder getContainerdConfigOrBuilder() { + if (containerdConfigBuilder_ != null) { + return containerdConfigBuilder_.getMessageOrBuilder(); + } else { + return containerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : containerdConfig_; + } + } + /** + * + * + *
+     * Parameters for containerd customization.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig, + com.google.container.v1.ContainerdConfig.Builder, + com.google.container.v1.ContainerdConfigOrBuilder> + getContainerdConfigFieldBuilder() { + if (containerdConfigBuilder_ == null) { + containerdConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig, + com.google.container.v1.ContainerdConfig.Builder, + com.google.container.v1.ContainerdConfigOrBuilder>( + getContainerdConfig(), getParentForChildren(), isClean()); + containerdConfig_ = null; + } + return containerdConfigBuilder_; + } + + private com.google.container.v1.NodeKubeletConfig nodeKubeletConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.NodeKubeletConfig, + com.google.container.v1.NodeKubeletConfig.Builder, + com.google.container.v1.NodeKubeletConfigOrBuilder> + nodeKubeletConfigBuilder_; + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for new node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 6; + * + * @return Whether the nodeKubeletConfig field is set. + */ + public boolean hasNodeKubeletConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for new node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 6; + * + * @return The nodeKubeletConfig. + */ + public com.google.container.v1.NodeKubeletConfig getNodeKubeletConfig() { + if (nodeKubeletConfigBuilder_ == null) { + return nodeKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : nodeKubeletConfig_; + } else { + return nodeKubeletConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for new node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 6; + */ + public Builder setNodeKubeletConfig(com.google.container.v1.NodeKubeletConfig value) { + if (nodeKubeletConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nodeKubeletConfig_ = value; + } else { + nodeKubeletConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for new node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 6; + */ + public Builder setNodeKubeletConfig( + com.google.container.v1.NodeKubeletConfig.Builder builderForValue) { + if (nodeKubeletConfigBuilder_ == null) { + nodeKubeletConfig_ = builderForValue.build(); + } else { + nodeKubeletConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for new node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 6; + */ + public Builder mergeNodeKubeletConfig(com.google.container.v1.NodeKubeletConfig value) { + if (nodeKubeletConfigBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && nodeKubeletConfig_ != null + && nodeKubeletConfig_ + != com.google.container.v1.NodeKubeletConfig.getDefaultInstance()) { + getNodeKubeletConfigBuilder().mergeFrom(value); + } else { + nodeKubeletConfig_ = value; + } + } else { + nodeKubeletConfigBuilder_.mergeFrom(value); + } + if (nodeKubeletConfig_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for new node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 6; + */ + public Builder clearNodeKubeletConfig() { + bitField0_ = (bitField0_ & ~0x00000008); + nodeKubeletConfig_ = null; + if (nodeKubeletConfigBuilder_ != null) { + nodeKubeletConfigBuilder_.dispose(); + nodeKubeletConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for new node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 6; + */ + public com.google.container.v1.NodeKubeletConfig.Builder getNodeKubeletConfigBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getNodeKubeletConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for new node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 6; + */ + public com.google.container.v1.NodeKubeletConfigOrBuilder getNodeKubeletConfigOrBuilder() { + if (nodeKubeletConfigBuilder_ != null) { + return nodeKubeletConfigBuilder_.getMessageOrBuilder(); + } else { + return nodeKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : nodeKubeletConfig_; + } + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for new node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.NodeKubeletConfig, + com.google.container.v1.NodeKubeletConfig.Builder, + com.google.container.v1.NodeKubeletConfigOrBuilder> + getNodeKubeletConfigFieldBuilder() { + if (nodeKubeletConfigBuilder_ == null) { + nodeKubeletConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.NodeKubeletConfig, + com.google.container.v1.NodeKubeletConfig.Builder, + com.google.container.v1.NodeKubeletConfigOrBuilder>( + getNodeKubeletConfig(), getParentForChildren(), isClean()); + nodeKubeletConfig_ = null; + } + return nodeKubeletConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfigDefaultsOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfigDefaultsOrBuilder.java index 64b786a31788..a8cc4f005a01 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfigDefaultsOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfigDefaultsOrBuilder.java @@ -93,4 +93,80 @@ public interface NodeConfigDefaultsOrBuilder * .google.container.v1.NodePoolLoggingConfig logging_config = 3; */ com.google.container.v1.NodePoolLoggingConfigOrBuilder getLoggingConfigOrBuilder(); + + /** + * + * + *
+   * Parameters for containerd customization.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 4; + * + * @return Whether the containerdConfig field is set. + */ + boolean hasContainerdConfig(); + /** + * + * + *
+   * Parameters for containerd customization.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 4; + * + * @return The containerdConfig. + */ + com.google.container.v1.ContainerdConfig getContainerdConfig(); + /** + * + * + *
+   * Parameters for containerd customization.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 4; + */ + com.google.container.v1.ContainerdConfigOrBuilder getContainerdConfigOrBuilder(); + + /** + * + * + *
+   * NodeKubeletConfig controls the defaults for new node-pools.
+   *
+   * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 6; + * + * @return Whether the nodeKubeletConfig field is set. + */ + boolean hasNodeKubeletConfig(); + /** + * + * + *
+   * NodeKubeletConfig controls the defaults for new node-pools.
+   *
+   * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 6; + * + * @return The nodeKubeletConfig. + */ + com.google.container.v1.NodeKubeletConfig getNodeKubeletConfig(); + /** + * + * + *
+   * NodeKubeletConfig controls the defaults for new node-pools.
+   *
+   * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 6; + */ + com.google.container.v1.NodeKubeletConfigOrBuilder getNodeKubeletConfigOrBuilder(); } diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfigOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfigOrBuilder.java index f9b610877ef8..83fcef36cbe2 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfigOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodeConfigOrBuilder.java @@ -1563,6 +1563,41 @@ java.lang.String getResourceLabelsOrDefault( */ com.google.container.v1.SoleTenantConfigOrBuilder getSoleTenantConfigOrBuilder(); + /** + * + * + *
+   * Parameters for containerd customization.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 43; + * + * @return Whether the containerdConfig field is set. + */ + boolean hasContainerdConfig(); + /** + * + * + *
+   * Parameters for containerd customization.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 43; + * + * @return The containerdConfig. + */ + com.google.container.v1.ContainerdConfig getContainerdConfig(); + /** + * + * + *
+   * Parameters for containerd customization.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 43; + */ + com.google.container.v1.ContainerdConfigOrBuilder getContainerdConfigOrBuilder(); + /** * * diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePool.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePool.java index 45b49ca8a3f6..5697554cffad 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePool.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePool.java @@ -6686,7 +6686,7 @@ public com.google.container.v1.NodePool.Status getStatus() { * string status_message = 104 [deprecated = true]; * * @deprecated google.container.v1.NodePool.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=3572 + * google/container/v1/cluster_service.proto;l=3686 * @return The statusMessage. */ @java.lang.Override @@ -6714,7 +6714,7 @@ public java.lang.String getStatusMessage() { * string status_message = 104 [deprecated = true]; * * @deprecated google.container.v1.NodePool.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=3572 + * google/container/v1/cluster_service.proto;l=3686 * @return The bytes for statusMessage. */ @java.lang.Override @@ -9638,7 +9638,7 @@ public Builder clearStatus() { * string status_message = 104 [deprecated = true]; * * @deprecated google.container.v1.NodePool.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=3572 + * google/container/v1/cluster_service.proto;l=3686 * @return The statusMessage. */ @java.lang.Deprecated @@ -9665,7 +9665,7 @@ public java.lang.String getStatusMessage() { * string status_message = 104 [deprecated = true]; * * @deprecated google.container.v1.NodePool.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=3572 + * google/container/v1/cluster_service.proto;l=3686 * @return The bytes for statusMessage. */ @java.lang.Deprecated @@ -9692,7 +9692,7 @@ public com.google.protobuf.ByteString getStatusMessageBytes() { * string status_message = 104 [deprecated = true]; * * @deprecated google.container.v1.NodePool.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=3572 + * google/container/v1/cluster_service.proto;l=3686 * @param value The statusMessage to set. * @return This builder for chaining. */ @@ -9718,7 +9718,7 @@ public Builder setStatusMessage(java.lang.String value) { * string status_message = 104 [deprecated = true]; * * @deprecated google.container.v1.NodePool.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=3572 + * google/container/v1/cluster_service.proto;l=3686 * @return This builder for chaining. */ @java.lang.Deprecated @@ -9740,7 +9740,7 @@ public Builder clearStatusMessage() { * string status_message = 104 [deprecated = true]; * * @deprecated google.container.v1.NodePool.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=3572 + * google/container/v1/cluster_service.proto;l=3686 * @param value The bytes for statusMessage to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePoolAutoConfig.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePoolAutoConfig.java index 1cfd8b8ef04e..a079e4c1350b 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePoolAutoConfig.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePoolAutoConfig.java @@ -175,6 +175,62 @@ public com.google.container.v1.ResourceManagerTagsOrBuilder getResourceManagerTa : resourceManagerTags_; } + public static final int NODE_KUBELET_CONFIG_FIELD_NUMBER = 3; + private com.google.container.v1.NodeKubeletConfig nodeKubeletConfig_; + /** + * + * + *
+   * NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
+   *
+   * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 3; + * + * @return Whether the nodeKubeletConfig field is set. + */ + @java.lang.Override + public boolean hasNodeKubeletConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
+   *
+   * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 3; + * + * @return The nodeKubeletConfig. + */ + @java.lang.Override + public com.google.container.v1.NodeKubeletConfig getNodeKubeletConfig() { + return nodeKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : nodeKubeletConfig_; + } + /** + * + * + *
+   * NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
+   *
+   * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 3; + */ + @java.lang.Override + public com.google.container.v1.NodeKubeletConfigOrBuilder getNodeKubeletConfigOrBuilder() { + return nodeKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : nodeKubeletConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -195,6 +251,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getResourceManagerTags()); } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getNodeKubeletConfig()); + } getUnknownFields().writeTo(output); } @@ -210,6 +269,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResourceManagerTags()); } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNodeKubeletConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -234,6 +296,10 @@ public boolean equals(final java.lang.Object obj) { if (hasResourceManagerTags()) { if (!getResourceManagerTags().equals(other.getResourceManagerTags())) return false; } + if (hasNodeKubeletConfig() != other.hasNodeKubeletConfig()) return false; + if (hasNodeKubeletConfig()) { + if (!getNodeKubeletConfig().equals(other.getNodeKubeletConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -253,6 +319,10 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_MANAGER_TAGS_FIELD_NUMBER; hash = (53 * hash) + getResourceManagerTags().hashCode(); } + if (hasNodeKubeletConfig()) { + hash = (37 * hash) + NODE_KUBELET_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNodeKubeletConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -396,6 +466,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getNetworkTagsFieldBuilder(); getResourceManagerTagsFieldBuilder(); + getNodeKubeletConfigFieldBuilder(); } } @@ -413,6 +484,11 @@ public Builder clear() { resourceManagerTagsBuilder_.dispose(); resourceManagerTagsBuilder_ = null; } + nodeKubeletConfig_ = null; + if (nodeKubeletConfigBuilder_ != null) { + nodeKubeletConfigBuilder_.dispose(); + nodeKubeletConfigBuilder_ = null; + } return this; } @@ -462,6 +538,13 @@ private void buildPartial0(com.google.container.v1.NodePoolAutoConfig result) { : resourceManagerTagsBuilder_.build(); to_bitField0_ |= 0x00000002; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.nodeKubeletConfig_ = + nodeKubeletConfigBuilder_ == null + ? nodeKubeletConfig_ + : nodeKubeletConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } result.bitField0_ |= to_bitField0_; } @@ -516,6 +599,9 @@ public Builder mergeFrom(com.google.container.v1.NodePoolAutoConfig other) { if (other.hasResourceManagerTags()) { mergeResourceManagerTags(other.getResourceManagerTags()); } + if (other.hasNodeKubeletConfig()) { + mergeNodeKubeletConfig(other.getNodeKubeletConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -555,6 +641,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 26: + { + input.readMessage( + getNodeKubeletConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -982,6 +1075,211 @@ public com.google.container.v1.ResourceManagerTagsOrBuilder getResourceManagerTa return resourceManagerTagsBuilder_; } + private com.google.container.v1.NodeKubeletConfig nodeKubeletConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.NodeKubeletConfig, + com.google.container.v1.NodeKubeletConfig.Builder, + com.google.container.v1.NodeKubeletConfigOrBuilder> + nodeKubeletConfigBuilder_; + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 3; + * + * @return Whether the nodeKubeletConfig field is set. + */ + public boolean hasNodeKubeletConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 3; + * + * @return The nodeKubeletConfig. + */ + public com.google.container.v1.NodeKubeletConfig getNodeKubeletConfig() { + if (nodeKubeletConfigBuilder_ == null) { + return nodeKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : nodeKubeletConfig_; + } else { + return nodeKubeletConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 3; + */ + public Builder setNodeKubeletConfig(com.google.container.v1.NodeKubeletConfig value) { + if (nodeKubeletConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nodeKubeletConfig_ = value; + } else { + nodeKubeletConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 3; + */ + public Builder setNodeKubeletConfig( + com.google.container.v1.NodeKubeletConfig.Builder builderForValue) { + if (nodeKubeletConfigBuilder_ == null) { + nodeKubeletConfig_ = builderForValue.build(); + } else { + nodeKubeletConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 3; + */ + public Builder mergeNodeKubeletConfig(com.google.container.v1.NodeKubeletConfig value) { + if (nodeKubeletConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && nodeKubeletConfig_ != null + && nodeKubeletConfig_ + != com.google.container.v1.NodeKubeletConfig.getDefaultInstance()) { + getNodeKubeletConfigBuilder().mergeFrom(value); + } else { + nodeKubeletConfig_ = value; + } + } else { + nodeKubeletConfigBuilder_.mergeFrom(value); + } + if (nodeKubeletConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 3; + */ + public Builder clearNodeKubeletConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + nodeKubeletConfig_ = null; + if (nodeKubeletConfigBuilder_ != null) { + nodeKubeletConfigBuilder_.dispose(); + nodeKubeletConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 3; + */ + public com.google.container.v1.NodeKubeletConfig.Builder getNodeKubeletConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNodeKubeletConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 3; + */ + public com.google.container.v1.NodeKubeletConfigOrBuilder getNodeKubeletConfigOrBuilder() { + if (nodeKubeletConfigBuilder_ != null) { + return nodeKubeletConfigBuilder_.getMessageOrBuilder(); + } else { + return nodeKubeletConfig_ == null + ? com.google.container.v1.NodeKubeletConfig.getDefaultInstance() + : nodeKubeletConfig_; + } + } + /** + * + * + *
+     * NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
+     *
+     * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+     * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.NodeKubeletConfig, + com.google.container.v1.NodeKubeletConfig.Builder, + com.google.container.v1.NodeKubeletConfigOrBuilder> + getNodeKubeletConfigFieldBuilder() { + if (nodeKubeletConfigBuilder_ == null) { + nodeKubeletConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.NodeKubeletConfig, + com.google.container.v1.NodeKubeletConfig.Builder, + com.google.container.v1.NodeKubeletConfigOrBuilder>( + getNodeKubeletConfig(), getParentForChildren(), isClean()); + nodeKubeletConfig_ = null; + } + return nodeKubeletConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePoolAutoConfigOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePoolAutoConfigOrBuilder.java index 68c16872b3c2..090df4897c06 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePoolAutoConfigOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePoolAutoConfigOrBuilder.java @@ -105,4 +105,45 @@ public interface NodePoolAutoConfigOrBuilder * .google.container.v1.ResourceManagerTags resource_manager_tags = 2; */ com.google.container.v1.ResourceManagerTagsOrBuilder getResourceManagerTagsOrBuilder(); + + /** + * + * + *
+   * NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
+   *
+   * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 3; + * + * @return Whether the nodeKubeletConfig field is set. + */ + boolean hasNodeKubeletConfig(); + /** + * + * + *
+   * NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
+   *
+   * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 3; + * + * @return The nodeKubeletConfig. + */ + com.google.container.v1.NodeKubeletConfig getNodeKubeletConfig(); + /** + * + * + *
+   * NodeKubeletConfig controls the defaults for autoprovisioned node-pools.
+   *
+   * Currently only `insecure_kubelet_readonly_port_enabled` can be set here.
+   * 
+ * + * .google.container.v1.NodeKubeletConfig node_kubelet_config = 3; + */ + com.google.container.v1.NodeKubeletConfigOrBuilder getNodeKubeletConfigOrBuilder(); } diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePoolOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePoolOrBuilder.java index d94929bee254..14d8bb6083fb 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePoolOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/NodePoolOrBuilder.java @@ -383,7 +383,7 @@ public interface NodePoolOrBuilder * string status_message = 104 [deprecated = true]; * * @deprecated google.container.v1.NodePool.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=3572 + * google/container/v1/cluster_service.proto;l=3686 * @return The statusMessage. */ @java.lang.Deprecated @@ -400,7 +400,7 @@ public interface NodePoolOrBuilder * string status_message = 104 [deprecated = true]; * * @deprecated google.container.v1.NodePool.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=3572 + * google/container/v1/cluster_service.proto;l=3686 * @return The bytes for statusMessage. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/Operation.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/Operation.java index a0904a2cd87f..7910f928c2bd 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/Operation.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/Operation.java @@ -989,7 +989,7 @@ public com.google.protobuf.ByteString getNameBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.Operation.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2475 + * google/container/v1/cluster_service.proto;l=2579 * @return The zone. */ @java.lang.Override @@ -1017,7 +1017,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.Operation.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2475 + * google/container/v1/cluster_service.proto;l=2579 * @return The bytes for zone. */ @java.lang.Override @@ -1172,7 +1172,7 @@ public com.google.protobuf.ByteString getDetailBytes() { *
* * @deprecated google.container.v1.Operation.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=2488 + * google/container/v1/cluster_service.proto;l=2592 * @return The statusMessage. */ @java.lang.Override @@ -1201,7 +1201,7 @@ public java.lang.String getStatusMessage() { *
* * @deprecated google.container.v1.Operation.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=2488 + * google/container/v1/cluster_service.proto;l=2592 * @return The bytes for statusMessage. */ @java.lang.Override @@ -2712,7 +2712,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.Operation.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2475 + * google/container/v1/cluster_service.proto;l=2579 * @return The zone. */ @java.lang.Deprecated @@ -2739,7 +2739,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.Operation.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2475 + * google/container/v1/cluster_service.proto;l=2579 * @return The bytes for zone. */ @java.lang.Deprecated @@ -2766,7 +2766,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.Operation.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2475 + * google/container/v1/cluster_service.proto;l=2579 * @param value The zone to set. * @return This builder for chaining. */ @@ -2792,7 +2792,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.Operation.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2475 + * google/container/v1/cluster_service.proto;l=2579 * @return This builder for chaining. */ @java.lang.Deprecated @@ -2814,7 +2814,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.Operation.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2475 + * google/container/v1/cluster_service.proto;l=2579 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -3130,7 +3130,7 @@ public Builder setDetailBytes(com.google.protobuf.ByteString value) { *
* * @deprecated google.container.v1.Operation.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=2488 + * google/container/v1/cluster_service.proto;l=2592 * @return The statusMessage. */ @java.lang.Deprecated @@ -3158,7 +3158,7 @@ public java.lang.String getStatusMessage() { *
* * @deprecated google.container.v1.Operation.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=2488 + * google/container/v1/cluster_service.proto;l=2592 * @return The bytes for statusMessage. */ @java.lang.Deprecated @@ -3186,7 +3186,7 @@ public com.google.protobuf.ByteString getStatusMessageBytes() { *
* * @deprecated google.container.v1.Operation.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=2488 + * google/container/v1/cluster_service.proto;l=2592 * @param value The statusMessage to set. * @return This builder for chaining. */ @@ -3213,7 +3213,7 @@ public Builder setStatusMessage(java.lang.String value) { *
* * @deprecated google.container.v1.Operation.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=2488 + * google/container/v1/cluster_service.proto;l=2592 * @return This builder for chaining. */ @java.lang.Deprecated @@ -3236,7 +3236,7 @@ public Builder clearStatusMessage() { *
* * @deprecated google.container.v1.Operation.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=2488 + * google/container/v1/cluster_service.proto;l=2592 * @param value The bytes for statusMessage to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/OperationOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/OperationOrBuilder.java index e2520171eda2..7b7b6d6c458a 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/OperationOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/OperationOrBuilder.java @@ -61,7 +61,7 @@ public interface OperationOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.Operation.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2475 + * google/container/v1/cluster_service.proto;l=2579 * @return The zone. */ @java.lang.Deprecated @@ -78,7 +78,7 @@ public interface OperationOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.Operation.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2475 + * google/container/v1/cluster_service.proto;l=2579 * @return The bytes for zone. */ @java.lang.Deprecated @@ -172,7 +172,7 @@ public interface OperationOrBuilder *
* * @deprecated google.container.v1.Operation.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=2488 + * google/container/v1/cluster_service.proto;l=2592 * @return The statusMessage. */ @java.lang.Deprecated @@ -190,7 +190,7 @@ public interface OperationOrBuilder *
* * @deprecated google.container.v1.Operation.status_message is deprecated. See - * google/container/v1/cluster_service.proto;l=2488 + * google/container/v1/cluster_service.proto;l=2592 * @return The bytes for statusMessage. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/RollbackNodePoolUpgradeRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/RollbackNodePoolUpgradeRequest.java index 3d018c35850b..08b7685cbb03 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/RollbackNodePoolUpgradeRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/RollbackNodePoolUpgradeRequest.java @@ -86,7 +86,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3858 + * google/container/v1/cluster_service.proto;l=3972 * @return The projectId. */ @java.lang.Override @@ -114,7 +114,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3858 + * google/container/v1/cluster_service.proto;l=3972 * @return The bytes for projectId. */ @java.lang.Override @@ -148,7 +148,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3864 + * google/container/v1/cluster_service.proto;l=3978 * @return The zone. */ @java.lang.Override @@ -177,7 +177,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3864 + * google/container/v1/cluster_service.proto;l=3978 * @return The bytes for zone. */ @java.lang.Override @@ -209,7 +209,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3868 + * google/container/v1/cluster_service.proto;l=3982 * @return The clusterId. */ @java.lang.Override @@ -236,7 +236,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3868 + * google/container/v1/cluster_service.proto;l=3982 * @return The bytes for clusterId. */ @java.lang.Override @@ -268,7 +268,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3872 + * google/container/v1/cluster_service.proto;l=3986 * @return The nodePoolId. */ @java.lang.Override @@ -295,7 +295,7 @@ public java.lang.String getNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3872 + * google/container/v1/cluster_service.proto;l=3986 * @return The bytes for nodePoolId. */ @java.lang.Override @@ -862,7 +862,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3858 + * google/container/v1/cluster_service.proto;l=3972 * @return The projectId. */ @java.lang.Deprecated @@ -889,7 +889,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3858 + * google/container/v1/cluster_service.proto;l=3972 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -916,7 +916,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3858 + * google/container/v1/cluster_service.proto;l=3972 * @param value The projectId to set. * @return This builder for chaining. */ @@ -942,7 +942,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3858 + * google/container/v1/cluster_service.proto;l=3972 * @return This builder for chaining. */ @java.lang.Deprecated @@ -964,7 +964,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3858 + * google/container/v1/cluster_service.proto;l=3972 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -994,7 +994,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3864 + * google/container/v1/cluster_service.proto;l=3978 * @return The zone. */ @java.lang.Deprecated @@ -1022,7 +1022,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3864 + * google/container/v1/cluster_service.proto;l=3978 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1050,7 +1050,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3864 + * google/container/v1/cluster_service.proto;l=3978 * @param value The zone to set. * @return This builder for chaining. */ @@ -1077,7 +1077,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3864 + * google/container/v1/cluster_service.proto;l=3978 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1100,7 +1100,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3864 + * google/container/v1/cluster_service.proto;l=3978 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1128,7 +1128,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3868 + * google/container/v1/cluster_service.proto;l=3982 * @return The clusterId. */ @java.lang.Deprecated @@ -1154,7 +1154,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3868 + * google/container/v1/cluster_service.proto;l=3982 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1180,7 +1180,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3868 + * google/container/v1/cluster_service.proto;l=3982 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1205,7 +1205,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3868 + * google/container/v1/cluster_service.proto;l=3982 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1226,7 +1226,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3868 + * google/container/v1/cluster_service.proto;l=3982 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ @@ -1254,7 +1254,7 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.node_pool_id is deprecated. - * See google/container/v1/cluster_service.proto;l=3872 + * See google/container/v1/cluster_service.proto;l=3986 * @return The nodePoolId. */ @java.lang.Deprecated @@ -1280,7 +1280,7 @@ public java.lang.String getNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.node_pool_id is deprecated. - * See google/container/v1/cluster_service.proto;l=3872 + * See google/container/v1/cluster_service.proto;l=3986 * @return The bytes for nodePoolId. */ @java.lang.Deprecated @@ -1306,7 +1306,7 @@ public com.google.protobuf.ByteString getNodePoolIdBytes() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.node_pool_id is deprecated. - * See google/container/v1/cluster_service.proto;l=3872 + * See google/container/v1/cluster_service.proto;l=3986 * @param value The nodePoolId to set. * @return This builder for chaining. */ @@ -1331,7 +1331,7 @@ public Builder setNodePoolId(java.lang.String value) { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.node_pool_id is deprecated. - * See google/container/v1/cluster_service.proto;l=3872 + * See google/container/v1/cluster_service.proto;l=3986 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1352,7 +1352,7 @@ public Builder clearNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.node_pool_id is deprecated. - * See google/container/v1/cluster_service.proto;l=3872 + * See google/container/v1/cluster_service.proto;l=3986 * @param value The bytes for nodePoolId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/RollbackNodePoolUpgradeRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/RollbackNodePoolUpgradeRequestOrBuilder.java index 55a9b2228b56..71e8ee5158e2 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/RollbackNodePoolUpgradeRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/RollbackNodePoolUpgradeRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface RollbackNodePoolUpgradeRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3858 + * google/container/v1/cluster_service.proto;l=3972 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface RollbackNodePoolUpgradeRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3858 + * google/container/v1/cluster_service.proto;l=3972 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface RollbackNodePoolUpgradeRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3864 + * google/container/v1/cluster_service.proto;l=3978 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface RollbackNodePoolUpgradeRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3864 + * google/container/v1/cluster_service.proto;l=3978 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface RollbackNodePoolUpgradeRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3868 + * google/container/v1/cluster_service.proto;l=3982 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface RollbackNodePoolUpgradeRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3868 + * google/container/v1/cluster_service.proto;l=3982 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -140,7 +140,7 @@ public interface RollbackNodePoolUpgradeRequestOrBuilder * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3872 + * google/container/v1/cluster_service.proto;l=3986 * @return The nodePoolId. */ @java.lang.Deprecated @@ -156,7 +156,7 @@ public interface RollbackNodePoolUpgradeRequestOrBuilder * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.RollbackNodePoolUpgradeRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3872 + * google/container/v1/cluster_service.proto;l=3986 * @return The bytes for nodePoolId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SecurityPostureConfig.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SecurityPostureConfig.java index ad9001edf8d5..1507bf8c7130 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SecurityPostureConfig.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SecurityPostureConfig.java @@ -105,6 +105,16 @@ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { * BASIC = 2; */ BASIC(2), + /** + * + * + *
+     * Applies the Security Posture off cluster Enterprise level features.
+     * 
+ * + * ENTERPRISE = 3; + */ + ENTERPRISE(3), UNRECOGNIZED(-1), ; @@ -138,6 +148,16 @@ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { * BASIC = 2; */ public static final int BASIC_VALUE = 2; + /** + * + * + *
+     * Applies the Security Posture off cluster Enterprise level features.
+     * 
+ * + * ENTERPRISE = 3; + */ + public static final int ENTERPRISE_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -169,6 +189,8 @@ public static Mode forNumber(int value) { return DISABLED; case 2: return BASIC; + case 3: + return ENTERPRISE; default: return null; } diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetAddonsConfigRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetAddonsConfigRequest.java index 4bfc7c733d14..f24882c440a7 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetAddonsConfigRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetAddonsConfigRequest.java @@ -83,7 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2892 + * google/container/v1/cluster_service.proto;l=3006 * @return The projectId. */ @java.lang.Override @@ -111,7 +111,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2892 + * google/container/v1/cluster_service.proto;l=3006 * @return The bytes for projectId. */ @java.lang.Override @@ -145,7 +145,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2898 + * google/container/v1/cluster_service.proto;l=3012 * @return The zone. */ @java.lang.Override @@ -174,7 +174,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2898 + * google/container/v1/cluster_service.proto;l=3012 * @return The bytes for zone. */ @java.lang.Override @@ -206,7 +206,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2902 + * google/container/v1/cluster_service.proto;l=3016 * @return The clusterId. */ @java.lang.Override @@ -233,7 +233,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2902 + * google/container/v1/cluster_service.proto;l=3016 * @return The bytes for clusterId. */ @java.lang.Override @@ -832,7 +832,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2892 + * google/container/v1/cluster_service.proto;l=3006 * @return The projectId. */ @java.lang.Deprecated @@ -859,7 +859,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2892 + * google/container/v1/cluster_service.proto;l=3006 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -886,7 +886,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2892 + * google/container/v1/cluster_service.proto;l=3006 * @param value The projectId to set. * @return This builder for chaining. */ @@ -912,7 +912,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2892 + * google/container/v1/cluster_service.proto;l=3006 * @return This builder for chaining. */ @java.lang.Deprecated @@ -934,7 +934,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2892 + * google/container/v1/cluster_service.proto;l=3006 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -964,7 +964,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2898 + * google/container/v1/cluster_service.proto;l=3012 * @return The zone. */ @java.lang.Deprecated @@ -992,7 +992,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2898 + * google/container/v1/cluster_service.proto;l=3012 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1020,7 +1020,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2898 + * google/container/v1/cluster_service.proto;l=3012 * @param value The zone to set. * @return This builder for chaining. */ @@ -1047,7 +1047,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2898 + * google/container/v1/cluster_service.proto;l=3012 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1070,7 +1070,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2898 + * google/container/v1/cluster_service.proto;l=3012 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1098,7 +1098,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2902 + * google/container/v1/cluster_service.proto;l=3016 * @return The clusterId. */ @java.lang.Deprecated @@ -1124,7 +1124,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2902 + * google/container/v1/cluster_service.proto;l=3016 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1150,7 +1150,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2902 + * google/container/v1/cluster_service.proto;l=3016 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1175,7 +1175,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2902 + * google/container/v1/cluster_service.proto;l=3016 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1196,7 +1196,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2902 + * google/container/v1/cluster_service.proto;l=3016 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetAddonsConfigRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetAddonsConfigRequestOrBuilder.java index 4e67f73bd998..404b154337e0 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetAddonsConfigRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetAddonsConfigRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface SetAddonsConfigRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2892 + * google/container/v1/cluster_service.proto;l=3006 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface SetAddonsConfigRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2892 + * google/container/v1/cluster_service.proto;l=3006 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface SetAddonsConfigRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2898 + * google/container/v1/cluster_service.proto;l=3012 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface SetAddonsConfigRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2898 + * google/container/v1/cluster_service.proto;l=3012 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface SetAddonsConfigRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2902 + * google/container/v1/cluster_service.proto;l=3016 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface SetAddonsConfigRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetAddonsConfigRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2902 + * google/container/v1/cluster_service.proto;l=3016 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLabelsRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLabelsRequest.java index 2fdcf81483ac..edce8991a1aa 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLabelsRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLabelsRequest.java @@ -97,7 +97,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4054 + * google/container/v1/cluster_service.proto;l=4168 * @return The projectId. */ @java.lang.Override @@ -125,7 +125,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4054 + * google/container/v1/cluster_service.proto;l=4168 * @return The bytes for projectId. */ @java.lang.Override @@ -159,7 +159,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4060 + * google/container/v1/cluster_service.proto;l=4174 * @return The zone. */ @java.lang.Override @@ -188,7 +188,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4060 + * google/container/v1/cluster_service.proto;l=4174 * @return The bytes for zone. */ @java.lang.Override @@ -220,7 +220,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4064 + * google/container/v1/cluster_service.proto;l=4178 * @return The clusterId. */ @java.lang.Override @@ -247,7 +247,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4064 + * google/container/v1/cluster_service.proto;l=4178 * @return The bytes for clusterId. */ @java.lang.Override @@ -995,7 +995,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4054 + * google/container/v1/cluster_service.proto;l=4168 * @return The projectId. */ @java.lang.Deprecated @@ -1022,7 +1022,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4054 + * google/container/v1/cluster_service.proto;l=4168 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -1049,7 +1049,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4054 + * google/container/v1/cluster_service.proto;l=4168 * @param value The projectId to set. * @return This builder for chaining. */ @@ -1075,7 +1075,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4054 + * google/container/v1/cluster_service.proto;l=4168 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1097,7 +1097,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4054 + * google/container/v1/cluster_service.proto;l=4168 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -1127,7 +1127,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4060 + * google/container/v1/cluster_service.proto;l=4174 * @return The zone. */ @java.lang.Deprecated @@ -1155,7 +1155,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4060 + * google/container/v1/cluster_service.proto;l=4174 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1183,7 +1183,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4060 + * google/container/v1/cluster_service.proto;l=4174 * @param value The zone to set. * @return This builder for chaining. */ @@ -1210,7 +1210,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4060 + * google/container/v1/cluster_service.proto;l=4174 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1233,7 +1233,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4060 + * google/container/v1/cluster_service.proto;l=4174 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1261,7 +1261,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4064 + * google/container/v1/cluster_service.proto;l=4178 * @return The clusterId. */ @java.lang.Deprecated @@ -1287,7 +1287,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4064 + * google/container/v1/cluster_service.proto;l=4178 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1313,7 +1313,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4064 + * google/container/v1/cluster_service.proto;l=4178 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1338,7 +1338,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4064 + * google/container/v1/cluster_service.proto;l=4178 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1359,7 +1359,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4064 + * google/container/v1/cluster_service.proto;l=4178 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLabelsRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLabelsRequestOrBuilder.java index 9cbdd9d4ac06..12ecfa8aaef8 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLabelsRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLabelsRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface SetLabelsRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4054 + * google/container/v1/cluster_service.proto;l=4168 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface SetLabelsRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4054 + * google/container/v1/cluster_service.proto;l=4168 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface SetLabelsRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4060 + * google/container/v1/cluster_service.proto;l=4174 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface SetLabelsRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4060 + * google/container/v1/cluster_service.proto;l=4174 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface SetLabelsRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4064 + * google/container/v1/cluster_service.proto;l=4178 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface SetLabelsRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLabelsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4064 + * google/container/v1/cluster_service.proto;l=4178 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLegacyAbacRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLegacyAbacRequest.java index cf9198657282..89a8b1afc82b 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLegacyAbacRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLegacyAbacRequest.java @@ -83,7 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4089 + * google/container/v1/cluster_service.proto;l=4203 * @return The projectId. */ @java.lang.Override @@ -111,7 +111,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4089 + * google/container/v1/cluster_service.proto;l=4203 * @return The bytes for projectId. */ @java.lang.Override @@ -145,7 +145,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4095 + * google/container/v1/cluster_service.proto;l=4209 * @return The zone. */ @java.lang.Override @@ -174,7 +174,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4095 + * google/container/v1/cluster_service.proto;l=4209 * @return The bytes for zone. */ @java.lang.Override @@ -206,7 +206,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4099 + * google/container/v1/cluster_service.proto;l=4213 * @return The clusterId. */ @java.lang.Override @@ -233,7 +233,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4099 + * google/container/v1/cluster_service.proto;l=4213 * @return The bytes for clusterId. */ @java.lang.Override @@ -770,7 +770,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4089 + * google/container/v1/cluster_service.proto;l=4203 * @return The projectId. */ @java.lang.Deprecated @@ -797,7 +797,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4089 + * google/container/v1/cluster_service.proto;l=4203 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -824,7 +824,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4089 + * google/container/v1/cluster_service.proto;l=4203 * @param value The projectId to set. * @return This builder for chaining. */ @@ -850,7 +850,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4089 + * google/container/v1/cluster_service.proto;l=4203 * @return This builder for chaining. */ @java.lang.Deprecated @@ -872,7 +872,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4089 + * google/container/v1/cluster_service.proto;l=4203 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -902,7 +902,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4095 + * google/container/v1/cluster_service.proto;l=4209 * @return The zone. */ @java.lang.Deprecated @@ -930,7 +930,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4095 + * google/container/v1/cluster_service.proto;l=4209 * @return The bytes for zone. */ @java.lang.Deprecated @@ -958,7 +958,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4095 + * google/container/v1/cluster_service.proto;l=4209 * @param value The zone to set. * @return This builder for chaining. */ @@ -985,7 +985,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4095 + * google/container/v1/cluster_service.proto;l=4209 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1008,7 +1008,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4095 + * google/container/v1/cluster_service.proto;l=4209 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1036,7 +1036,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4099 + * google/container/v1/cluster_service.proto;l=4213 * @return The clusterId. */ @java.lang.Deprecated @@ -1062,7 +1062,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4099 + * google/container/v1/cluster_service.proto;l=4213 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1088,7 +1088,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4099 + * google/container/v1/cluster_service.proto;l=4213 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1113,7 +1113,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4099 + * google/container/v1/cluster_service.proto;l=4213 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1134,7 +1134,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4099 + * google/container/v1/cluster_service.proto;l=4213 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLegacyAbacRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLegacyAbacRequestOrBuilder.java index 1dc70de779d7..a285277bbb14 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLegacyAbacRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLegacyAbacRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface SetLegacyAbacRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4089 + * google/container/v1/cluster_service.proto;l=4203 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface SetLegacyAbacRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4089 + * google/container/v1/cluster_service.proto;l=4203 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface SetLegacyAbacRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4095 + * google/container/v1/cluster_service.proto;l=4209 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface SetLegacyAbacRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4095 + * google/container/v1/cluster_service.proto;l=4209 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface SetLegacyAbacRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4099 + * google/container/v1/cluster_service.proto;l=4213 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface SetLegacyAbacRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLegacyAbacRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4099 + * google/container/v1/cluster_service.proto;l=4213 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLocationsRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLocationsRequest.java index 201954e51cf3..a54feb81a337 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLocationsRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLocationsRequest.java @@ -83,7 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2918 + * google/container/v1/cluster_service.proto;l=3032 * @return The projectId. */ @java.lang.Override @@ -111,7 +111,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2918 + * google/container/v1/cluster_service.proto;l=3032 * @return The bytes for projectId. */ @java.lang.Override @@ -145,7 +145,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2924 + * google/container/v1/cluster_service.proto;l=3038 * @return The zone. */ @java.lang.Override @@ -174,7 +174,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2924 + * google/container/v1/cluster_service.proto;l=3038 * @return The bytes for zone. */ @java.lang.Override @@ -206,7 +206,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2928 + * google/container/v1/cluster_service.proto;l=3042 * @return The clusterId. */ @java.lang.Override @@ -233,7 +233,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2928 + * google/container/v1/cluster_service.proto;l=3042 * @return The bytes for clusterId. */ @java.lang.Override @@ -855,7 +855,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2918 + * google/container/v1/cluster_service.proto;l=3032 * @return The projectId. */ @java.lang.Deprecated @@ -882,7 +882,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2918 + * google/container/v1/cluster_service.proto;l=3032 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -909,7 +909,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2918 + * google/container/v1/cluster_service.proto;l=3032 * @param value The projectId to set. * @return This builder for chaining. */ @@ -935,7 +935,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2918 + * google/container/v1/cluster_service.proto;l=3032 * @return This builder for chaining. */ @java.lang.Deprecated @@ -957,7 +957,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2918 + * google/container/v1/cluster_service.proto;l=3032 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -987,7 +987,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2924 + * google/container/v1/cluster_service.proto;l=3038 * @return The zone. */ @java.lang.Deprecated @@ -1015,7 +1015,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2924 + * google/container/v1/cluster_service.proto;l=3038 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1043,7 +1043,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2924 + * google/container/v1/cluster_service.proto;l=3038 * @param value The zone to set. * @return This builder for chaining. */ @@ -1070,7 +1070,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2924 + * google/container/v1/cluster_service.proto;l=3038 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1093,7 +1093,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2924 + * google/container/v1/cluster_service.proto;l=3038 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1121,7 +1121,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2928 + * google/container/v1/cluster_service.proto;l=3042 * @return The clusterId. */ @java.lang.Deprecated @@ -1147,7 +1147,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2928 + * google/container/v1/cluster_service.proto;l=3042 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1173,7 +1173,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2928 + * google/container/v1/cluster_service.proto;l=3042 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1198,7 +1198,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2928 + * google/container/v1/cluster_service.proto;l=3042 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1219,7 +1219,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2928 + * google/container/v1/cluster_service.proto;l=3042 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLocationsRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLocationsRequestOrBuilder.java index 0874467be25a..09105d3c3222 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLocationsRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLocationsRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface SetLocationsRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2918 + * google/container/v1/cluster_service.proto;l=3032 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface SetLocationsRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2918 + * google/container/v1/cluster_service.proto;l=3032 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface SetLocationsRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2924 + * google/container/v1/cluster_service.proto;l=3038 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface SetLocationsRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2924 + * google/container/v1/cluster_service.proto;l=3038 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface SetLocationsRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2928 + * google/container/v1/cluster_service.proto;l=3042 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface SetLocationsRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2928 + * google/container/v1/cluster_service.proto;l=3042 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLoggingServiceRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLoggingServiceRequest.java index 8c98d43b6948..164d56625a52 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLoggingServiceRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLoggingServiceRequest.java @@ -83,7 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2822 + * google/container/v1/cluster_service.proto;l=2936 * @return The projectId. */ @java.lang.Override @@ -111,7 +111,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2822 + * google/container/v1/cluster_service.proto;l=2936 * @return The bytes for projectId. */ @java.lang.Override @@ -145,7 +145,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2828 + * google/container/v1/cluster_service.proto;l=2942 * @return The zone. */ @java.lang.Override @@ -174,7 +174,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2828 + * google/container/v1/cluster_service.proto;l=2942 * @return The bytes for zone. */ @java.lang.Override @@ -206,7 +206,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2832 + * google/container/v1/cluster_service.proto;l=2946 * @return The clusterId. */ @java.lang.Override @@ -233,7 +233,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2832 + * google/container/v1/cluster_service.proto;l=2946 * @return The bytes for clusterId. */ @java.lang.Override @@ -825,7 +825,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2822 + * google/container/v1/cluster_service.proto;l=2936 * @return The projectId. */ @java.lang.Deprecated @@ -852,7 +852,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2822 + * google/container/v1/cluster_service.proto;l=2936 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -879,7 +879,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2822 + * google/container/v1/cluster_service.proto;l=2936 * @param value The projectId to set. * @return This builder for chaining. */ @@ -905,7 +905,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2822 + * google/container/v1/cluster_service.proto;l=2936 * @return This builder for chaining. */ @java.lang.Deprecated @@ -927,7 +927,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2822 + * google/container/v1/cluster_service.proto;l=2936 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -957,7 +957,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2828 + * google/container/v1/cluster_service.proto;l=2942 * @return The zone. */ @java.lang.Deprecated @@ -985,7 +985,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2828 + * google/container/v1/cluster_service.proto;l=2942 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1013,7 +1013,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2828 + * google/container/v1/cluster_service.proto;l=2942 * @param value The zone to set. * @return This builder for chaining. */ @@ -1040,7 +1040,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2828 + * google/container/v1/cluster_service.proto;l=2942 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1063,7 +1063,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2828 + * google/container/v1/cluster_service.proto;l=2942 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1091,7 +1091,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2832 + * google/container/v1/cluster_service.proto;l=2946 * @return The clusterId. */ @java.lang.Deprecated @@ -1117,7 +1117,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2832 + * google/container/v1/cluster_service.proto;l=2946 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1143,7 +1143,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2832 + * google/container/v1/cluster_service.proto;l=2946 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1168,7 +1168,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2832 + * google/container/v1/cluster_service.proto;l=2946 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1189,7 +1189,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2832 + * google/container/v1/cluster_service.proto;l=2946 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLoggingServiceRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLoggingServiceRequestOrBuilder.java index fd765bd9f483..30dad7b479c4 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLoggingServiceRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetLoggingServiceRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface SetLoggingServiceRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2822 + * google/container/v1/cluster_service.proto;l=2936 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface SetLoggingServiceRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2822 + * google/container/v1/cluster_service.proto;l=2936 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface SetLoggingServiceRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2828 + * google/container/v1/cluster_service.proto;l=2942 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface SetLoggingServiceRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2828 + * google/container/v1/cluster_service.proto;l=2942 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface SetLoggingServiceRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2832 + * google/container/v1/cluster_service.proto;l=2946 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface SetLoggingServiceRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetLoggingServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2832 + * google/container/v1/cluster_service.proto;l=2946 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMasterAuthRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMasterAuthRequest.java index fd519cffa297..1ccd3d547fd2 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMasterAuthRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMasterAuthRequest.java @@ -269,7 +269,7 @@ private Action(int value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3001 + * google/container/v1/cluster_service.proto;l=3115 * @return The projectId. */ @java.lang.Override @@ -297,7 +297,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3001 + * google/container/v1/cluster_service.proto;l=3115 * @return The bytes for projectId. */ @java.lang.Override @@ -331,7 +331,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3007 + * google/container/v1/cluster_service.proto;l=3121 * @return The zone. */ @java.lang.Override @@ -360,7 +360,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3007 + * google/container/v1/cluster_service.proto;l=3121 * @return The bytes for zone. */ @java.lang.Override @@ -392,7 +392,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3011 + * google/container/v1/cluster_service.proto;l=3125 * @return The clusterId. */ @java.lang.Override @@ -419,7 +419,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3011 + * google/container/v1/cluster_service.proto;l=3125 * @return The bytes for clusterId. */ @java.lang.Override @@ -1070,7 +1070,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3001 + * google/container/v1/cluster_service.proto;l=3115 * @return The projectId. */ @java.lang.Deprecated @@ -1097,7 +1097,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3001 + * google/container/v1/cluster_service.proto;l=3115 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -1124,7 +1124,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3001 + * google/container/v1/cluster_service.proto;l=3115 * @param value The projectId to set. * @return This builder for chaining. */ @@ -1150,7 +1150,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3001 + * google/container/v1/cluster_service.proto;l=3115 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1172,7 +1172,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3001 + * google/container/v1/cluster_service.proto;l=3115 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -1202,7 +1202,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3007 + * google/container/v1/cluster_service.proto;l=3121 * @return The zone. */ @java.lang.Deprecated @@ -1230,7 +1230,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3007 + * google/container/v1/cluster_service.proto;l=3121 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1258,7 +1258,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3007 + * google/container/v1/cluster_service.proto;l=3121 * @param value The zone to set. * @return This builder for chaining. */ @@ -1285,7 +1285,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3007 + * google/container/v1/cluster_service.proto;l=3121 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1308,7 +1308,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3007 + * google/container/v1/cluster_service.proto;l=3121 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1336,7 +1336,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3011 + * google/container/v1/cluster_service.proto;l=3125 * @return The clusterId. */ @java.lang.Deprecated @@ -1362,7 +1362,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3011 + * google/container/v1/cluster_service.proto;l=3125 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1388,7 +1388,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3011 + * google/container/v1/cluster_service.proto;l=3125 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1413,7 +1413,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3011 + * google/container/v1/cluster_service.proto;l=3125 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1434,7 +1434,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3011 + * google/container/v1/cluster_service.proto;l=3125 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMasterAuthRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMasterAuthRequestOrBuilder.java index a29d09ab4b93..2bd5d70eb750 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMasterAuthRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMasterAuthRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface SetMasterAuthRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3001 + * google/container/v1/cluster_service.proto;l=3115 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface SetMasterAuthRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3001 + * google/container/v1/cluster_service.proto;l=3115 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface SetMasterAuthRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3007 + * google/container/v1/cluster_service.proto;l=3121 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface SetMasterAuthRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3007 + * google/container/v1/cluster_service.proto;l=3121 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface SetMasterAuthRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3011 + * google/container/v1/cluster_service.proto;l=3125 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface SetMasterAuthRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMasterAuthRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3011 + * google/container/v1/cluster_service.proto;l=3125 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMonitoringServiceRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMonitoringServiceRequest.java index dad732f339f0..4505c3acded7 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMonitoringServiceRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMonitoringServiceRequest.java @@ -83,7 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2857 + * google/container/v1/cluster_service.proto;l=2971 * @return The projectId. */ @java.lang.Override @@ -111,7 +111,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2857 + * google/container/v1/cluster_service.proto;l=2971 * @return The bytes for projectId. */ @java.lang.Override @@ -145,7 +145,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2863 + * google/container/v1/cluster_service.proto;l=2977 * @return The zone. */ @java.lang.Override @@ -174,7 +174,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2863 + * google/container/v1/cluster_service.proto;l=2977 * @return The bytes for zone. */ @java.lang.Override @@ -206,7 +206,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2867 + * google/container/v1/cluster_service.proto;l=2981 * @return The clusterId. */ @java.lang.Override @@ -233,7 +233,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2867 + * google/container/v1/cluster_service.proto;l=2981 * @return The bytes for clusterId. */ @java.lang.Override @@ -825,7 +825,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2857 + * google/container/v1/cluster_service.proto;l=2971 * @return The projectId. */ @java.lang.Deprecated @@ -852,7 +852,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2857 + * google/container/v1/cluster_service.proto;l=2971 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -879,7 +879,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2857 + * google/container/v1/cluster_service.proto;l=2971 * @param value The projectId to set. * @return This builder for chaining. */ @@ -905,7 +905,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2857 + * google/container/v1/cluster_service.proto;l=2971 * @return This builder for chaining. */ @java.lang.Deprecated @@ -927,7 +927,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2857 + * google/container/v1/cluster_service.proto;l=2971 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -957,7 +957,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2863 + * google/container/v1/cluster_service.proto;l=2977 * @return The zone. */ @java.lang.Deprecated @@ -985,7 +985,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2863 + * google/container/v1/cluster_service.proto;l=2977 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1013,7 +1013,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2863 + * google/container/v1/cluster_service.proto;l=2977 * @param value The zone to set. * @return This builder for chaining. */ @@ -1040,7 +1040,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2863 + * google/container/v1/cluster_service.proto;l=2977 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1063,7 +1063,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2863 + * google/container/v1/cluster_service.proto;l=2977 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1091,7 +1091,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2867 + * google/container/v1/cluster_service.proto;l=2981 * @return The clusterId. */ @java.lang.Deprecated @@ -1117,7 +1117,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2867 + * google/container/v1/cluster_service.proto;l=2981 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1143,7 +1143,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2867 + * google/container/v1/cluster_service.proto;l=2981 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1168,7 +1168,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2867 + * google/container/v1/cluster_service.proto;l=2981 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1189,7 +1189,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2867 + * google/container/v1/cluster_service.proto;l=2981 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMonitoringServiceRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMonitoringServiceRequestOrBuilder.java index dbfa09650006..cf7f16c99b27 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMonitoringServiceRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetMonitoringServiceRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface SetMonitoringServiceRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2857 + * google/container/v1/cluster_service.proto;l=2971 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface SetMonitoringServiceRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2857 + * google/container/v1/cluster_service.proto;l=2971 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface SetMonitoringServiceRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2863 + * google/container/v1/cluster_service.proto;l=2977 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface SetMonitoringServiceRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2863 + * google/container/v1/cluster_service.proto;l=2977 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface SetMonitoringServiceRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2867 + * google/container/v1/cluster_service.proto;l=2981 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface SetMonitoringServiceRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetMonitoringServiceRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2867 + * google/container/v1/cluster_service.proto;l=2981 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNetworkPolicyRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNetworkPolicyRequest.java index 34389ce72a14..250b55ca26b6 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNetworkPolicyRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNetworkPolicyRequest.java @@ -83,7 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4249 + * google/container/v1/cluster_service.proto;l=4366 * @return The projectId. */ @java.lang.Override @@ -111,7 +111,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4249 + * google/container/v1/cluster_service.proto;l=4366 * @return The bytes for projectId. */ @java.lang.Override @@ -145,7 +145,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4255 + * google/container/v1/cluster_service.proto;l=4372 * @return The zone. */ @java.lang.Override @@ -174,7 +174,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4255 + * google/container/v1/cluster_service.proto;l=4372 * @return The bytes for zone. */ @java.lang.Override @@ -206,7 +206,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4259 + * google/container/v1/cluster_service.proto;l=4376 * @return The clusterId. */ @java.lang.Override @@ -233,7 +233,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4259 + * google/container/v1/cluster_service.proto;l=4376 * @return The bytes for clusterId. */ @java.lang.Override @@ -830,7 +830,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4249 + * google/container/v1/cluster_service.proto;l=4366 * @return The projectId. */ @java.lang.Deprecated @@ -857,7 +857,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4249 + * google/container/v1/cluster_service.proto;l=4366 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -884,7 +884,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4249 + * google/container/v1/cluster_service.proto;l=4366 * @param value The projectId to set. * @return This builder for chaining. */ @@ -910,7 +910,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4249 + * google/container/v1/cluster_service.proto;l=4366 * @return This builder for chaining. */ @java.lang.Deprecated @@ -932,7 +932,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4249 + * google/container/v1/cluster_service.proto;l=4366 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -962,7 +962,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4255 + * google/container/v1/cluster_service.proto;l=4372 * @return The zone. */ @java.lang.Deprecated @@ -990,7 +990,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4255 + * google/container/v1/cluster_service.proto;l=4372 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1018,7 +1018,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4255 + * google/container/v1/cluster_service.proto;l=4372 * @param value The zone to set. * @return This builder for chaining. */ @@ -1045,7 +1045,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4255 + * google/container/v1/cluster_service.proto;l=4372 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1068,7 +1068,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4255 + * google/container/v1/cluster_service.proto;l=4372 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1096,7 +1096,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4259 + * google/container/v1/cluster_service.proto;l=4376 * @return The clusterId. */ @java.lang.Deprecated @@ -1122,7 +1122,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4259 + * google/container/v1/cluster_service.proto;l=4376 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1148,7 +1148,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4259 + * google/container/v1/cluster_service.proto;l=4376 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1173,7 +1173,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4259 + * google/container/v1/cluster_service.proto;l=4376 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1194,7 +1194,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4259 + * google/container/v1/cluster_service.proto;l=4376 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNetworkPolicyRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNetworkPolicyRequestOrBuilder.java index dcfc7741081e..299c544eeb6e 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNetworkPolicyRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNetworkPolicyRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface SetNetworkPolicyRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4249 + * google/container/v1/cluster_service.proto;l=4366 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface SetNetworkPolicyRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4249 + * google/container/v1/cluster_service.proto;l=4366 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface SetNetworkPolicyRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4255 + * google/container/v1/cluster_service.proto;l=4372 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface SetNetworkPolicyRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4255 + * google/container/v1/cluster_service.proto;l=4372 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface SetNetworkPolicyRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4259 + * google/container/v1/cluster_service.proto;l=4376 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface SetNetworkPolicyRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNetworkPolicyRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4259 + * google/container/v1/cluster_service.proto;l=4376 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolAutoscalingRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolAutoscalingRequest.java index fd83c4a2bc1d..00ca5f58edf1 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolAutoscalingRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolAutoscalingRequest.java @@ -84,7 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2792 + * google/container/v1/cluster_service.proto;l=2906 * @return The projectId. */ @java.lang.Override @@ -112,7 +112,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2792 + * google/container/v1/cluster_service.proto;l=2906 * @return The bytes for projectId. */ @java.lang.Override @@ -146,7 +146,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2798 + * google/container/v1/cluster_service.proto;l=2912 * @return The zone. */ @java.lang.Override @@ -175,7 +175,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2798 + * google/container/v1/cluster_service.proto;l=2912 * @return The bytes for zone. */ @java.lang.Override @@ -207,7 +207,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2802 + * google/container/v1/cluster_service.proto;l=2916 * @return The clusterId. */ @java.lang.Override @@ -234,7 +234,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2802 + * google/container/v1/cluster_service.proto;l=2916 * @return The bytes for clusterId. */ @java.lang.Override @@ -266,7 +266,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2806 + * google/container/v1/cluster_service.proto;l=2920 * @return The nodePoolId. */ @java.lang.Override @@ -293,7 +293,7 @@ public java.lang.String getNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2806 + * google/container/v1/cluster_service.proto;l=2920 * @return The bytes for nodePoolId. */ @java.lang.Override @@ -917,7 +917,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2792 + * google/container/v1/cluster_service.proto;l=2906 * @return The projectId. */ @java.lang.Deprecated @@ -944,7 +944,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2792 + * google/container/v1/cluster_service.proto;l=2906 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -971,7 +971,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2792 + * google/container/v1/cluster_service.proto;l=2906 * @param value The projectId to set. * @return This builder for chaining. */ @@ -997,7 +997,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2792 + * google/container/v1/cluster_service.proto;l=2906 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1019,7 +1019,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2792 + * google/container/v1/cluster_service.proto;l=2906 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -1049,7 +1049,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2798 + * google/container/v1/cluster_service.proto;l=2912 * @return The zone. */ @java.lang.Deprecated @@ -1077,7 +1077,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2798 + * google/container/v1/cluster_service.proto;l=2912 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1105,7 +1105,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2798 + * google/container/v1/cluster_service.proto;l=2912 * @param value The zone to set. * @return This builder for chaining. */ @@ -1132,7 +1132,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2798 + * google/container/v1/cluster_service.proto;l=2912 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1155,7 +1155,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2798 + * google/container/v1/cluster_service.proto;l=2912 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1183,7 +1183,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2802 + * google/container/v1/cluster_service.proto;l=2916 * @return The clusterId. */ @java.lang.Deprecated @@ -1209,7 +1209,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2802 + * google/container/v1/cluster_service.proto;l=2916 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1235,7 +1235,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2802 + * google/container/v1/cluster_service.proto;l=2916 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1260,7 +1260,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2802 + * google/container/v1/cluster_service.proto;l=2916 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1281,7 +1281,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2802 + * google/container/v1/cluster_service.proto;l=2916 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ @@ -1309,7 +1309,7 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2806 + * google/container/v1/cluster_service.proto;l=2920 * @return The nodePoolId. */ @java.lang.Deprecated @@ -1335,7 +1335,7 @@ public java.lang.String getNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2806 + * google/container/v1/cluster_service.proto;l=2920 * @return The bytes for nodePoolId. */ @java.lang.Deprecated @@ -1361,7 +1361,7 @@ public com.google.protobuf.ByteString getNodePoolIdBytes() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2806 + * google/container/v1/cluster_service.proto;l=2920 * @param value The nodePoolId to set. * @return This builder for chaining. */ @@ -1386,7 +1386,7 @@ public Builder setNodePoolId(java.lang.String value) { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2806 + * google/container/v1/cluster_service.proto;l=2920 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1407,7 +1407,7 @@ public Builder clearNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2806 + * google/container/v1/cluster_service.proto;l=2920 * @param value The bytes for nodePoolId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolAutoscalingRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolAutoscalingRequestOrBuilder.java index 300eee9acb35..43a2562a542c 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolAutoscalingRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolAutoscalingRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface SetNodePoolAutoscalingRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2792 + * google/container/v1/cluster_service.proto;l=2906 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface SetNodePoolAutoscalingRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2792 + * google/container/v1/cluster_service.proto;l=2906 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface SetNodePoolAutoscalingRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2798 + * google/container/v1/cluster_service.proto;l=2912 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface SetNodePoolAutoscalingRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2798 + * google/container/v1/cluster_service.proto;l=2912 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface SetNodePoolAutoscalingRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2802 + * google/container/v1/cluster_service.proto;l=2916 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface SetNodePoolAutoscalingRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2802 + * google/container/v1/cluster_service.proto;l=2916 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -140,7 +140,7 @@ public interface SetNodePoolAutoscalingRequestOrBuilder * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2806 + * google/container/v1/cluster_service.proto;l=2920 * @return The nodePoolId. */ @java.lang.Deprecated @@ -156,7 +156,7 @@ public interface SetNodePoolAutoscalingRequestOrBuilder * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolAutoscalingRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2806 + * google/container/v1/cluster_service.proto;l=2920 * @return The bytes for nodePoolId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolManagementRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolManagementRequest.java index e73319129925..8d586b477f62 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolManagementRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolManagementRequest.java @@ -85,7 +85,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3787 + * google/container/v1/cluster_service.proto;l=3901 * @return The projectId. */ @java.lang.Override @@ -113,7 +113,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3787 + * google/container/v1/cluster_service.proto;l=3901 * @return The bytes for projectId. */ @java.lang.Override @@ -147,7 +147,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3793 + * google/container/v1/cluster_service.proto;l=3907 * @return The zone. */ @java.lang.Override @@ -176,7 +176,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3793 + * google/container/v1/cluster_service.proto;l=3907 * @return The bytes for zone. */ @java.lang.Override @@ -208,7 +208,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3797 + * google/container/v1/cluster_service.proto;l=3911 * @return The clusterId. */ @java.lang.Override @@ -235,7 +235,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3797 + * google/container/v1/cluster_service.proto;l=3911 * @return The bytes for clusterId. */ @java.lang.Override @@ -267,7 +267,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3801 + * google/container/v1/cluster_service.proto;l=3915 * @return The nodePoolId. */ @java.lang.Override @@ -294,7 +294,7 @@ public java.lang.String getNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3801 + * google/container/v1/cluster_service.proto;l=3915 * @return The bytes for nodePoolId. */ @java.lang.Override @@ -917,7 +917,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3787 + * google/container/v1/cluster_service.proto;l=3901 * @return The projectId. */ @java.lang.Deprecated @@ -944,7 +944,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3787 + * google/container/v1/cluster_service.proto;l=3901 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -971,7 +971,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3787 + * google/container/v1/cluster_service.proto;l=3901 * @param value The projectId to set. * @return This builder for chaining. */ @@ -997,7 +997,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3787 + * google/container/v1/cluster_service.proto;l=3901 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1019,7 +1019,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3787 + * google/container/v1/cluster_service.proto;l=3901 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -1049,7 +1049,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3793 + * google/container/v1/cluster_service.proto;l=3907 * @return The zone. */ @java.lang.Deprecated @@ -1077,7 +1077,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3793 + * google/container/v1/cluster_service.proto;l=3907 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1105,7 +1105,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3793 + * google/container/v1/cluster_service.proto;l=3907 * @param value The zone to set. * @return This builder for chaining. */ @@ -1132,7 +1132,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3793 + * google/container/v1/cluster_service.proto;l=3907 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1155,7 +1155,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3793 + * google/container/v1/cluster_service.proto;l=3907 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1183,7 +1183,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3797 + * google/container/v1/cluster_service.proto;l=3911 * @return The clusterId. */ @java.lang.Deprecated @@ -1209,7 +1209,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3797 + * google/container/v1/cluster_service.proto;l=3911 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1235,7 +1235,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3797 + * google/container/v1/cluster_service.proto;l=3911 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1260,7 +1260,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3797 + * google/container/v1/cluster_service.proto;l=3911 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1281,7 +1281,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3797 + * google/container/v1/cluster_service.proto;l=3911 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ @@ -1309,7 +1309,7 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3801 + * google/container/v1/cluster_service.proto;l=3915 * @return The nodePoolId. */ @java.lang.Deprecated @@ -1335,7 +1335,7 @@ public java.lang.String getNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3801 + * google/container/v1/cluster_service.proto;l=3915 * @return The bytes for nodePoolId. */ @java.lang.Deprecated @@ -1361,7 +1361,7 @@ public com.google.protobuf.ByteString getNodePoolIdBytes() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3801 + * google/container/v1/cluster_service.proto;l=3915 * @param value The nodePoolId to set. * @return This builder for chaining. */ @@ -1386,7 +1386,7 @@ public Builder setNodePoolId(java.lang.String value) { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3801 + * google/container/v1/cluster_service.proto;l=3915 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1407,7 +1407,7 @@ public Builder clearNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3801 + * google/container/v1/cluster_service.proto;l=3915 * @param value The bytes for nodePoolId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolManagementRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolManagementRequestOrBuilder.java index e0aa0f18d5f4..a59d857e1756 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolManagementRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolManagementRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface SetNodePoolManagementRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3787 + * google/container/v1/cluster_service.proto;l=3901 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface SetNodePoolManagementRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3787 + * google/container/v1/cluster_service.proto;l=3901 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface SetNodePoolManagementRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3793 + * google/container/v1/cluster_service.proto;l=3907 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface SetNodePoolManagementRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3793 + * google/container/v1/cluster_service.proto;l=3907 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface SetNodePoolManagementRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3797 + * google/container/v1/cluster_service.proto;l=3911 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface SetNodePoolManagementRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3797 + * google/container/v1/cluster_service.proto;l=3911 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -140,7 +140,7 @@ public interface SetNodePoolManagementRequestOrBuilder * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3801 + * google/container/v1/cluster_service.proto;l=3915 * @return The nodePoolId. */ @java.lang.Deprecated @@ -156,7 +156,7 @@ public interface SetNodePoolManagementRequestOrBuilder * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolManagementRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3801 + * google/container/v1/cluster_service.proto;l=3915 * @return The bytes for nodePoolId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolSizeRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolSizeRequest.java index 594c9917e4c9..3fda9bb94bc4 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolSizeRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolSizeRequest.java @@ -83,7 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3817 + * google/container/v1/cluster_service.proto;l=3931 * @return The projectId. */ @java.lang.Override @@ -111,7 +111,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3817 + * google/container/v1/cluster_service.proto;l=3931 * @return The bytes for projectId. */ @java.lang.Override @@ -145,7 +145,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3823 + * google/container/v1/cluster_service.proto;l=3937 * @return The zone. */ @java.lang.Override @@ -174,7 +174,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3823 + * google/container/v1/cluster_service.proto;l=3937 * @return The bytes for zone. */ @java.lang.Override @@ -206,7 +206,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3827 + * google/container/v1/cluster_service.proto;l=3941 * @return The clusterId. */ @java.lang.Override @@ -233,7 +233,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3827 + * google/container/v1/cluster_service.proto;l=3941 * @return The bytes for clusterId. */ @java.lang.Override @@ -265,7 +265,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3831 + * google/container/v1/cluster_service.proto;l=3945 * @return The nodePoolId. */ @java.lang.Override @@ -292,7 +292,7 @@ public java.lang.String getNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3831 + * google/container/v1/cluster_service.proto;l=3945 * @return The bytes for nodePoolId. */ @java.lang.Override @@ -854,7 +854,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3817 + * google/container/v1/cluster_service.proto;l=3931 * @return The projectId. */ @java.lang.Deprecated @@ -881,7 +881,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3817 + * google/container/v1/cluster_service.proto;l=3931 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -908,7 +908,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3817 + * google/container/v1/cluster_service.proto;l=3931 * @param value The projectId to set. * @return This builder for chaining. */ @@ -934,7 +934,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3817 + * google/container/v1/cluster_service.proto;l=3931 * @return This builder for chaining. */ @java.lang.Deprecated @@ -956,7 +956,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3817 + * google/container/v1/cluster_service.proto;l=3931 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -986,7 +986,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3823 + * google/container/v1/cluster_service.proto;l=3937 * @return The zone. */ @java.lang.Deprecated @@ -1014,7 +1014,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3823 + * google/container/v1/cluster_service.proto;l=3937 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1042,7 +1042,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3823 + * google/container/v1/cluster_service.proto;l=3937 * @param value The zone to set. * @return This builder for chaining. */ @@ -1069,7 +1069,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3823 + * google/container/v1/cluster_service.proto;l=3937 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1092,7 +1092,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3823 + * google/container/v1/cluster_service.proto;l=3937 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1120,7 +1120,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3827 + * google/container/v1/cluster_service.proto;l=3941 * @return The clusterId. */ @java.lang.Deprecated @@ -1146,7 +1146,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3827 + * google/container/v1/cluster_service.proto;l=3941 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1172,7 +1172,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3827 + * google/container/v1/cluster_service.proto;l=3941 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1197,7 +1197,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3827 + * google/container/v1/cluster_service.proto;l=3941 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1218,7 +1218,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3827 + * google/container/v1/cluster_service.proto;l=3941 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ @@ -1246,7 +1246,7 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3831 + * google/container/v1/cluster_service.proto;l=3945 * @return The nodePoolId. */ @java.lang.Deprecated @@ -1272,7 +1272,7 @@ public java.lang.String getNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3831 + * google/container/v1/cluster_service.proto;l=3945 * @return The bytes for nodePoolId. */ @java.lang.Deprecated @@ -1298,7 +1298,7 @@ public com.google.protobuf.ByteString getNodePoolIdBytes() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3831 + * google/container/v1/cluster_service.proto;l=3945 * @param value The nodePoolId to set. * @return This builder for chaining. */ @@ -1323,7 +1323,7 @@ public Builder setNodePoolId(java.lang.String value) { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3831 + * google/container/v1/cluster_service.proto;l=3945 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1344,7 +1344,7 @@ public Builder clearNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3831 + * google/container/v1/cluster_service.proto;l=3945 * @param value The bytes for nodePoolId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolSizeRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolSizeRequestOrBuilder.java index cf192c48b09e..e377cfe19001 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolSizeRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/SetNodePoolSizeRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface SetNodePoolSizeRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3817 + * google/container/v1/cluster_service.proto;l=3931 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface SetNodePoolSizeRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3817 + * google/container/v1/cluster_service.proto;l=3931 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface SetNodePoolSizeRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3823 + * google/container/v1/cluster_service.proto;l=3937 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface SetNodePoolSizeRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=3823 + * google/container/v1/cluster_service.proto;l=3937 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface SetNodePoolSizeRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3827 + * google/container/v1/cluster_service.proto;l=3941 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface SetNodePoolSizeRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3827 + * google/container/v1/cluster_service.proto;l=3941 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -140,7 +140,7 @@ public interface SetNodePoolSizeRequestOrBuilder * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3831 + * google/container/v1/cluster_service.proto;l=3945 * @return The nodePoolId. */ @java.lang.Deprecated @@ -156,7 +156,7 @@ public interface SetNodePoolSizeRequestOrBuilder * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.SetNodePoolSizeRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=3831 + * google/container/v1/cluster_service.proto;l=3945 * @return The bytes for nodePoolId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StartIPRotationRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StartIPRotationRequest.java index 0a139912a818..a2636d3c8e39 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StartIPRotationRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StartIPRotationRequest.java @@ -83,7 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4115 + * google/container/v1/cluster_service.proto;l=4229 * @return The projectId. */ @java.lang.Override @@ -111,7 +111,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4115 + * google/container/v1/cluster_service.proto;l=4229 * @return The bytes for projectId. */ @java.lang.Override @@ -145,7 +145,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4121 + * google/container/v1/cluster_service.proto;l=4235 * @return The zone. */ @java.lang.Override @@ -174,7 +174,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4121 + * google/container/v1/cluster_service.proto;l=4235 * @return The bytes for zone. */ @java.lang.Override @@ -206,7 +206,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4125 + * google/container/v1/cluster_service.proto;l=4239 * @return The clusterId. */ @java.lang.Override @@ -233,7 +233,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4125 + * google/container/v1/cluster_service.proto;l=4239 * @return The bytes for clusterId. */ @java.lang.Override @@ -770,7 +770,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4115 + * google/container/v1/cluster_service.proto;l=4229 * @return The projectId. */ @java.lang.Deprecated @@ -797,7 +797,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4115 + * google/container/v1/cluster_service.proto;l=4229 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -824,7 +824,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4115 + * google/container/v1/cluster_service.proto;l=4229 * @param value The projectId to set. * @return This builder for chaining. */ @@ -850,7 +850,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4115 + * google/container/v1/cluster_service.proto;l=4229 * @return This builder for chaining. */ @java.lang.Deprecated @@ -872,7 +872,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4115 + * google/container/v1/cluster_service.proto;l=4229 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -902,7 +902,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4121 + * google/container/v1/cluster_service.proto;l=4235 * @return The zone. */ @java.lang.Deprecated @@ -930,7 +930,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4121 + * google/container/v1/cluster_service.proto;l=4235 * @return The bytes for zone. */ @java.lang.Deprecated @@ -958,7 +958,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4121 + * google/container/v1/cluster_service.proto;l=4235 * @param value The zone to set. * @return This builder for chaining. */ @@ -985,7 +985,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4121 + * google/container/v1/cluster_service.proto;l=4235 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1008,7 +1008,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4121 + * google/container/v1/cluster_service.proto;l=4235 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1036,7 +1036,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4125 + * google/container/v1/cluster_service.proto;l=4239 * @return The clusterId. */ @java.lang.Deprecated @@ -1062,7 +1062,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4125 + * google/container/v1/cluster_service.proto;l=4239 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1088,7 +1088,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4125 + * google/container/v1/cluster_service.proto;l=4239 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1113,7 +1113,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4125 + * google/container/v1/cluster_service.proto;l=4239 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1134,7 +1134,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4125 + * google/container/v1/cluster_service.proto;l=4239 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StartIPRotationRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StartIPRotationRequestOrBuilder.java index b9fe083d2387..e5cd45afd325 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StartIPRotationRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StartIPRotationRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface StartIPRotationRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4115 + * google/container/v1/cluster_service.proto;l=4229 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface StartIPRotationRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4115 + * google/container/v1/cluster_service.proto;l=4229 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface StartIPRotationRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4121 + * google/container/v1/cluster_service.proto;l=4235 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface StartIPRotationRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=4121 + * google/container/v1/cluster_service.proto;l=4235 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface StartIPRotationRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4125 + * google/container/v1/cluster_service.proto;l=4239 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface StartIPRotationRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.StartIPRotationRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=4125 + * google/container/v1/cluster_service.proto;l=4239 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StatusCondition.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StatusCondition.java index 56abceb40969..2fbf1aec1e95 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StatusCondition.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StatusCondition.java @@ -330,7 +330,7 @@ private Code(int value) { * .google.container.v1.StatusCondition.Code code = 1 [deprecated = true]; * * @deprecated google.container.v1.StatusCondition.code is deprecated. See - * google/container/v1/cluster_service.proto;l=4326 + * google/container/v1/cluster_service.proto;l=4443 * @return The enum numeric value on the wire for code. */ @java.lang.Override @@ -349,7 +349,7 @@ public int getCodeValue() { * .google.container.v1.StatusCondition.Code code = 1 [deprecated = true]; * * @deprecated google.container.v1.StatusCondition.code is deprecated. See - * google/container/v1/cluster_service.proto;l=4326 + * google/container/v1/cluster_service.proto;l=4443 * @return The code. */ @java.lang.Override @@ -842,7 +842,7 @@ public Builder mergeFrom( * .google.container.v1.StatusCondition.Code code = 1 [deprecated = true]; * * @deprecated google.container.v1.StatusCondition.code is deprecated. See - * google/container/v1/cluster_service.proto;l=4326 + * google/container/v1/cluster_service.proto;l=4443 * @return The enum numeric value on the wire for code. */ @java.lang.Override @@ -861,7 +861,7 @@ public int getCodeValue() { * .google.container.v1.StatusCondition.Code code = 1 [deprecated = true]; * * @deprecated google.container.v1.StatusCondition.code is deprecated. See - * google/container/v1/cluster_service.proto;l=4326 + * google/container/v1/cluster_service.proto;l=4443 * @param value The enum numeric value on the wire for code to set. * @return This builder for chaining. */ @@ -883,7 +883,7 @@ public Builder setCodeValue(int value) { * .google.container.v1.StatusCondition.Code code = 1 [deprecated = true]; * * @deprecated google.container.v1.StatusCondition.code is deprecated. See - * google/container/v1/cluster_service.proto;l=4326 + * google/container/v1/cluster_service.proto;l=4443 * @return The code. */ @java.lang.Override @@ -904,7 +904,7 @@ public com.google.container.v1.StatusCondition.Code getCode() { * .google.container.v1.StatusCondition.Code code = 1 [deprecated = true]; * * @deprecated google.container.v1.StatusCondition.code is deprecated. See - * google/container/v1/cluster_service.proto;l=4326 + * google/container/v1/cluster_service.proto;l=4443 * @param value The code to set. * @return This builder for chaining. */ @@ -929,7 +929,7 @@ public Builder setCode(com.google.container.v1.StatusCondition.Code value) { * .google.container.v1.StatusCondition.Code code = 1 [deprecated = true]; * * @deprecated google.container.v1.StatusCondition.code is deprecated. See - * google/container/v1/cluster_service.proto;l=4326 + * google/container/v1/cluster_service.proto;l=4443 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StatusConditionOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StatusConditionOrBuilder.java index 10d5b546ac45..40ca1b0ebc75 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StatusConditionOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/StatusConditionOrBuilder.java @@ -35,7 +35,7 @@ public interface StatusConditionOrBuilder * .google.container.v1.StatusCondition.Code code = 1 [deprecated = true]; * * @deprecated google.container.v1.StatusCondition.code is deprecated. See - * google/container/v1/cluster_service.proto;l=4326 + * google/container/v1/cluster_service.proto;l=4443 * @return The enum numeric value on the wire for code. */ @java.lang.Deprecated @@ -51,7 +51,7 @@ public interface StatusConditionOrBuilder * .google.container.v1.StatusCondition.Code code = 1 [deprecated = true]; * * @deprecated google.container.v1.StatusCondition.code is deprecated. See - * google/container/v1/cluster_service.proto;l=4326 + * google/container/v1/cluster_service.proto;l=4443 * @return The code. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateClusterRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateClusterRequest.java index d7acc6ba511a..a8ca14aeda36 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateClusterRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateClusterRequest.java @@ -83,7 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2631 + * google/container/v1/cluster_service.proto;l=2735 * @return The projectId. */ @java.lang.Override @@ -111,7 +111,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2631 + * google/container/v1/cluster_service.proto;l=2735 * @return The bytes for projectId. */ @java.lang.Override @@ -145,7 +145,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2637 + * google/container/v1/cluster_service.proto;l=2741 * @return The zone. */ @java.lang.Override @@ -174,7 +174,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2637 + * google/container/v1/cluster_service.proto;l=2741 * @return The bytes for zone. */ @java.lang.Override @@ -206,7 +206,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2641 + * google/container/v1/cluster_service.proto;l=2745 * @return The clusterId. */ @java.lang.Override @@ -233,7 +233,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2641 + * google/container/v1/cluster_service.proto;l=2745 * @return The bytes for clusterId. */ @java.lang.Override @@ -821,7 +821,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2631 + * google/container/v1/cluster_service.proto;l=2735 * @return The projectId. */ @java.lang.Deprecated @@ -848,7 +848,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2631 + * google/container/v1/cluster_service.proto;l=2735 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -875,7 +875,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2631 + * google/container/v1/cluster_service.proto;l=2735 * @param value The projectId to set. * @return This builder for chaining. */ @@ -901,7 +901,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2631 + * google/container/v1/cluster_service.proto;l=2735 * @return This builder for chaining. */ @java.lang.Deprecated @@ -923,7 +923,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2631 + * google/container/v1/cluster_service.proto;l=2735 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -953,7 +953,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2637 + * google/container/v1/cluster_service.proto;l=2741 * @return The zone. */ @java.lang.Deprecated @@ -981,7 +981,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2637 + * google/container/v1/cluster_service.proto;l=2741 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1009,7 +1009,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2637 + * google/container/v1/cluster_service.proto;l=2741 * @param value The zone to set. * @return This builder for chaining. */ @@ -1036,7 +1036,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2637 + * google/container/v1/cluster_service.proto;l=2741 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1059,7 +1059,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2637 + * google/container/v1/cluster_service.proto;l=2741 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1087,7 +1087,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2641 + * google/container/v1/cluster_service.proto;l=2745 * @return The clusterId. */ @java.lang.Deprecated @@ -1113,7 +1113,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2641 + * google/container/v1/cluster_service.proto;l=2745 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1139,7 +1139,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2641 + * google/container/v1/cluster_service.proto;l=2745 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1164,7 +1164,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2641 + * google/container/v1/cluster_service.proto;l=2745 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1185,7 +1185,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2641 + * google/container/v1/cluster_service.proto;l=2745 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateClusterRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateClusterRequestOrBuilder.java index e6ff02459db1..c6838701f174 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateClusterRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateClusterRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface UpdateClusterRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2631 + * google/container/v1/cluster_service.proto;l=2735 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface UpdateClusterRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2631 + * google/container/v1/cluster_service.proto;l=2735 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface UpdateClusterRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2637 + * google/container/v1/cluster_service.proto;l=2741 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface UpdateClusterRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2637 + * google/container/v1/cluster_service.proto;l=2741 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface UpdateClusterRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2641 + * google/container/v1/cluster_service.proto;l=2745 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface UpdateClusterRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateClusterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2641 + * google/container/v1/cluster_service.proto;l=2745 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateMasterRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateMasterRequest.java index c46ce4f97095..07bc9cf01a37 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateMasterRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateMasterRequest.java @@ -83,7 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2949 + * google/container/v1/cluster_service.proto;l=3063 * @return The projectId. */ @java.lang.Override @@ -111,7 +111,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2949 + * google/container/v1/cluster_service.proto;l=3063 * @return The bytes for projectId. */ @java.lang.Override @@ -145,7 +145,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2955 + * google/container/v1/cluster_service.proto;l=3069 * @return The zone. */ @java.lang.Override @@ -174,7 +174,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2955 + * google/container/v1/cluster_service.proto;l=3069 * @return The bytes for zone. */ @java.lang.Override @@ -206,7 +206,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2959 + * google/container/v1/cluster_service.proto;l=3073 * @return The clusterId. */ @java.lang.Override @@ -233,7 +233,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2959 + * google/container/v1/cluster_service.proto;l=3073 * @return The bytes for clusterId. */ @java.lang.Override @@ -822,7 +822,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2949 + * google/container/v1/cluster_service.proto;l=3063 * @return The projectId. */ @java.lang.Deprecated @@ -849,7 +849,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2949 + * google/container/v1/cluster_service.proto;l=3063 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -876,7 +876,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2949 + * google/container/v1/cluster_service.proto;l=3063 * @param value The projectId to set. * @return This builder for chaining. */ @@ -902,7 +902,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2949 + * google/container/v1/cluster_service.proto;l=3063 * @return This builder for chaining. */ @java.lang.Deprecated @@ -924,7 +924,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2949 + * google/container/v1/cluster_service.proto;l=3063 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -954,7 +954,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2955 + * google/container/v1/cluster_service.proto;l=3069 * @return The zone. */ @java.lang.Deprecated @@ -982,7 +982,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2955 + * google/container/v1/cluster_service.proto;l=3069 * @return The bytes for zone. */ @java.lang.Deprecated @@ -1010,7 +1010,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2955 + * google/container/v1/cluster_service.proto;l=3069 * @param value The zone to set. * @return This builder for chaining. */ @@ -1037,7 +1037,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2955 + * google/container/v1/cluster_service.proto;l=3069 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1060,7 +1060,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2955 + * google/container/v1/cluster_service.proto;l=3069 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -1088,7 +1088,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2959 + * google/container/v1/cluster_service.proto;l=3073 * @return The clusterId. */ @java.lang.Deprecated @@ -1114,7 +1114,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2959 + * google/container/v1/cluster_service.proto;l=3073 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -1140,7 +1140,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2959 + * google/container/v1/cluster_service.proto;l=3073 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -1165,7 +1165,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2959 + * google/container/v1/cluster_service.proto;l=3073 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1186,7 +1186,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2959 + * google/container/v1/cluster_service.proto;l=3073 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateMasterRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateMasterRequestOrBuilder.java index 9761d44c2e75..b2aa75a4fca8 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateMasterRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateMasterRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface UpdateMasterRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2949 + * google/container/v1/cluster_service.proto;l=3063 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface UpdateMasterRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2949 + * google/container/v1/cluster_service.proto;l=3063 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface UpdateMasterRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2955 + * google/container/v1/cluster_service.proto;l=3069 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface UpdateMasterRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2955 + * google/container/v1/cluster_service.proto;l=3069 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface UpdateMasterRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2959 + * google/container/v1/cluster_service.proto;l=3073 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface UpdateMasterRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateMasterRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2959 + * google/container/v1/cluster_service.proto;l=3073 * @return The bytes for clusterId. */ @java.lang.Deprecated diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateNodePoolRequest.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateNodePoolRequest.java index c0fd8eb53a71..c47dacb14bf3 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateNodePoolRequest.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateNodePoolRequest.java @@ -48,6 +48,7 @@ private UpdateNodePoolRequest() { name_ = ""; locations_ = com.google.protobuf.LazyStringArrayList.emptyList(); etag_ = ""; + accelerators_ = java.util.Collections.emptyList(); machineType_ = ""; diskType_ = ""; } @@ -90,7 +91,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2656 + * google/container/v1/cluster_service.proto;l=2760 * @return The projectId. */ @java.lang.Override @@ -118,7 +119,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2656 + * google/container/v1/cluster_service.proto;l=2760 * @return The bytes for projectId. */ @java.lang.Override @@ -152,7 +153,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2662 + * google/container/v1/cluster_service.proto;l=2766 * @return The zone. */ @java.lang.Override @@ -181,7 +182,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2662 + * google/container/v1/cluster_service.proto;l=2766 * @return The bytes for zone. */ @java.lang.Override @@ -213,7 +214,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2666 + * google/container/v1/cluster_service.proto;l=2770 * @return The clusterId. */ @java.lang.Override @@ -240,7 +241,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2666 + * google/container/v1/cluster_service.proto;l=2770 * @return The bytes for clusterId. */ @java.lang.Override @@ -272,7 +273,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2670 + * google/container/v1/cluster_service.proto;l=2774 * @return The nodePoolId. */ @java.lang.Override @@ -299,7 +300,7 @@ public java.lang.String getNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2670 + * google/container/v1/cluster_service.proto;l=2774 * @return The bytes for nodePoolId. */ @java.lang.Override @@ -1391,6 +1392,87 @@ public com.google.container.v1.WindowsNodeConfigOrBuilder getWindowsNodeConfigOr : windowsNodeConfig_; } + public static final int ACCELERATORS_FIELD_NUMBER = 35; + + @SuppressWarnings("serial") + private java.util.List accelerators_; + /** + * + * + *
+   * A list of hardware accelerators to be attached to each node.
+   * See https://cloud.google.com/compute/docs/gpus for more information about
+   * support for GPUs.
+   * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + @java.lang.Override + public java.util.List getAcceleratorsList() { + return accelerators_; + } + /** + * + * + *
+   * A list of hardware accelerators to be attached to each node.
+   * See https://cloud.google.com/compute/docs/gpus for more information about
+   * support for GPUs.
+   * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + @java.lang.Override + public java.util.List + getAcceleratorsOrBuilderList() { + return accelerators_; + } + /** + * + * + *
+   * A list of hardware accelerators to be attached to each node.
+   * See https://cloud.google.com/compute/docs/gpus for more information about
+   * support for GPUs.
+   * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + @java.lang.Override + public int getAcceleratorsCount() { + return accelerators_.size(); + } + /** + * + * + *
+   * A list of hardware accelerators to be attached to each node.
+   * See https://cloud.google.com/compute/docs/gpus for more information about
+   * support for GPUs.
+   * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + @java.lang.Override + public com.google.container.v1.AcceleratorConfig getAccelerators(int index) { + return accelerators_.get(index); + } + /** + * + * + *
+   * A list of hardware accelerators to be attached to each node.
+   * See https://cloud.google.com/compute/docs/gpus for more information about
+   * support for GPUs.
+   * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + @java.lang.Override + public com.google.container.v1.AcceleratorConfigOrBuilder getAcceleratorsOrBuilder(int index) { + return accelerators_.get(index); + } + public static final int MACHINE_TYPE_FIELD_NUMBER = 36; @SuppressWarnings("serial") @@ -1582,6 +1664,62 @@ public com.google.container.v1.ResourceManagerTagsOrBuilder getResourceManagerTa : resourceManagerTags_; } + public static final int CONTAINERD_CONFIG_FIELD_NUMBER = 40; + private com.google.container.v1.ContainerdConfig containerdConfig_; + /** + * + * + *
+   * The desired containerd config for nodes in the node pool.
+   * Initiates an upgrade operation that recreates the nodes with the new
+   * config.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 40; + * + * @return Whether the containerdConfig field is set. + */ + @java.lang.Override + public boolean hasContainerdConfig() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+   * The desired containerd config for nodes in the node pool.
+   * Initiates an upgrade operation that recreates the nodes with the new
+   * config.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 40; + * + * @return The containerdConfig. + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfig getContainerdConfig() { + return containerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : containerdConfig_; + } + /** + * + * + *
+   * The desired containerd config for nodes in the node pool.
+   * Initiates an upgrade operation that recreates the nodes with the new
+   * config.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 40; + */ + @java.lang.Override + public com.google.container.v1.ContainerdConfigOrBuilder getContainerdConfigOrBuilder() { + return containerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : containerdConfig_; + } + public static final int QUEUED_PROVISIONING_FIELD_NUMBER = 42; private com.google.container.v1.NodePool.QueuedProvisioning queuedProvisioning_; /** @@ -1597,7 +1735,7 @@ public com.google.container.v1.ResourceManagerTagsOrBuilder getResourceManagerTa */ @java.lang.Override public boolean hasQueuedProvisioning() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** * @@ -1719,6 +1857,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00004000) != 0)) { output.writeMessage(34, getWindowsNodeConfig()); } + for (int i = 0; i < accelerators_.size(); i++) { + output.writeMessage(35, accelerators_.get(i)); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 36, machineType_); } @@ -1732,6 +1873,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage(39, getResourceManagerTags()); } if (((bitField0_ & 0x00010000) != 0)) { + output.writeMessage(40, getContainerdConfig()); + } + if (((bitField0_ & 0x00020000) != 0)) { output.writeMessage(42, getQueuedProvisioning()); } getUnknownFields().writeTo(output); @@ -1821,6 +1965,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00004000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(34, getWindowsNodeConfig()); } + for (int i = 0; i < accelerators_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(35, accelerators_.get(i)); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(36, machineType_); } @@ -1835,6 +1982,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize(39, getResourceManagerTags()); } if (((bitField0_ & 0x00010000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(40, getContainerdConfig()); + } + if (((bitField0_ & 0x00020000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(42, getQueuedProvisioning()); } size += getUnknownFields().getSerializedSize(); @@ -1922,6 +2072,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWindowsNodeConfig()) { if (!getWindowsNodeConfig().equals(other.getWindowsNodeConfig())) return false; } + if (!getAcceleratorsList().equals(other.getAcceleratorsList())) return false; if (!getMachineType().equals(other.getMachineType())) return false; if (!getDiskType().equals(other.getDiskType())) return false; if (getDiskSizeGb() != other.getDiskSizeGb()) return false; @@ -1929,6 +2080,10 @@ public boolean equals(final java.lang.Object obj) { if (hasResourceManagerTags()) { if (!getResourceManagerTags().equals(other.getResourceManagerTags())) return false; } + if (hasContainerdConfig() != other.hasContainerdConfig()) return false; + if (hasContainerdConfig()) { + if (!getContainerdConfig().equals(other.getContainerdConfig())) return false; + } if (hasQueuedProvisioning() != other.hasQueuedProvisioning()) return false; if (hasQueuedProvisioning()) { if (!getQueuedProvisioning().equals(other.getQueuedProvisioning())) return false; @@ -2024,6 +2179,10 @@ public int hashCode() { hash = (37 * hash) + WINDOWS_NODE_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getWindowsNodeConfig().hashCode(); } + if (getAcceleratorsCount() > 0) { + hash = (37 * hash) + ACCELERATORS_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorsList().hashCode(); + } hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; hash = (53 * hash) + getMachineType().hashCode(); hash = (37 * hash) + DISK_TYPE_FIELD_NUMBER; @@ -2034,6 +2193,10 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_MANAGER_TAGS_FIELD_NUMBER; hash = (53 * hash) + getResourceManagerTags().hashCode(); } + if (hasContainerdConfig()) { + hash = (37 * hash) + CONTAINERD_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getContainerdConfig().hashCode(); + } if (hasQueuedProvisioning()) { hash = (37 * hash) + QUEUED_PROVISIONING_FIELD_NUMBER; hash = (53 * hash) + getQueuedProvisioning().hashCode(); @@ -2193,7 +2356,9 @@ private void maybeForceBuilderInitialization() { getLoggingConfigFieldBuilder(); getResourceLabelsFieldBuilder(); getWindowsNodeConfigFieldBuilder(); + getAcceleratorsFieldBuilder(); getResourceManagerTagsFieldBuilder(); + getContainerdConfigFieldBuilder(); getQueuedProvisioningFieldBuilder(); } } @@ -2286,6 +2451,13 @@ public Builder clear() { windowsNodeConfigBuilder_.dispose(); windowsNodeConfigBuilder_ = null; } + if (acceleratorsBuilder_ == null) { + accelerators_ = java.util.Collections.emptyList(); + } else { + accelerators_ = null; + acceleratorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x01000000); machineType_ = ""; diskType_ = ""; diskSizeGb_ = 0L; @@ -2294,6 +2466,11 @@ public Builder clear() { resourceManagerTagsBuilder_.dispose(); resourceManagerTagsBuilder_ = null; } + containerdConfig_ = null; + if (containerdConfigBuilder_ != null) { + containerdConfigBuilder_.dispose(); + containerdConfigBuilder_ = null; + } queuedProvisioning_ = null; if (queuedProvisioningBuilder_ != null) { queuedProvisioningBuilder_.dispose(); @@ -2326,6 +2503,7 @@ public com.google.container.v1.UpdateNodePoolRequest build() { public com.google.container.v1.UpdateNodePoolRequest buildPartial() { com.google.container.v1.UpdateNodePoolRequest result = new com.google.container.v1.UpdateNodePoolRequest(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -2333,6 +2511,18 @@ public com.google.container.v1.UpdateNodePoolRequest buildPartial() { return result; } + private void buildPartialRepeatedFields(com.google.container.v1.UpdateNodePoolRequest result) { + if (acceleratorsBuilder_ == null) { + if (((bitField0_ & 0x01000000) != 0)) { + accelerators_ = java.util.Collections.unmodifiableList(accelerators_); + bitField0_ = (bitField0_ & ~0x01000000); + } + result.accelerators_ = accelerators_; + } else { + result.accelerators_ = acceleratorsBuilder_.build(); + } + } + private void buildPartial0(com.google.container.v1.UpdateNodePoolRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -2441,28 +2631,33 @@ private void buildPartial0(com.google.container.v1.UpdateNodePoolRequest result) : windowsNodeConfigBuilder_.build(); to_bitField0_ |= 0x00004000; } - if (((from_bitField0_ & 0x01000000) != 0)) { + if (((from_bitField0_ & 0x02000000) != 0)) { result.machineType_ = machineType_; } - if (((from_bitField0_ & 0x02000000) != 0)) { + if (((from_bitField0_ & 0x04000000) != 0)) { result.diskType_ = diskType_; } - if (((from_bitField0_ & 0x04000000) != 0)) { + if (((from_bitField0_ & 0x08000000) != 0)) { result.diskSizeGb_ = diskSizeGb_; } - if (((from_bitField0_ & 0x08000000) != 0)) { + if (((from_bitField0_ & 0x10000000) != 0)) { result.resourceManagerTags_ = resourceManagerTagsBuilder_ == null ? resourceManagerTags_ : resourceManagerTagsBuilder_.build(); to_bitField0_ |= 0x00008000; } - if (((from_bitField0_ & 0x10000000) != 0)) { + if (((from_bitField0_ & 0x20000000) != 0)) { + result.containerdConfig_ = + containerdConfigBuilder_ == null ? containerdConfig_ : containerdConfigBuilder_.build(); + to_bitField0_ |= 0x00010000; + } + if (((from_bitField0_ & 0x40000000) != 0)) { result.queuedProvisioning_ = queuedProvisioningBuilder_ == null ? queuedProvisioning_ : queuedProvisioningBuilder_.build(); - to_bitField0_ |= 0x00010000; + to_bitField0_ |= 0x00020000; } result.bitField0_ |= to_bitField0_; } @@ -2607,14 +2802,41 @@ public Builder mergeFrom(com.google.container.v1.UpdateNodePoolRequest other) { if (other.hasWindowsNodeConfig()) { mergeWindowsNodeConfig(other.getWindowsNodeConfig()); } + if (acceleratorsBuilder_ == null) { + if (!other.accelerators_.isEmpty()) { + if (accelerators_.isEmpty()) { + accelerators_ = other.accelerators_; + bitField0_ = (bitField0_ & ~0x01000000); + } else { + ensureAcceleratorsIsMutable(); + accelerators_.addAll(other.accelerators_); + } + onChanged(); + } + } else { + if (!other.accelerators_.isEmpty()) { + if (acceleratorsBuilder_.isEmpty()) { + acceleratorsBuilder_.dispose(); + acceleratorsBuilder_ = null; + accelerators_ = other.accelerators_; + bitField0_ = (bitField0_ & ~0x01000000); + acceleratorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAcceleratorsFieldBuilder() + : null; + } else { + acceleratorsBuilder_.addAllMessages(other.accelerators_); + } + } + } if (!other.getMachineType().isEmpty()) { machineType_ = other.machineType_; - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; onChanged(); } if (!other.getDiskType().isEmpty()) { diskType_ = other.diskType_; - bitField0_ |= 0x02000000; + bitField0_ |= 0x04000000; onChanged(); } if (other.getDiskSizeGb() != 0L) { @@ -2623,6 +2845,9 @@ public Builder mergeFrom(com.google.container.v1.UpdateNodePoolRequest other) { if (other.hasResourceManagerTags()) { mergeResourceManagerTags(other.getResourceManagerTags()); } + if (other.hasContainerdConfig()) { + mergeContainerdConfig(other.getContainerdConfig()); + } if (other.hasQueuedProvisioning()) { mergeQueuedProvisioning(other.getQueuedProvisioning()); } @@ -2801,36 +3026,56 @@ public Builder mergeFrom( bitField0_ |= 0x00800000; break; } // case 274 + case 282: + { + com.google.container.v1.AcceleratorConfig m = + input.readMessage( + com.google.container.v1.AcceleratorConfig.parser(), extensionRegistry); + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.add(m); + } else { + acceleratorsBuilder_.addMessage(m); + } + break; + } // case 282 case 290: { machineType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; break; } // case 290 case 298: { diskType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x02000000; + bitField0_ |= 0x04000000; break; } // case 298 case 304: { diskSizeGb_ = input.readInt64(); - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; break; } // case 304 case 314: { input.readMessage( getResourceManagerTagsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x08000000; + bitField0_ |= 0x10000000; break; } // case 314 + case 322: + { + input.readMessage( + getContainerdConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x20000000; + break; + } // case 322 case 338: { input.readMessage( getQueuedProvisioningFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x10000000; + bitField0_ |= 0x40000000; break; } // case 338 default: @@ -2865,7 +3110,7 @@ public Builder mergeFrom( * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2656 + * google/container/v1/cluster_service.proto;l=2760 * @return The projectId. */ @java.lang.Deprecated @@ -2892,7 +3137,7 @@ public java.lang.String getProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2656 + * google/container/v1/cluster_service.proto;l=2760 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -2919,7 +3164,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2656 + * google/container/v1/cluster_service.proto;l=2760 * @param value The projectId to set. * @return This builder for chaining. */ @@ -2945,7 +3190,7 @@ public Builder setProjectId(java.lang.String value) { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2656 + * google/container/v1/cluster_service.proto;l=2760 * @return This builder for chaining. */ @java.lang.Deprecated @@ -2967,7 +3212,7 @@ public Builder clearProjectId() { * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2656 + * google/container/v1/cluster_service.proto;l=2760 * @param value The bytes for projectId to set. * @return This builder for chaining. */ @@ -2997,7 +3242,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2662 + * google/container/v1/cluster_service.proto;l=2766 * @return The zone. */ @java.lang.Deprecated @@ -3025,7 +3270,7 @@ public java.lang.String getZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2662 + * google/container/v1/cluster_service.proto;l=2766 * @return The bytes for zone. */ @java.lang.Deprecated @@ -3053,7 +3298,7 @@ public com.google.protobuf.ByteString getZoneBytes() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2662 + * google/container/v1/cluster_service.proto;l=2766 * @param value The zone to set. * @return This builder for chaining. */ @@ -3080,7 +3325,7 @@ public Builder setZone(java.lang.String value) { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2662 + * google/container/v1/cluster_service.proto;l=2766 * @return This builder for chaining. */ @java.lang.Deprecated @@ -3103,7 +3348,7 @@ public Builder clearZone() { * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2662 + * google/container/v1/cluster_service.proto;l=2766 * @param value The bytes for zone to set. * @return This builder for chaining. */ @@ -3131,7 +3376,7 @@ public Builder setZoneBytes(com.google.protobuf.ByteString value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2666 + * google/container/v1/cluster_service.proto;l=2770 * @return The clusterId. */ @java.lang.Deprecated @@ -3157,7 +3402,7 @@ public java.lang.String getClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2666 + * google/container/v1/cluster_service.proto;l=2770 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -3183,7 +3428,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2666 + * google/container/v1/cluster_service.proto;l=2770 * @param value The clusterId to set. * @return This builder for chaining. */ @@ -3208,7 +3453,7 @@ public Builder setClusterId(java.lang.String value) { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2666 + * google/container/v1/cluster_service.proto;l=2770 * @return This builder for chaining. */ @java.lang.Deprecated @@ -3229,7 +3474,7 @@ public Builder clearClusterId() { * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2666 + * google/container/v1/cluster_service.proto;l=2770 * @param value The bytes for clusterId to set. * @return This builder for chaining. */ @@ -3257,7 +3502,7 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2670 + * google/container/v1/cluster_service.proto;l=2774 * @return The nodePoolId. */ @java.lang.Deprecated @@ -3283,7 +3528,7 @@ public java.lang.String getNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2670 + * google/container/v1/cluster_service.proto;l=2774 * @return The bytes for nodePoolId. */ @java.lang.Deprecated @@ -3309,7 +3554,7 @@ public com.google.protobuf.ByteString getNodePoolIdBytes() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2670 + * google/container/v1/cluster_service.proto;l=2774 * @param value The nodePoolId to set. * @return This builder for chaining. */ @@ -3334,7 +3579,7 @@ public Builder setNodePoolId(java.lang.String value) { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2670 + * google/container/v1/cluster_service.proto;l=2774 * @return This builder for chaining. */ @java.lang.Deprecated @@ -3355,7 +3600,7 @@ public Builder clearNodePoolId() { * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2670 + * google/container/v1/cluster_service.proto;l=2774 * @param value The bytes for nodePoolId to set. * @return This builder for chaining. */ @@ -6934,6 +7179,393 @@ public com.google.container.v1.WindowsNodeConfigOrBuilder getWindowsNodeConfigOr return windowsNodeConfigBuilder_; } + private java.util.List accelerators_ = + java.util.Collections.emptyList(); + + private void ensureAcceleratorsIsMutable() { + if (!((bitField0_ & 0x01000000) != 0)) { + accelerators_ = + new java.util.ArrayList(accelerators_); + bitField0_ |= 0x01000000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.container.v1.AcceleratorConfig, + com.google.container.v1.AcceleratorConfig.Builder, + com.google.container.v1.AcceleratorConfigOrBuilder> + acceleratorsBuilder_; + + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public java.util.List getAcceleratorsList() { + if (acceleratorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(accelerators_); + } else { + return acceleratorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public int getAcceleratorsCount() { + if (acceleratorsBuilder_ == null) { + return accelerators_.size(); + } else { + return acceleratorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public com.google.container.v1.AcceleratorConfig getAccelerators(int index) { + if (acceleratorsBuilder_ == null) { + return accelerators_.get(index); + } else { + return acceleratorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public Builder setAccelerators(int index, com.google.container.v1.AcceleratorConfig value) { + if (acceleratorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceleratorsIsMutable(); + accelerators_.set(index, value); + onChanged(); + } else { + acceleratorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public Builder setAccelerators( + int index, com.google.container.v1.AcceleratorConfig.Builder builderForValue) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.set(index, builderForValue.build()); + onChanged(); + } else { + acceleratorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public Builder addAccelerators(com.google.container.v1.AcceleratorConfig value) { + if (acceleratorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceleratorsIsMutable(); + accelerators_.add(value); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public Builder addAccelerators(int index, com.google.container.v1.AcceleratorConfig value) { + if (acceleratorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceleratorsIsMutable(); + accelerators_.add(index, value); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public Builder addAccelerators( + com.google.container.v1.AcceleratorConfig.Builder builderForValue) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.add(builderForValue.build()); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public Builder addAccelerators( + int index, com.google.container.v1.AcceleratorConfig.Builder builderForValue) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.add(index, builderForValue.build()); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public Builder addAllAccelerators( + java.lang.Iterable values) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accelerators_); + onChanged(); + } else { + acceleratorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public Builder clearAccelerators() { + if (acceleratorsBuilder_ == null) { + accelerators_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x01000000); + onChanged(); + } else { + acceleratorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public Builder removeAccelerators(int index) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.remove(index); + onChanged(); + } else { + acceleratorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public com.google.container.v1.AcceleratorConfig.Builder getAcceleratorsBuilder(int index) { + return getAcceleratorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public com.google.container.v1.AcceleratorConfigOrBuilder getAcceleratorsOrBuilder(int index) { + if (acceleratorsBuilder_ == null) { + return accelerators_.get(index); + } else { + return acceleratorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public java.util.List + getAcceleratorsOrBuilderList() { + if (acceleratorsBuilder_ != null) { + return acceleratorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accelerators_); + } + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public com.google.container.v1.AcceleratorConfig.Builder addAcceleratorsBuilder() { + return getAcceleratorsFieldBuilder() + .addBuilder(com.google.container.v1.AcceleratorConfig.getDefaultInstance()); + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public com.google.container.v1.AcceleratorConfig.Builder addAcceleratorsBuilder(int index) { + return getAcceleratorsFieldBuilder() + .addBuilder(index, com.google.container.v1.AcceleratorConfig.getDefaultInstance()); + } + /** + * + * + *
+     * A list of hardware accelerators to be attached to each node.
+     * See https://cloud.google.com/compute/docs/gpus for more information about
+     * support for GPUs.
+     * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + public java.util.List + getAcceleratorsBuilderList() { + return getAcceleratorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.container.v1.AcceleratorConfig, + com.google.container.v1.AcceleratorConfig.Builder, + com.google.container.v1.AcceleratorConfigOrBuilder> + getAcceleratorsFieldBuilder() { + if (acceleratorsBuilder_ == null) { + acceleratorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.container.v1.AcceleratorConfig, + com.google.container.v1.AcceleratorConfig.Builder, + com.google.container.v1.AcceleratorConfigOrBuilder>( + accelerators_, ((bitField0_ & 0x01000000) != 0), getParentForChildren(), isClean()); + accelerators_ = null; + } + return acceleratorsBuilder_; + } + private java.lang.Object machineType_ = ""; /** * @@ -7005,7 +7637,7 @@ public Builder setMachineType(java.lang.String value) { throw new NullPointerException(); } machineType_ = value; - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; onChanged(); return this; } @@ -7025,7 +7657,7 @@ public Builder setMachineType(java.lang.String value) { */ public Builder clearMachineType() { machineType_ = getDefaultInstance().getMachineType(); - bitField0_ = (bitField0_ & ~0x01000000); + bitField0_ = (bitField0_ & ~0x02000000); onChanged(); return this; } @@ -7050,7 +7682,7 @@ public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); machineType_ = value; - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; onChanged(); return this; } @@ -7126,7 +7758,7 @@ public Builder setDiskType(java.lang.String value) { throw new NullPointerException(); } diskType_ = value; - bitField0_ |= 0x02000000; + bitField0_ |= 0x04000000; onChanged(); return this; } @@ -7146,7 +7778,7 @@ public Builder setDiskType(java.lang.String value) { */ public Builder clearDiskType() { diskType_ = getDefaultInstance().getDiskType(); - bitField0_ = (bitField0_ & ~0x02000000); + bitField0_ = (bitField0_ & ~0x04000000); onChanged(); return this; } @@ -7171,7 +7803,7 @@ public Builder setDiskTypeBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); diskType_ = value; - bitField0_ |= 0x02000000; + bitField0_ |= 0x04000000; onChanged(); return this; } @@ -7213,7 +7845,7 @@ public long getDiskSizeGb() { public Builder setDiskSizeGb(long value) { diskSizeGb_ = value; - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); return this; } @@ -7232,7 +7864,7 @@ public Builder setDiskSizeGb(long value) { * @return This builder for chaining. */ public Builder clearDiskSizeGb() { - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); diskSizeGb_ = 0L; onChanged(); return this; @@ -7258,7 +7890,7 @@ public Builder clearDiskSizeGb() { * @return Whether the resourceManagerTags field is set. */ public boolean hasResourceManagerTags() { - return ((bitField0_ & 0x08000000) != 0); + return ((bitField0_ & 0x10000000) != 0); } /** * @@ -7302,7 +7934,7 @@ public Builder setResourceManagerTags(com.google.container.v1.ResourceManagerTag } else { resourceManagerTagsBuilder_.setMessage(value); } - bitField0_ |= 0x08000000; + bitField0_ |= 0x10000000; onChanged(); return this; } @@ -7324,7 +7956,7 @@ public Builder setResourceManagerTags( } else { resourceManagerTagsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x08000000; + bitField0_ |= 0x10000000; onChanged(); return this; } @@ -7341,7 +7973,7 @@ public Builder setResourceManagerTags( */ public Builder mergeResourceManagerTags(com.google.container.v1.ResourceManagerTags value) { if (resourceManagerTagsBuilder_ == null) { - if (((bitField0_ & 0x08000000) != 0) + if (((bitField0_ & 0x10000000) != 0) && resourceManagerTags_ != null && resourceManagerTags_ != com.google.container.v1.ResourceManagerTags.getDefaultInstance()) { @@ -7353,7 +7985,7 @@ public Builder mergeResourceManagerTags(com.google.container.v1.ResourceManagerT resourceManagerTagsBuilder_.mergeFrom(value); } if (resourceManagerTags_ != null) { - bitField0_ |= 0x08000000; + bitField0_ |= 0x10000000; onChanged(); } return this; @@ -7370,7 +8002,7 @@ public Builder mergeResourceManagerTags(com.google.container.v1.ResourceManagerT * .google.container.v1.ResourceManagerTags resource_manager_tags = 39; */ public Builder clearResourceManagerTags() { - bitField0_ = (bitField0_ & ~0x08000000); + bitField0_ = (bitField0_ & ~0x10000000); resourceManagerTags_ = null; if (resourceManagerTagsBuilder_ != null) { resourceManagerTagsBuilder_.dispose(); @@ -7391,7 +8023,7 @@ public Builder clearResourceManagerTags() { * .google.container.v1.ResourceManagerTags resource_manager_tags = 39; */ public com.google.container.v1.ResourceManagerTags.Builder getResourceManagerTagsBuilder() { - bitField0_ |= 0x08000000; + bitField0_ |= 0x10000000; onChanged(); return getResourceManagerTagsFieldBuilder().getBuilder(); } @@ -7443,6 +8075,210 @@ public com.google.container.v1.ResourceManagerTagsOrBuilder getResourceManagerTa return resourceManagerTagsBuilder_; } + private com.google.container.v1.ContainerdConfig containerdConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig, + com.google.container.v1.ContainerdConfig.Builder, + com.google.container.v1.ContainerdConfigOrBuilder> + containerdConfigBuilder_; + /** + * + * + *
+     * The desired containerd config for nodes in the node pool.
+     * Initiates an upgrade operation that recreates the nodes with the new
+     * config.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 40; + * + * @return Whether the containerdConfig field is set. + */ + public boolean hasContainerdConfig() { + return ((bitField0_ & 0x20000000) != 0); + } + /** + * + * + *
+     * The desired containerd config for nodes in the node pool.
+     * Initiates an upgrade operation that recreates the nodes with the new
+     * config.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 40; + * + * @return The containerdConfig. + */ + public com.google.container.v1.ContainerdConfig getContainerdConfig() { + if (containerdConfigBuilder_ == null) { + return containerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : containerdConfig_; + } else { + return containerdConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The desired containerd config for nodes in the node pool.
+     * Initiates an upgrade operation that recreates the nodes with the new
+     * config.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 40; + */ + public Builder setContainerdConfig(com.google.container.v1.ContainerdConfig value) { + if (containerdConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + containerdConfig_ = value; + } else { + containerdConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired containerd config for nodes in the node pool.
+     * Initiates an upgrade operation that recreates the nodes with the new
+     * config.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 40; + */ + public Builder setContainerdConfig( + com.google.container.v1.ContainerdConfig.Builder builderForValue) { + if (containerdConfigBuilder_ == null) { + containerdConfig_ = builderForValue.build(); + } else { + containerdConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired containerd config for nodes in the node pool.
+     * Initiates an upgrade operation that recreates the nodes with the new
+     * config.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 40; + */ + public Builder mergeContainerdConfig(com.google.container.v1.ContainerdConfig value) { + if (containerdConfigBuilder_ == null) { + if (((bitField0_ & 0x20000000) != 0) + && containerdConfig_ != null + && containerdConfig_ != com.google.container.v1.ContainerdConfig.getDefaultInstance()) { + getContainerdConfigBuilder().mergeFrom(value); + } else { + containerdConfig_ = value; + } + } else { + containerdConfigBuilder_.mergeFrom(value); + } + if (containerdConfig_ != null) { + bitField0_ |= 0x20000000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The desired containerd config for nodes in the node pool.
+     * Initiates an upgrade operation that recreates the nodes with the new
+     * config.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 40; + */ + public Builder clearContainerdConfig() { + bitField0_ = (bitField0_ & ~0x20000000); + containerdConfig_ = null; + if (containerdConfigBuilder_ != null) { + containerdConfigBuilder_.dispose(); + containerdConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The desired containerd config for nodes in the node pool.
+     * Initiates an upgrade operation that recreates the nodes with the new
+     * config.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 40; + */ + public com.google.container.v1.ContainerdConfig.Builder getContainerdConfigBuilder() { + bitField0_ |= 0x20000000; + onChanged(); + return getContainerdConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The desired containerd config for nodes in the node pool.
+     * Initiates an upgrade operation that recreates the nodes with the new
+     * config.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 40; + */ + public com.google.container.v1.ContainerdConfigOrBuilder getContainerdConfigOrBuilder() { + if (containerdConfigBuilder_ != null) { + return containerdConfigBuilder_.getMessageOrBuilder(); + } else { + return containerdConfig_ == null + ? com.google.container.v1.ContainerdConfig.getDefaultInstance() + : containerdConfig_; + } + } + /** + * + * + *
+     * The desired containerd config for nodes in the node pool.
+     * Initiates an upgrade operation that recreates the nodes with the new
+     * config.
+     * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 40; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig, + com.google.container.v1.ContainerdConfig.Builder, + com.google.container.v1.ContainerdConfigOrBuilder> + getContainerdConfigFieldBuilder() { + if (containerdConfigBuilder_ == null) { + containerdConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.container.v1.ContainerdConfig, + com.google.container.v1.ContainerdConfig.Builder, + com.google.container.v1.ContainerdConfigOrBuilder>( + getContainerdConfig(), getParentForChildren(), isClean()); + containerdConfig_ = null; + } + return containerdConfigBuilder_; + } + private com.google.container.v1.NodePool.QueuedProvisioning queuedProvisioning_; private com.google.protobuf.SingleFieldBuilderV3< com.google.container.v1.NodePool.QueuedProvisioning, @@ -7461,7 +8297,7 @@ public com.google.container.v1.ResourceManagerTagsOrBuilder getResourceManagerTa * @return Whether the queuedProvisioning field is set. */ public boolean hasQueuedProvisioning() { - return ((bitField0_ & 0x10000000) != 0); + return ((bitField0_ & 0x40000000) != 0); } /** * @@ -7502,7 +8338,7 @@ public Builder setQueuedProvisioning( } else { queuedProvisioningBuilder_.setMessage(value); } - bitField0_ |= 0x10000000; + bitField0_ |= 0x40000000; onChanged(); return this; } @@ -7522,7 +8358,7 @@ public Builder setQueuedProvisioning( } else { queuedProvisioningBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x10000000; + bitField0_ |= 0x40000000; onChanged(); return this; } @@ -7538,7 +8374,7 @@ public Builder setQueuedProvisioning( public Builder mergeQueuedProvisioning( com.google.container.v1.NodePool.QueuedProvisioning value) { if (queuedProvisioningBuilder_ == null) { - if (((bitField0_ & 0x10000000) != 0) + if (((bitField0_ & 0x40000000) != 0) && queuedProvisioning_ != null && queuedProvisioning_ != com.google.container.v1.NodePool.QueuedProvisioning.getDefaultInstance()) { @@ -7550,7 +8386,7 @@ public Builder mergeQueuedProvisioning( queuedProvisioningBuilder_.mergeFrom(value); } if (queuedProvisioning_ != null) { - bitField0_ |= 0x10000000; + bitField0_ |= 0x40000000; onChanged(); } return this; @@ -7565,7 +8401,7 @@ public Builder mergeQueuedProvisioning( * .google.container.v1.NodePool.QueuedProvisioning queued_provisioning = 42; */ public Builder clearQueuedProvisioning() { - bitField0_ = (bitField0_ & ~0x10000000); + bitField0_ = (bitField0_ & ~0x40000000); queuedProvisioning_ = null; if (queuedProvisioningBuilder_ != null) { queuedProvisioningBuilder_.dispose(); @@ -7585,7 +8421,7 @@ public Builder clearQueuedProvisioning() { */ public com.google.container.v1.NodePool.QueuedProvisioning.Builder getQueuedProvisioningBuilder() { - bitField0_ |= 0x10000000; + bitField0_ |= 0x40000000; onChanged(); return getQueuedProvisioningFieldBuilder().getBuilder(); } diff --git a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateNodePoolRequestOrBuilder.java b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateNodePoolRequestOrBuilder.java index 3ce392a34639..ffd83cd8dc68 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateNodePoolRequestOrBuilder.java +++ b/java-container/proto-google-cloud-container-v1/src/main/java/com/google/container/v1/UpdateNodePoolRequestOrBuilder.java @@ -36,7 +36,7 @@ public interface UpdateNodePoolRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2656 + * google/container/v1/cluster_service.proto;l=2760 * @return The projectId. */ @java.lang.Deprecated @@ -53,7 +53,7 @@ public interface UpdateNodePoolRequestOrBuilder * string project_id = 1 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.project_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2656 + * google/container/v1/cluster_service.proto;l=2760 * @return The bytes for projectId. */ @java.lang.Deprecated @@ -72,7 +72,7 @@ public interface UpdateNodePoolRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2662 + * google/container/v1/cluster_service.proto;l=2766 * @return The zone. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface UpdateNodePoolRequestOrBuilder * string zone = 2 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.zone is deprecated. See - * google/container/v1/cluster_service.proto;l=2662 + * google/container/v1/cluster_service.proto;l=2766 * @return The bytes for zone. */ @java.lang.Deprecated @@ -107,7 +107,7 @@ public interface UpdateNodePoolRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2666 + * google/container/v1/cluster_service.proto;l=2770 * @return The clusterId. */ @java.lang.Deprecated @@ -123,7 +123,7 @@ public interface UpdateNodePoolRequestOrBuilder * string cluster_id = 3 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.cluster_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2666 + * google/container/v1/cluster_service.proto;l=2770 * @return The bytes for clusterId. */ @java.lang.Deprecated @@ -140,7 +140,7 @@ public interface UpdateNodePoolRequestOrBuilder * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2670 + * google/container/v1/cluster_service.proto;l=2774 * @return The nodePoolId. */ @java.lang.Deprecated @@ -156,7 +156,7 @@ public interface UpdateNodePoolRequestOrBuilder * string node_pool_id = 4 [deprecated = true]; * * @deprecated google.container.v1.UpdateNodePoolRequest.node_pool_id is deprecated. See - * google/container/v1/cluster_service.proto;l=2670 + * google/container/v1/cluster_service.proto;l=2774 * @return The bytes for nodePoolId. */ @java.lang.Deprecated @@ -910,6 +910,68 @@ public interface UpdateNodePoolRequestOrBuilder */ com.google.container.v1.WindowsNodeConfigOrBuilder getWindowsNodeConfigOrBuilder(); + /** + * + * + *
+   * A list of hardware accelerators to be attached to each node.
+   * See https://cloud.google.com/compute/docs/gpus for more information about
+   * support for GPUs.
+   * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + java.util.List getAcceleratorsList(); + /** + * + * + *
+   * A list of hardware accelerators to be attached to each node.
+   * See https://cloud.google.com/compute/docs/gpus for more information about
+   * support for GPUs.
+   * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + com.google.container.v1.AcceleratorConfig getAccelerators(int index); + /** + * + * + *
+   * A list of hardware accelerators to be attached to each node.
+   * See https://cloud.google.com/compute/docs/gpus for more information about
+   * support for GPUs.
+   * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + int getAcceleratorsCount(); + /** + * + * + *
+   * A list of hardware accelerators to be attached to each node.
+   * See https://cloud.google.com/compute/docs/gpus for more information about
+   * support for GPUs.
+   * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + java.util.List + getAcceleratorsOrBuilderList(); + /** + * + * + *
+   * A list of hardware accelerators to be attached to each node.
+   * See https://cloud.google.com/compute/docs/gpus for more information about
+   * support for GPUs.
+   * 
+ * + * repeated .google.container.v1.AcceleratorConfig accelerators = 35; + */ + com.google.container.v1.AcceleratorConfigOrBuilder getAcceleratorsOrBuilder(int index); + /** * * @@ -1029,6 +1091,47 @@ public interface UpdateNodePoolRequestOrBuilder */ com.google.container.v1.ResourceManagerTagsOrBuilder getResourceManagerTagsOrBuilder(); + /** + * + * + *
+   * The desired containerd config for nodes in the node pool.
+   * Initiates an upgrade operation that recreates the nodes with the new
+   * config.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 40; + * + * @return Whether the containerdConfig field is set. + */ + boolean hasContainerdConfig(); + /** + * + * + *
+   * The desired containerd config for nodes in the node pool.
+   * Initiates an upgrade operation that recreates the nodes with the new
+   * config.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 40; + * + * @return The containerdConfig. + */ + com.google.container.v1.ContainerdConfig getContainerdConfig(); + /** + * + * + *
+   * The desired containerd config for nodes in the node pool.
+   * Initiates an upgrade operation that recreates the nodes with the new
+   * config.
+   * 
+ * + * .google.container.v1.ContainerdConfig containerd_config = 40; + */ + com.google.container.v1.ContainerdConfigOrBuilder getContainerdConfigOrBuilder(); + /** * * diff --git a/java-container/proto-google-cloud-container-v1/src/main/proto/google/container/v1/cluster_service.proto b/java-container/proto-google-cloud-container-v1/src/main/proto/google/container/v1/cluster_service.proto index 941f81f0bfca..b9f6f53ff9a2 100644 --- a/java-container/proto-google-cloud-container-v1/src/main/proto/google/container/v1/cluster_service.proto +++ b/java-container/proto-google-cloud-container-v1/src/main/proto/google/container/v1/cluster_service.proto @@ -258,6 +258,7 @@ service ClusterManager { } }; option (google.api.method_signature) = "project_id,zone"; + option (google.api.method_signature) = "parent"; } // Gets the specified operation. @@ -531,6 +532,15 @@ message LinuxNodeConfig { CGROUP_MODE_V2 = 2; } + // Hugepages amount in both 2m and 1g size + message HugepagesConfig { + // Optional. Amount of 2M hugepages + optional int32 hugepage_size2m = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Amount of 1G hugepages + optional int32 hugepage_size1g = 2 [(google.api.field_behavior) = OPTIONAL]; + } + // The Linux kernel parameters to be applied to the nodes and all pods running // on the nodes. // @@ -551,6 +561,10 @@ message LinuxNodeConfig { // cgroup_mode specifies the cgroup mode to be used on the node. CgroupMode cgroup_mode = 2; + + // Optional. Amounts for 2M and 1G hugepages + optional HugepagesConfig hugepages = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Parameters that can be configured on Windows nodes. @@ -830,6 +844,9 @@ message NodeConfig { // Parameters for node pools to be backed by shared sole tenant node groups. SoleTenantConfig sole_tenant_config = 42; + // Parameters for containerd customization. + ContainerdConfig containerd_config = 43; + // A map of resource manager tag keys and values to be attached to the nodes. ResourceManagerTags resource_manager_tags = 45; @@ -851,6 +868,9 @@ message AdvancedMachineFeatures { // multithreading (SMT) set this to 1. If unset, the maximum number of threads // supported per core by the underlying processor is assumed. optional int64 threads_per_core = 1; + + // Whether or not to enable nested virtualization (defaults to false). + optional bool enable_nested_virtualization = 2; } // Parameters for node pool-level network config. @@ -1079,6 +1099,53 @@ message SoleTenantConfig { repeated NodeAffinity node_affinities = 1; } +// ContainerdConfig contains configuration to customize containerd. +message ContainerdConfig { + // PrivateRegistryAccessConfig contains access configuration for + // private container registries. + message PrivateRegistryAccessConfig { + // CertificateAuthorityDomainConfig configures one or more fully qualified + // domain names (FQDN) to a specific certificate. + message CertificateAuthorityDomainConfig { + // GCPSecretManagerCertificateConfig configures a secret from + // [Google Secret Manager](https://cloud.google.com/secret-manager). + message GCPSecretManagerCertificateConfig { + // Secret URI, in the form + // "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION". + // Version can be fixed (e.g. "2") or "latest" + string secret_uri = 1; + } + + // List of fully qualified domain names (FQDN). + // Specifying port is supported. + // Wilcards are NOT supported. + // Examples: + // - my.customdomain.com + // - 10.0.1.2:5000 + repeated string fqdns = 1; + + // Certificate access config. The following are supported: + // - GCPSecretManagerCertificateConfig + oneof certificate_config { + // Google Secret Manager (GCP) certificate configuration. + GCPSecretManagerCertificateConfig + gcp_secret_manager_certificate_config = 2; + } + } + + // Private registry access is enabled. + bool enabled = 1; + + // Private registry access configuration. + repeated CertificateAuthorityDomainConfig + certificate_authority_domain_config = 2; + } + + // PrivateRegistryAccessConfig is used to configure access configuration + // for private container registries. + PrivateRegistryAccessConfig private_registry_access_config = 1; +} + // Kubernetes taint is composed of three fields: key, value, and effect. Effect // can only be one of three types: NoSchedule, PreferNoSchedule or NoExecute. // @@ -1997,6 +2064,12 @@ message Cluster { // GKE Enterprise Configuration. EnterpriseConfig enterprise_config = 149; + + // Output only. Reserved for future use. + optional bool satisfies_pzs = 152 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + optional bool satisfies_pzi = 153 [(google.api.field_behavior) = OUTPUT_ONLY]; } // K8sBetaAPIConfig , configuration for beta APIs @@ -2018,6 +2091,9 @@ message SecurityPostureConfig { // Applies Security Posture features on the cluster. BASIC = 2; + + // Applies the Security Posture off cluster Enterprise level features. + ENTERPRISE = 3; } // VulnerabilityMode defines enablement mode for vulnerability scanning. @@ -2055,6 +2131,11 @@ message NodePoolAutoConfig { // Resource manager tag keys and values to be attached to the nodes // for managing Compute Engine firewalls using Network Firewall Policies. ResourceManagerTags resource_manager_tags = 2; + + // NodeKubeletConfig controls the defaults for autoprovisioned node-pools. + // + // Currently only `insecure_kubelet_readonly_port_enabled` can be set here. + NodeKubeletConfig node_kubelet_config = 3; } // Subset of Nodepool message that has defaults. @@ -2070,6 +2151,14 @@ message NodeConfigDefaults { // Logging configuration for node pools. NodePoolLoggingConfig logging_config = 3; + + // Parameters for containerd customization. + ContainerdConfig containerd_config = 4; + + // NodeKubeletConfig controls the defaults for new node-pools. + // + // Currently only `insecure_kubelet_readonly_port_enabled` can be set here. + NodeKubeletConfig node_kubelet_config = 6; } // ClusterUpdate describes an update to the cluster. Exactly one update can @@ -2178,7 +2267,12 @@ message ClusterUpdate { // Cluster-level Vertical Pod Autoscaling configuration. VerticalPodAutoscaling desired_vertical_pod_autoscaling = 22; - // The desired private cluster configuration. + // The desired private cluster configuration. master_global_access_config is + // the only field that can be changed via this field. + // See also + // [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint] + // for modifying other fields within + // [PrivateClusterConfig][google.container.v1.PrivateClusterConfig]. PrivateClusterConfig desired_private_cluster_config = 25; // The desired config of Intra-node visibility. @@ -2287,6 +2381,9 @@ message ClusterUpdate { // Desired Beta APIs to be enabled for cluster. K8sBetaAPIConfig desired_k8s_beta_apis = 131; + // The desired containerd config for the cluster. + ContainerdConfig desired_containerd_config = 134; + // Enable/Disable Multi-Networking for the cluster optional bool desired_enable_multi_networking = 135; @@ -2299,6 +2396,13 @@ message ClusterUpdate { // Enable/Disable Cilium Clusterwide Network Policy for the cluster. optional bool desired_enable_cilium_clusterwide_network_policy = 138; + + // The desired node kubelet config for the cluster. + NodeKubeletConfig desired_node_kubelet_config = 141; + + // The desired node kubelet config for all auto-provisioned node pools + // in autopilot clusters and node auto-provisioning enabled clusters. + NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; } // AdditionalPodRangesConfig is the configuration for additional pod secondary @@ -2758,6 +2862,11 @@ message UpdateNodePoolRequest { // Parameters that can be configured on Windows nodes. WindowsNodeConfig windows_node_config = 34; + // A list of hardware accelerators to be attached to each node. + // See https://cloud.google.com/compute/docs/gpus for more information about + // support for GPUs. + repeated AcceleratorConfig accelerators = 35; + // Optional. The desired [Google Compute Engine machine // type](https://cloud.google.com/compute/docs/machine-types) for nodes in the // node pool. Initiates an upgrade operation that migrates the nodes in the @@ -2781,6 +2890,11 @@ message UpdateNodePoolRequest { // Existing tags will be replaced with new values. ResourceManagerTags resource_manager_tags = 39; + // The desired containerd config for nodes in the node pool. + // Initiates an upgrade operation that recreates the nodes with the new + // config. + ContainerdConfig containerd_config = 40; + // Specifies the configuration of queued provisioning. NodePool.QueuedProvisioning queued_provisioning = 42; } @@ -4186,6 +4300,9 @@ message GPUSharingConfig { // GPUs are time-shared between containers. TIME_SHARING = 1; + + // GPUs are shared between containers with NVIDIA MPS. + MPS = 2; } // The max number of containers that can share a physical GPU. @@ -4405,6 +4522,7 @@ message NetworkConfig { optional bool enable_fqdn_network_policy = 19; // Specify the details of in-transit encryption. + // Now named inter-node transparent encryption. optional InTransitEncryptionConfig in_transit_encryption_config = 20; // Whether CiliumClusterwideNetworkPolicy is enabled on this cluster. @@ -4668,6 +4786,10 @@ message DNSConfig { // cluster_dns_domain is the suffix used for all cluster service records. string cluster_dns_domain = 3; + + // Optional. The domain used in Additive VPC scope. + string additive_vpc_scope_dns_domain = 5 + [(google.api.field_behavior) = OPTIONAL]; } // Constraints applied to pods. @@ -5258,6 +5380,12 @@ message MonitoringComponentConfig { // Statefulset STATEFULSET = 12; + + // CADVISOR + CADVISOR = 13; + + // KUBELET + KUBELET = 14; } // Select components to collect metrics. An empty set would disable all diff --git a/java-container/samples/snippets/generated/com/google/cloud/container/v1/clustermanager/create/SyncCreateSetCredentialsProvider1.java b/java-container/samples/snippets/generated/com/google/cloud/container/v1/clustermanager/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..efd40106b1a1 --- /dev/null +++ b/java-container/samples/snippets/generated/com/google/cloud/container/v1/clustermanager/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,40 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.container.v1.samples; + +// [START container_v1_generated_ClusterManager_Create_SetCredentialsProvider1_sync] +import com.google.cloud.container.v1.ClusterManagerClient; +import com.google.cloud.container.v1.ClusterManagerSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() 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 + ClusterManagerSettings clusterManagerSettings = + ClusterManagerSettings.newHttpJsonBuilder().build(); + ClusterManagerClient clusterManagerClient = ClusterManagerClient.create(clusterManagerSettings); + } +} +// [END container_v1_generated_ClusterManager_Create_SetCredentialsProvider1_sync] diff --git a/java-container/samples/snippets/generated/com/google/cloud/container/v1/clustermanager/listoperations/SyncListOperationsString.java b/java-container/samples/snippets/generated/com/google/cloud/container/v1/clustermanager/listoperations/SyncListOperationsString.java new file mode 100644 index 000000000000..98f08d0bf8df --- /dev/null +++ b/java-container/samples/snippets/generated/com/google/cloud/container/v1/clustermanager/listoperations/SyncListOperationsString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.container.v1.samples; + +// [START container_v1_generated_ClusterManager_ListOperations_String_sync] +import com.google.cloud.container.v1.ClusterManagerClient; +import com.google.container.v1.ListOperationsResponse; + +public class SyncListOperationsString { + + public static void main(String[] args) throws Exception { + syncListOperationsString(); + } + + public static void syncListOperationsString() 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { + String parent = "parent-995424086"; + ListOperationsResponse response = clusterManagerClient.listOperations(parent); + } + } +} +// [END container_v1_generated_ClusterManager_ListOperations_String_sync] diff --git a/java-container/samples/snippets/generated/com/google/cloud/container/v1/clustermanager/updatenodepool/AsyncUpdateNodePool.java b/java-container/samples/snippets/generated/com/google/cloud/container/v1/clustermanager/updatenodepool/AsyncUpdateNodePool.java index bed3d62e649d..d8737a870d4e 100644 --- a/java-container/samples/snippets/generated/com/google/cloud/container/v1/clustermanager/updatenodepool/AsyncUpdateNodePool.java +++ b/java-container/samples/snippets/generated/com/google/cloud/container/v1/clustermanager/updatenodepool/AsyncUpdateNodePool.java @@ -19,7 +19,9 @@ // [START container_v1_generated_ClusterManager_UpdateNodePool_async] import com.google.api.core.ApiFuture; import com.google.cloud.container.v1.ClusterManagerClient; +import com.google.container.v1.AcceleratorConfig; import com.google.container.v1.ConfidentialNodes; +import com.google.container.v1.ContainerdConfig; import com.google.container.v1.FastSocket; import com.google.container.v1.GcfsConfig; import com.google.container.v1.LinuxNodeConfig; @@ -78,10 +80,12 @@ public static void asyncUpdateNodePool() throws Exception { .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build()) .setResourceLabels(ResourceLabels.newBuilder().build()) .setWindowsNodeConfig(WindowsNodeConfig.newBuilder().build()) + .addAllAccelerators(new ArrayList()) .setMachineType("machineType-218117087") .setDiskType("diskType279771767") .setDiskSizeGb(-757478089) .setResourceManagerTags(ResourceManagerTags.newBuilder().build()) + .setContainerdConfig(ContainerdConfig.newBuilder().build()) .setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build()) .build(); ApiFuture future = diff --git a/java-container/samples/snippets/generated/com/google/cloud/container/v1/clustermanager/updatenodepool/SyncUpdateNodePool.java b/java-container/samples/snippets/generated/com/google/cloud/container/v1/clustermanager/updatenodepool/SyncUpdateNodePool.java index da4331808bf9..73e21cc002b8 100644 --- a/java-container/samples/snippets/generated/com/google/cloud/container/v1/clustermanager/updatenodepool/SyncUpdateNodePool.java +++ b/java-container/samples/snippets/generated/com/google/cloud/container/v1/clustermanager/updatenodepool/SyncUpdateNodePool.java @@ -18,7 +18,9 @@ // [START container_v1_generated_ClusterManager_UpdateNodePool_sync] import com.google.cloud.container.v1.ClusterManagerClient; +import com.google.container.v1.AcceleratorConfig; import com.google.container.v1.ConfidentialNodes; +import com.google.container.v1.ContainerdConfig; import com.google.container.v1.FastSocket; import com.google.container.v1.GcfsConfig; import com.google.container.v1.LinuxNodeConfig; @@ -77,10 +79,12 @@ public static void syncUpdateNodePool() throws Exception { .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build()) .setResourceLabels(ResourceLabels.newBuilder().build()) .setWindowsNodeConfig(WindowsNodeConfig.newBuilder().build()) + .addAllAccelerators(new ArrayList()) .setMachineType("machineType-218117087") .setDiskType("diskType279771767") .setDiskSizeGb(-757478089) .setResourceManagerTags(ResourceManagerTags.newBuilder().build()) + .setContainerdConfig(ContainerdConfig.newBuilder().build()) .setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build()) .build(); Operation response = clusterManagerClient.updateNodePool(request); diff --git a/java-dialogflow-cx/README.md b/java-dialogflow-cx/README.md index 3651510cafa6..2dd9c43f7778 100644 --- a/java-dialogflow-cx/README.md +++ b/java-dialogflow-cx/README.md @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dialogflow-cx.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.55.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.56.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExamplesStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExamplesStubSettings.java index 3918d9ca65b6..27193224c689 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExamplesStubSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExamplesStubSettings.java @@ -63,6 +63,7 @@ import java.io.IOException; import java.util.List; import javax.annotation.Generated; +import org.threeten.bp.Duration; // AUTO-GENERATED DOCUMENTATION AND CLASS. /** @@ -402,7 +403,9 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -411,8 +414,17 @@ public static class Builder extends StubSettings.Builder definitions = ImmutableMap.builder(); RetrySettings settings = null; - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); } @@ -492,38 +504,38 @@ private static Builder createHttpJsonDefault() { private static Builder initDefaults(Builder builder) { builder .createExampleSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .deleteExampleSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .listExamplesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .getExampleSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .updateExampleSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .listLocationsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .getLocationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); return builder; } diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/PlaybooksStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/PlaybooksStubSettings.java index a43215ab65b5..902255d9a3b5 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/PlaybooksStubSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/PlaybooksStubSettings.java @@ -70,6 +70,7 @@ import java.io.IOException; import java.util.List; import javax.annotation.Generated; +import org.threeten.bp.Duration; // AUTO-GENERATED DOCUMENTATION AND CLASS. /** @@ -526,7 +527,9 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -535,8 +538,17 @@ public static class Builder extends StubSettings.Builder definitions = ImmutableMap.builder(); RetrySettings settings = null; - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); } @@ -633,58 +645,58 @@ private static Builder createHttpJsonDefault() { private static Builder initDefaults(Builder builder) { builder .createPlaybookSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .deletePlaybookSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .listPlaybooksSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .getPlaybookSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .updatePlaybookSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .createPlaybookVersionSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .getPlaybookVersionSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .listPlaybookVersionsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .deletePlaybookVersionSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .listLocationsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .getLocationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); return builder; } diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ToolsStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ToolsStubSettings.java index fc68a4be4f41..dd7bd90874db 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ToolsStubSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ToolsStubSettings.java @@ -430,7 +430,9 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -439,8 +441,17 @@ public static class Builder extends StubSettings.Builder definitions = ImmutableMap.builder(); RetrySettings settings = null; - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); } @@ -526,50 +537,50 @@ private static Builder createHttpJsonDefault() { private static Builder initDefaults(Builder builder) { builder .createToolSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .listToolsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .exportToolsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .getToolSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .updateToolSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .deleteToolSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .listLocationsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .getLocationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .exportToolsOperationSettings() .setInitialCallSettings( UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(ExportToolsResponse.class)) diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json index 9a10a95ef303..f376a5d09244 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json @@ -395,24 +395,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ActionParameter", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ActionParameter$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings", "queryAllDeclaredConstructors": true, @@ -5444,6 +5426,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Playbook$Instruction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Playbook$Instruction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.Playbook$Step", "queryAllDeclaredConstructors": true, @@ -6821,6 +6821,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ToolCall", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ToolCall$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult", "queryAllDeclaredConstructors": true, diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientHttpJsonTest.java index 9b37309ced94..2e7ba0565ce7 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientHttpJsonTest.java @@ -198,9 +198,6 @@ public void getAgentTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) - .setStartPlaybook( - PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -265,9 +262,6 @@ public void getAgentTest2() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) - .setStartPlaybook( - PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -332,9 +326,6 @@ public void createAgentTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) - .setStartPlaybook( - PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -401,9 +392,6 @@ public void createAgentTest2() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) - .setStartPlaybook( - PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -470,9 +458,6 @@ public void updateAgentTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) - .setStartPlaybook( - PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -499,9 +484,6 @@ public void updateAgentTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) - .setStartPlaybook( - PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -554,9 +536,6 @@ public void updateAgentExceptionTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) - .setStartPlaybook( - PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java index 97b39573188c..69c8b9431b5a 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java @@ -194,9 +194,6 @@ public void getAgentTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) - .setStartPlaybook( - PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -255,9 +252,6 @@ public void getAgentTest2() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) - .setStartPlaybook( - PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -316,9 +310,6 @@ public void createAgentTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) - .setStartPlaybook( - PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -380,9 +371,6 @@ public void createAgentTest2() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) - .setStartPlaybook( - PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -444,9 +432,6 @@ public void updateAgentTest() throws Exception { .setDescription("description-1724546052") .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) - .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) - .setStartPlaybook( - PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClientHttpJsonTest.java index dbeacc8373ca..530bc6fcba8b 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClientHttpJsonTest.java @@ -95,7 +95,7 @@ public void createPlaybookTest() throws Exception { .setGoal("goal3178259") .addAllInputParameterDefinitions(new ArrayList()) .addAllOutputParameterDefinitions(new ArrayList()) - .addAllSteps(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) .setTokenCount(-1164226743) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) @@ -153,7 +153,7 @@ public void createPlaybookTest2() throws Exception { .setGoal("goal3178259") .addAllInputParameterDefinitions(new ArrayList()) .addAllOutputParameterDefinitions(new ArrayList()) - .addAllSteps(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) .setTokenCount(-1164226743) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) @@ -393,7 +393,7 @@ public void getPlaybookTest() throws Exception { .setGoal("goal3178259") .addAllInputParameterDefinitions(new ArrayList()) .addAllOutputParameterDefinitions(new ArrayList()) - .addAllSteps(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) .setTokenCount(-1164226743) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) @@ -449,7 +449,7 @@ public void getPlaybookTest2() throws Exception { .setGoal("goal3178259") .addAllInputParameterDefinitions(new ArrayList()) .addAllOutputParameterDefinitions(new ArrayList()) - .addAllSteps(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) .setTokenCount(-1164226743) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) @@ -507,7 +507,7 @@ public void updatePlaybookTest() throws Exception { .setGoal("goal3178259") .addAllInputParameterDefinitions(new ArrayList()) .addAllOutputParameterDefinitions(new ArrayList()) - .addAllSteps(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) .setTokenCount(-1164226743) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) @@ -525,7 +525,7 @@ public void updatePlaybookTest() throws Exception { .setGoal("goal3178259") .addAllInputParameterDefinitions(new ArrayList()) .addAllOutputParameterDefinitions(new ArrayList()) - .addAllSteps(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) .setTokenCount(-1164226743) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) @@ -570,7 +570,7 @@ public void updatePlaybookExceptionTest() throws Exception { .setGoal("goal3178259") .addAllInputParameterDefinitions(new ArrayList()) .addAllOutputParameterDefinitions(new ArrayList()) - .addAllSteps(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) .setTokenCount(-1164226743) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClientTest.java index 89bd44d80399..a7d5d6dd04be 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClientTest.java @@ -102,7 +102,7 @@ public void createPlaybookTest() throws Exception { .setGoal("goal3178259") .addAllInputParameterDefinitions(new ArrayList()) .addAllOutputParameterDefinitions(new ArrayList()) - .addAllSteps(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) .setTokenCount(-1164226743) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) @@ -155,7 +155,7 @@ public void createPlaybookTest2() throws Exception { .setGoal("goal3178259") .addAllInputParameterDefinitions(new ArrayList()) .addAllOutputParameterDefinitions(new ArrayList()) - .addAllSteps(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) .setTokenCount(-1164226743) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) @@ -364,7 +364,7 @@ public void getPlaybookTest() throws Exception { .setGoal("goal3178259") .addAllInputParameterDefinitions(new ArrayList()) .addAllOutputParameterDefinitions(new ArrayList()) - .addAllSteps(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) .setTokenCount(-1164226743) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) @@ -414,7 +414,7 @@ public void getPlaybookTest2() throws Exception { .setGoal("goal3178259") .addAllInputParameterDefinitions(new ArrayList()) .addAllOutputParameterDefinitions(new ArrayList()) - .addAllSteps(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) .setTokenCount(-1164226743) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) @@ -464,7 +464,7 @@ public void updatePlaybookTest() throws Exception { .setGoal("goal3178259") .addAllInputParameterDefinitions(new ArrayList()) .addAllOutputParameterDefinitions(new ArrayList()) - .addAllSteps(new ArrayList()) + .setInstruction(Playbook.Instruction.newBuilder().build()) .setTokenCount(-1164226743) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClientHttpJsonTest.java index 7faae1b94adb..3bc722494f30 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClientHttpJsonTest.java @@ -93,8 +93,6 @@ public void createToolTest() throws Exception { .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) .setDisplayName("displayName1714148973") .setDescription("description-1724546052") - .addAllActions(new ArrayList()) - .addAllSchemas(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -143,8 +141,6 @@ public void createToolTest2() throws Exception { .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) .setDisplayName("displayName1714148973") .setDescription("description-1724546052") - .addAllActions(new ArrayList()) - .addAllSchemas(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -347,8 +343,6 @@ public void getToolTest() throws Exception { .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) .setDisplayName("displayName1714148973") .setDescription("description-1724546052") - .addAllActions(new ArrayList()) - .addAllSchemas(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -395,8 +389,6 @@ public void getToolTest2() throws Exception { .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) .setDisplayName("displayName1714148973") .setDescription("description-1724546052") - .addAllActions(new ArrayList()) - .addAllSchemas(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -444,8 +436,6 @@ public void updateToolTest() throws Exception { .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) .setDisplayName("displayName1714148973") .setDescription("description-1724546052") - .addAllActions(new ArrayList()) - .addAllSchemas(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -454,8 +444,6 @@ public void updateToolTest() throws Exception { .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) .setDisplayName("displayName1714148973") .setDescription("description-1724546052") - .addAllActions(new ArrayList()) - .addAllSchemas(new ArrayList()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -490,8 +478,6 @@ public void updateToolExceptionTest() throws Exception { .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) .setDisplayName("displayName1714148973") .setDescription("description-1724546052") - .addAllActions(new ArrayList()) - .addAllSchemas(new ArrayList()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateTool(tool, updateMask); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClientTest.java index af51a43d02c5..5e2a1a658bb2 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClientTest.java @@ -100,8 +100,6 @@ public void createToolTest() throws Exception { .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) .setDisplayName("displayName1714148973") .setDescription("description-1724546052") - .addAllActions(new ArrayList()) - .addAllSchemas(new ArrayList()) .build(); mockTools.addResponse(expectedResponse); @@ -145,8 +143,6 @@ public void createToolTest2() throws Exception { .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) .setDisplayName("displayName1714148973") .setDescription("description-1724546052") - .addAllActions(new ArrayList()) - .addAllSchemas(new ArrayList()) .build(); mockTools.addResponse(expectedResponse); @@ -333,8 +329,6 @@ public void getToolTest() throws Exception { .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) .setDisplayName("displayName1714148973") .setDescription("description-1724546052") - .addAllActions(new ArrayList()) - .addAllSchemas(new ArrayList()) .build(); mockTools.addResponse(expectedResponse); @@ -375,8 +369,6 @@ public void getToolTest2() throws Exception { .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) .setDisplayName("displayName1714148973") .setDescription("description-1724546052") - .addAllActions(new ArrayList()) - .addAllSchemas(new ArrayList()) .build(); mockTools.addResponse(expectedResponse); @@ -417,8 +409,6 @@ public void updateToolTest() throws Exception { .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) .setDisplayName("displayName1714148973") .setDescription("description-1724546052") - .addAllActions(new ArrayList()) - .addAllSchemas(new ArrayList()) .build(); mockTools.addResponse(expectedResponse); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ActionParameterOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ActionParameterOrBuilder.java deleted file mode 100644 index 00d13b62030a..000000000000 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ActionParameterOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/example.proto - -// Protobuf Java Version: 3.25.3 -package com.google.cloud.dialogflow.cx.v3beta1; - -public interface ActionParameterOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ActionParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Name of the parameter.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Name of the parameter.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. Value of the parameter.
-   * 
- * - * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the value field is set. - */ - boolean hasValue(); - /** - * - * - *
-   * Required. Value of the parameter.
-   * 
- * - * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The value. - */ - com.google.protobuf.Value getValue(); - /** - * - * - *
-   * Required. Value of the parameter.
-   * 
- * - * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.protobuf.ValueOrBuilder getValueOrBuilder(); -} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettings.java index 7cda7b843bf0..36a11232f789 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettings.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettings.java @@ -1578,6 +1578,76 @@ public interface DtmfSettingsOrBuilder * @return The bytes for finishDigit. */ com.google.protobuf.ByteString getFinishDigitBytes(); + + /** + * + * + *
+     * Interdigit timeout setting for matching dtmf input to regex.
+     * 
+ * + * .google.protobuf.Duration interdigit_timeout_duration = 6; + * + * @return Whether the interdigitTimeoutDuration field is set. + */ + boolean hasInterdigitTimeoutDuration(); + /** + * + * + *
+     * Interdigit timeout setting for matching dtmf input to regex.
+     * 
+ * + * .google.protobuf.Duration interdigit_timeout_duration = 6; + * + * @return The interdigitTimeoutDuration. + */ + com.google.protobuf.Duration getInterdigitTimeoutDuration(); + /** + * + * + *
+     * Interdigit timeout setting for matching dtmf input to regex.
+     * 
+ * + * .google.protobuf.Duration interdigit_timeout_duration = 6; + */ + com.google.protobuf.DurationOrBuilder getInterdigitTimeoutDurationOrBuilder(); + + /** + * + * + *
+     * Endpoint timeout setting for matching dtmf input to regex.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout_duration = 7; + * + * @return Whether the endpointingTimeoutDuration field is set. + */ + boolean hasEndpointingTimeoutDuration(); + /** + * + * + *
+     * Endpoint timeout setting for matching dtmf input to regex.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout_duration = 7; + * + * @return The endpointingTimeoutDuration. + */ + com.google.protobuf.Duration getEndpointingTimeoutDuration(); + /** + * + * + *
+     * Endpoint timeout setting for matching dtmf input to regex.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout_duration = 7; + */ + com.google.protobuf.DurationOrBuilder getEndpointingTimeoutDurationOrBuilder(); } /** * @@ -1623,6 +1693,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.Builder.class); } + private int bitField0_; public static final int ENABLED_FIELD_NUMBER = 1; private boolean enabled_ = false; /** @@ -1715,6 +1786,106 @@ public com.google.protobuf.ByteString getFinishDigitBytes() { } } + public static final int INTERDIGIT_TIMEOUT_DURATION_FIELD_NUMBER = 6; + private com.google.protobuf.Duration interdigitTimeoutDuration_; + /** + * + * + *
+     * Interdigit timeout setting for matching dtmf input to regex.
+     * 
+ * + * .google.protobuf.Duration interdigit_timeout_duration = 6; + * + * @return Whether the interdigitTimeoutDuration field is set. + */ + @java.lang.Override + public boolean hasInterdigitTimeoutDuration() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Interdigit timeout setting for matching dtmf input to regex.
+     * 
+ * + * .google.protobuf.Duration interdigit_timeout_duration = 6; + * + * @return The interdigitTimeoutDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getInterdigitTimeoutDuration() { + return interdigitTimeoutDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : interdigitTimeoutDuration_; + } + /** + * + * + *
+     * Interdigit timeout setting for matching dtmf input to regex.
+     * 
+ * + * .google.protobuf.Duration interdigit_timeout_duration = 6; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getInterdigitTimeoutDurationOrBuilder() { + return interdigitTimeoutDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : interdigitTimeoutDuration_; + } + + public static final int ENDPOINTING_TIMEOUT_DURATION_FIELD_NUMBER = 7; + private com.google.protobuf.Duration endpointingTimeoutDuration_; + /** + * + * + *
+     * Endpoint timeout setting for matching dtmf input to regex.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout_duration = 7; + * + * @return Whether the endpointingTimeoutDuration field is set. + */ + @java.lang.Override + public boolean hasEndpointingTimeoutDuration() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Endpoint timeout setting for matching dtmf input to regex.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout_duration = 7; + * + * @return The endpointingTimeoutDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getEndpointingTimeoutDuration() { + return endpointingTimeoutDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeoutDuration_; + } + /** + * + * + *
+     * Endpoint timeout setting for matching dtmf input to regex.
+     * 
+ * + * .google.protobuf.Duration endpointing_timeout_duration = 7; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getEndpointingTimeoutDurationOrBuilder() { + return endpointingTimeoutDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeoutDuration_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1738,6 +1909,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(finishDigit_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, finishDigit_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getInterdigitTimeoutDuration()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getEndpointingTimeoutDuration()); + } getUnknownFields().writeTo(output); } @@ -1756,6 +1933,16 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(finishDigit_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, finishDigit_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getInterdigitTimeoutDuration()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, getEndpointingTimeoutDuration()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1775,6 +1962,16 @@ public boolean equals(final java.lang.Object obj) { if (getEnabled() != other.getEnabled()) return false; if (getMaxDigits() != other.getMaxDigits()) return false; if (!getFinishDigit().equals(other.getFinishDigit())) return false; + if (hasInterdigitTimeoutDuration() != other.hasInterdigitTimeoutDuration()) return false; + if (hasInterdigitTimeoutDuration()) { + if (!getInterdigitTimeoutDuration().equals(other.getInterdigitTimeoutDuration())) + return false; + } + if (hasEndpointingTimeoutDuration() != other.hasEndpointingTimeoutDuration()) return false; + if (hasEndpointingTimeoutDuration()) { + if (!getEndpointingTimeoutDuration().equals(other.getEndpointingTimeoutDuration())) + return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1792,6 +1989,14 @@ public int hashCode() { hash = (53 * hash) + getMaxDigits(); hash = (37 * hash) + FINISH_DIGIT_FIELD_NUMBER; hash = (53 * hash) + getFinishDigit().hashCode(); + if (hasInterdigitTimeoutDuration()) { + hash = (37 * hash) + INTERDIGIT_TIMEOUT_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getInterdigitTimeoutDuration().hashCode(); + } + if (hasEndpointingTimeoutDuration()) { + hash = (37 * hash) + ENDPOINTING_TIMEOUT_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getEndpointingTimeoutDuration().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1926,10 +2131,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInterdigitTimeoutDurationFieldBuilder(); + getEndpointingTimeoutDurationFieldBuilder(); + } } @java.lang.Override @@ -1939,6 +2154,16 @@ public Builder clear() { enabled_ = false; maxDigits_ = 0; finishDigit_ = ""; + interdigitTimeoutDuration_ = null; + if (interdigitTimeoutDurationBuilder_ != null) { + interdigitTimeoutDurationBuilder_.dispose(); + interdigitTimeoutDurationBuilder_ = null; + } + endpointingTimeoutDuration_ = null; + if (endpointingTimeoutDurationBuilder_ != null) { + endpointingTimeoutDurationBuilder_.dispose(); + endpointingTimeoutDurationBuilder_ = null; + } return this; } @@ -1988,6 +2213,22 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000004) != 0)) { result.finishDigit_ = finishDigit_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.interdigitTimeoutDuration_ = + interdigitTimeoutDurationBuilder_ == null + ? interdigitTimeoutDuration_ + : interdigitTimeoutDurationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.endpointingTimeoutDuration_ = + endpointingTimeoutDurationBuilder_ == null + ? endpointingTimeoutDuration_ + : endpointingTimeoutDurationBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -2052,6 +2293,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; onChanged(); } + if (other.hasInterdigitTimeoutDuration()) { + mergeInterdigitTimeoutDuration(other.getInterdigitTimeoutDuration()); + } + if (other.hasEndpointingTimeoutDuration()) { + mergeEndpointingTimeoutDuration(other.getEndpointingTimeoutDuration()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2096,6 +2343,20 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 50: + { + input.readMessage( + getInterdigitTimeoutDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 50 + case 58: + { + input.readMessage( + getEndpointingTimeoutDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2342,6 +2603,378 @@ public Builder setFinishDigitBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.Duration interdigitTimeoutDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + interdigitTimeoutDurationBuilder_; + /** + * + * + *
+       * Interdigit timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration interdigit_timeout_duration = 6; + * + * @return Whether the interdigitTimeoutDuration field is set. + */ + public boolean hasInterdigitTimeoutDuration() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Interdigit timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration interdigit_timeout_duration = 6; + * + * @return The interdigitTimeoutDuration. + */ + public com.google.protobuf.Duration getInterdigitTimeoutDuration() { + if (interdigitTimeoutDurationBuilder_ == null) { + return interdigitTimeoutDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : interdigitTimeoutDuration_; + } else { + return interdigitTimeoutDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Interdigit timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration interdigit_timeout_duration = 6; + */ + public Builder setInterdigitTimeoutDuration(com.google.protobuf.Duration value) { + if (interdigitTimeoutDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interdigitTimeoutDuration_ = value; + } else { + interdigitTimeoutDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Interdigit timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration interdigit_timeout_duration = 6; + */ + public Builder setInterdigitTimeoutDuration( + com.google.protobuf.Duration.Builder builderForValue) { + if (interdigitTimeoutDurationBuilder_ == null) { + interdigitTimeoutDuration_ = builderForValue.build(); + } else { + interdigitTimeoutDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Interdigit timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration interdigit_timeout_duration = 6; + */ + public Builder mergeInterdigitTimeoutDuration(com.google.protobuf.Duration value) { + if (interdigitTimeoutDurationBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && interdigitTimeoutDuration_ != null + && interdigitTimeoutDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getInterdigitTimeoutDurationBuilder().mergeFrom(value); + } else { + interdigitTimeoutDuration_ = value; + } + } else { + interdigitTimeoutDurationBuilder_.mergeFrom(value); + } + if (interdigitTimeoutDuration_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Interdigit timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration interdigit_timeout_duration = 6; + */ + public Builder clearInterdigitTimeoutDuration() { + bitField0_ = (bitField0_ & ~0x00000008); + interdigitTimeoutDuration_ = null; + if (interdigitTimeoutDurationBuilder_ != null) { + interdigitTimeoutDurationBuilder_.dispose(); + interdigitTimeoutDurationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Interdigit timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration interdigit_timeout_duration = 6; + */ + public com.google.protobuf.Duration.Builder getInterdigitTimeoutDurationBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getInterdigitTimeoutDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Interdigit timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration interdigit_timeout_duration = 6; + */ + public com.google.protobuf.DurationOrBuilder getInterdigitTimeoutDurationOrBuilder() { + if (interdigitTimeoutDurationBuilder_ != null) { + return interdigitTimeoutDurationBuilder_.getMessageOrBuilder(); + } else { + return interdigitTimeoutDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : interdigitTimeoutDuration_; + } + } + /** + * + * + *
+       * Interdigit timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration interdigit_timeout_duration = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getInterdigitTimeoutDurationFieldBuilder() { + if (interdigitTimeoutDurationBuilder_ == null) { + interdigitTimeoutDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getInterdigitTimeoutDuration(), getParentForChildren(), isClean()); + interdigitTimeoutDuration_ = null; + } + return interdigitTimeoutDurationBuilder_; + } + + private com.google.protobuf.Duration endpointingTimeoutDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + endpointingTimeoutDurationBuilder_; + /** + * + * + *
+       * Endpoint timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration endpointing_timeout_duration = 7; + * + * @return Whether the endpointingTimeoutDuration field is set. + */ + public boolean hasEndpointingTimeoutDuration() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+       * Endpoint timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration endpointing_timeout_duration = 7; + * + * @return The endpointingTimeoutDuration. + */ + public com.google.protobuf.Duration getEndpointingTimeoutDuration() { + if (endpointingTimeoutDurationBuilder_ == null) { + return endpointingTimeoutDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeoutDuration_; + } else { + return endpointingTimeoutDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Endpoint timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration endpointing_timeout_duration = 7; + */ + public Builder setEndpointingTimeoutDuration(com.google.protobuf.Duration value) { + if (endpointingTimeoutDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointingTimeoutDuration_ = value; + } else { + endpointingTimeoutDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Endpoint timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration endpointing_timeout_duration = 7; + */ + public Builder setEndpointingTimeoutDuration( + com.google.protobuf.Duration.Builder builderForValue) { + if (endpointingTimeoutDurationBuilder_ == null) { + endpointingTimeoutDuration_ = builderForValue.build(); + } else { + endpointingTimeoutDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Endpoint timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration endpointing_timeout_duration = 7; + */ + public Builder mergeEndpointingTimeoutDuration(com.google.protobuf.Duration value) { + if (endpointingTimeoutDurationBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && endpointingTimeoutDuration_ != null + && endpointingTimeoutDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getEndpointingTimeoutDurationBuilder().mergeFrom(value); + } else { + endpointingTimeoutDuration_ = value; + } + } else { + endpointingTimeoutDurationBuilder_.mergeFrom(value); + } + if (endpointingTimeoutDuration_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Endpoint timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration endpointing_timeout_duration = 7; + */ + public Builder clearEndpointingTimeoutDuration() { + bitField0_ = (bitField0_ & ~0x00000010); + endpointingTimeoutDuration_ = null; + if (endpointingTimeoutDurationBuilder_ != null) { + endpointingTimeoutDurationBuilder_.dispose(); + endpointingTimeoutDurationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Endpoint timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration endpointing_timeout_duration = 7; + */ + public com.google.protobuf.Duration.Builder getEndpointingTimeoutDurationBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getEndpointingTimeoutDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Endpoint timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration endpointing_timeout_duration = 7; + */ + public com.google.protobuf.DurationOrBuilder getEndpointingTimeoutDurationOrBuilder() { + if (endpointingTimeoutDurationBuilder_ != null) { + return endpointingTimeoutDurationBuilder_.getMessageOrBuilder(); + } else { + return endpointingTimeoutDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endpointingTimeoutDuration_; + } + } + /** + * + * + *
+       * Endpoint timeout setting for matching dtmf input to regex.
+       * 
+ * + * .google.protobuf.Duration endpointing_timeout_duration = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getEndpointingTimeoutDurationFieldBuilder() { + if (endpointingTimeoutDurationBuilder_ == null) { + endpointingTimeoutDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEndpointingTimeoutDuration(), getParentForChildren(), isClean()); + endpointingTimeoutDuration_ = null; + } + return endpointingTimeoutDurationBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettingsProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettingsProto.java index 0d342ee5ec3d..31701a029f45 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettingsProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AdvancedSettingsProto.java @@ -62,7 +62,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "gflow.cx.v3beta1\032\037google/api/field_behav" + "ior.proto\032,google/cloud/dialogflow/cx/v3" + "beta1/gcs.proto\032\036google/protobuf/duratio" - + "n.proto\"\312\006\n\020AdvancedSettings\022X\n\034audio_ex" + + "n.proto\"\314\007\n\020AdvancedSettings\022X\n\034audio_ex" + "port_gcs_destination\030\002 \001(\01322.google.clou" + "d.dialogflow.cx.v3beta1.GcsDestination\022\\" + "\n\017speech_settings\030\003 \001(\0132C.google.cloud.d" @@ -79,16 +79,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".google.cloud.dialogflow.cx.v3beta1.Adva" + "ncedSettings.SpeechSettings.ModelsEntry\032" + "-\n\013ModelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" - + "(\t:\0028\001\032I\n\014DtmfSettings\022\017\n\007enabled\030\001 \001(\010\022" - + "\022\n\nmax_digits\030\002 \001(\005\022\024\n\014finish_digit\030\003 \001(" - + "\t\032Y\n\017LoggingSettings\022\"\n\032enable_stackdriv" - + "er_logging\030\002 \001(\010\022\"\n\032enable_interaction_l" - + "ogging\030\003 \001(\010B\317\001\n&com.google.cloud.dialog" - + "flow.cx.v3beta1B\025AdvancedSettingsProtoP\001" - + "Z6cloud.google.com/go/dialogflow/cx/apiv" - + "3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud." - + "Dialogflow.Cx.V3Beta1\352\002&Google::Cloud::D" - + "ialogflow::CX::V3beta1b\006proto3" + + "(\t:\0028\001\032\312\001\n\014DtmfSettings\022\017\n\007enabled\030\001 \001(\010" + + "\022\022\n\nmax_digits\030\002 \001(\005\022\024\n\014finish_digit\030\003 \001" + + "(\t\022>\n\033interdigit_timeout_duration\030\006 \001(\0132" + + "\031.google.protobuf.Duration\022?\n\034endpointin" + + "g_timeout_duration\030\007 \001(\0132\031.google.protob" + + "uf.Duration\032Y\n\017LoggingSettings\022\"\n\032enable" + + "_stackdriver_logging\030\002 \001(\010\022\"\n\032enable_int" + + "eraction_logging\030\003 \001(\010B\317\001\n&com.google.cl" + + "oud.dialogflow.cx.v3beta1B\025AdvancedSetti" + + "ngsProtoP\001Z6cloud.google.com/go/dialogfl" + + "ow/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Goo" + + "gle.Cloud.Dialogflow.Cx.V3Beta1\352\002&Google" + + "::Cloud::Dialogflow::CX::V3beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -134,7 +137,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_DtmfSettings_descriptor, new java.lang.String[] { - "Enabled", "MaxDigits", "FinishDigit", + "Enabled", + "MaxDigits", + "FinishDigit", + "InterdigitTimeoutDuration", + "EndpointingTimeoutDuration", }); internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_LoggingSettings_descriptor = internal_static_google_cloud_dialogflow_cx_v3beta1_AdvancedSettings_descriptor diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java index 47132652fae3..6ac4065876c9 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java @@ -58,8 +58,6 @@ private Agent() { timeZone_ = ""; description_ = ""; avatarUri_ = ""; - startFlow_ = ""; - startPlaybook_ = ""; securitySettings_ = ""; } @@ -4815,6 +4813,55 @@ public com.google.protobuf.Parser getParserForType() { } private int bitField0_; + private int sessionEntryResourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object sessionEntryResource_; + + public enum SessionEntryResourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + START_FLOW(16), + START_PLAYBOOK(39), + SESSIONENTRYRESOURCE_NOT_SET(0); + private final int value; + + private SessionEntryResourceCase(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 SessionEntryResourceCase valueOf(int value) { + return forNumber(value); + } + + public static SessionEntryResourceCase forNumber(int value) { + switch (value) { + case 16: + return START_FLOW; + case 39: + return START_PLAYBOOK; + case 0: + return SESSIONENTRYRESOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SessionEntryResourceCase getSessionEntryResourceCase() { + return SessionEntryResourceCase.forNumber(sessionEntryResourceCase_); + } + public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -5284,34 +5331,54 @@ public com.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings getSpeechToTe } public static final int START_FLOW_FIELD_NUMBER = 16; - - @SuppressWarnings("serial") - private volatile java.lang.Object startFlow_ = ""; /** * * *
-   * Immutable. Name of the start flow in this agent. A start flow will be
-   * automatically created when the agent is created, and can only be deleted by
-   * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-   * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+   * Name of the start flow in this agent. A start flow will be automatically
+   * created when the agent is created, and can only be deleted by deleting
+   * the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+   * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
    * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } + * + * @return Whether the startFlow field is set. + */ + public boolean hasStartFlow() { + return sessionEntryResourceCase_ == 16; + } + /** + * + * + *
+   * Name of the start flow in this agent. A start flow will be automatically
+   * created when the agent is created, and can only be deleted by deleting
+   * the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+   * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
+   * 
+ * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @return The startFlow. */ - @java.lang.Override public java.lang.String getStartFlow() { - java.lang.Object ref = startFlow_; + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 16) { + ref = sessionEntryResource_; + } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - startFlow_ = s; + if (sessionEntryResourceCase_ == 16) { + sessionEntryResource_ = s; + } return s; } } @@ -5319,25 +5386,29 @@ public java.lang.String getStartFlow() { * * *
-   * Immutable. Name of the start flow in this agent. A start flow will be
-   * automatically created when the agent is created, and can only be deleted by
-   * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-   * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+   * Name of the start flow in this agent. A start flow will be automatically
+   * created when the agent is created, and can only be deleted by deleting
+   * the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+   * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
    * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @return The bytes for startFlow. */ - @java.lang.Override public com.google.protobuf.ByteString getStartFlowBytes() { - java.lang.Object ref = startFlow_; + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 16) { + ref = sessionEntryResource_; + } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - startFlow_ = b; + if (sessionEntryResourceCase_ == 16) { + sessionEntryResource_ = b; + } return b; } else { return (com.google.protobuf.ByteString) ref; @@ -5345,39 +5416,56 @@ public com.google.protobuf.ByteString getStartFlowBytes() { } public static final int START_PLAYBOOK_FIELD_NUMBER = 39; - - @SuppressWarnings("serial") - private volatile java.lang.Object startPlaybook_ = ""; /** * * *
-   * Optional. Name of the start playbook in this agent. A start playbook will
-   * be automatically created when the agent is created, and can only be deleted
+   * Name of the start playbook in this agent. A start playbook will be
+   * automatically created when the agent is created, and can only be deleted
    * by deleting the agent.
    * Format: `projects/<Project ID>/locations/<Location
    * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
    * default playbook with id
    * "00000000-0000-0000-0000-000000000000" is allowed.
+   * 
+ * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } + * + * @return Whether the startPlaybook field is set. + */ + public boolean hasStartPlaybook() { + return sessionEntryResourceCase_ == 39; + } + /** + * * - * Only one of `start_flow` or `start_playbook` should be set, but not both. + *
+   * Name of the start playbook in this agent. A start playbook will be
+   * automatically created when the agent is created, and can only be deleted
+   * by deleting the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
+   * default playbook with id
+   * "00000000-0000-0000-0000-000000000000" is allowed.
    * 
* - * - * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } * * @return The startPlaybook. */ - @java.lang.Override public java.lang.String getStartPlaybook() { - java.lang.Object ref = startPlaybook_; + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 39) { + ref = sessionEntryResource_; + } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - startPlaybook_ = s; + if (sessionEntryResourceCase_ == 39) { + sessionEntryResource_ = s; + } return s; } } @@ -5385,30 +5473,30 @@ public java.lang.String getStartPlaybook() { * * *
-   * Optional. Name of the start playbook in this agent. A start playbook will
-   * be automatically created when the agent is created, and can only be deleted
+   * Name of the start playbook in this agent. A start playbook will be
+   * automatically created when the agent is created, and can only be deleted
    * by deleting the agent.
    * Format: `projects/<Project ID>/locations/<Location
    * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
    * default playbook with id
    * "00000000-0000-0000-0000-000000000000" is allowed.
-   *
-   * Only one of `start_flow` or `start_playbook` should be set, but not both.
    * 
* - * - * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } * * @return The bytes for startPlaybook. */ - @java.lang.Override public com.google.protobuf.ByteString getStartPlaybookBytes() { - java.lang.Object ref = startPlaybook_; + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 39) { + ref = sessionEntryResource_; + } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - startPlaybook_ = b; + if (sessionEntryResourceCase_ == 39) { + sessionEntryResource_ = b; + } return b; } else { return (com.google.protobuf.ByteString) ref; @@ -5487,7 +5575,7 @@ public com.google.protobuf.ByteString getSecuritySettingsBytes() { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.Agent.enable_stackdriver_logging is deprecated. - * See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=353 + * See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=352 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -5939,8 +6027,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(13, getSpeechToTextSettings()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startFlow_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 16, startFlow_); + if (sessionEntryResourceCase_ == 16) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, sessionEntryResource_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(securitySettings_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 17, securitySettings_); @@ -5969,8 +6057,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(38, getAnswerFeedbackSettings()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startPlaybook_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 39, startPlaybook_); + if (sessionEntryResourceCase_ == 39) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 39, sessionEntryResource_); } if (enableMultiLanguageTraining_ != false) { output.writeBool(40, enableMultiLanguageTraining_); @@ -6017,8 +6105,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getSpeechToTextSettings()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startFlow_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, startFlow_); + if (sessionEntryResourceCase_ == 16) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, sessionEntryResource_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(securitySettings_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, securitySettings_); @@ -6051,8 +6139,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(38, getAnswerFeedbackSettings()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startPlaybook_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(39, startPlaybook_); + if (sessionEntryResourceCase_ == 39) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(39, sessionEntryResource_); } if (enableMultiLanguageTraining_ != false) { size += @@ -6091,8 +6179,6 @@ public boolean equals(final java.lang.Object obj) { if (hasSpeechToTextSettings()) { if (!getSpeechToTextSettings().equals(other.getSpeechToTextSettings())) return false; } - if (!getStartFlow().equals(other.getStartFlow())) return false; - if (!getStartPlaybook().equals(other.getStartPlaybook())) return false; if (!getSecuritySettings().equals(other.getSecuritySettings())) return false; if (getEnableStackdriverLogging() != other.getEnableStackdriverLogging()) return false; if (getEnableSpellCorrection() != other.getEnableSpellCorrection()) return false; @@ -6122,6 +6208,17 @@ public boolean equals(final java.lang.Object obj) { if (hasPersonalizationSettings()) { if (!getPersonalizationSettings().equals(other.getPersonalizationSettings())) return false; } + if (!getSessionEntryResourceCase().equals(other.getSessionEntryResourceCase())) return false; + switch (sessionEntryResourceCase_) { + case 16: + if (!getStartFlow().equals(other.getStartFlow())) return false; + break; + case 39: + if (!getStartPlaybook().equals(other.getStartPlaybook())) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6153,10 +6250,6 @@ public int hashCode() { hash = (37 * hash) + SPEECH_TO_TEXT_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getSpeechToTextSettings().hashCode(); } - hash = (37 * hash) + START_FLOW_FIELD_NUMBER; - hash = (53 * hash) + getStartFlow().hashCode(); - hash = (37 * hash) + START_PLAYBOOK_FIELD_NUMBER; - hash = (53 * hash) + getStartPlaybook().hashCode(); hash = (37 * hash) + SECURITY_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getSecuritySettings().hashCode(); hash = (37 * hash) + ENABLE_STACKDRIVER_LOGGING_FIELD_NUMBER; @@ -6191,6 +6284,18 @@ public int hashCode() { hash = (37 * hash) + PERSONALIZATION_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getPersonalizationSettings().hashCode(); } + switch (sessionEntryResourceCase_) { + case 16: + hash = (37 * hash) + START_FLOW_FIELD_NUMBER; + hash = (53 * hash) + getStartFlow().hashCode(); + break; + case 39: + hash = (37 * hash) + START_PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getStartPlaybook().hashCode(); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -6369,8 +6474,6 @@ public Builder clear() { speechToTextSettingsBuilder_.dispose(); speechToTextSettingsBuilder_ = null; } - startFlow_ = ""; - startPlaybook_ = ""; securitySettings_ = ""; enableStackdriverLogging_ = false; enableSpellCorrection_ = false; @@ -6406,6 +6509,8 @@ public Builder clear() { personalizationSettingsBuilder_.dispose(); personalizationSettingsBuilder_ = null; } + sessionEntryResourceCase_ = 0; + sessionEntryResource_ = null; return this; } @@ -6436,6 +6541,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.Agent buildPartial() { if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -6472,12 +6578,6 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Agent result) : speechToTextSettingsBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.startFlow_ = startFlow_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.startPlaybook_ = startPlaybook_; - } if (((from_bitField0_ & 0x00000400) != 0)) { result.securitySettings_ = securitySettings_; } @@ -6536,6 +6636,11 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Agent result) result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3beta1.Agent result) { + result.sessionEntryResourceCase_ = sessionEntryResourceCase_; + result.sessionEntryResource_ = this.sessionEntryResource_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -6624,16 +6729,6 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Agent other) { if (other.hasSpeechToTextSettings()) { mergeSpeechToTextSettings(other.getSpeechToTextSettings()); } - if (!other.getStartFlow().isEmpty()) { - startFlow_ = other.startFlow_; - bitField0_ |= 0x00000100; - onChanged(); - } - if (!other.getStartPlaybook().isEmpty()) { - startPlaybook_ = other.startPlaybook_; - bitField0_ |= 0x00000200; - onChanged(); - } if (!other.getSecuritySettings().isEmpty()) { securitySettings_ = other.securitySettings_; bitField0_ |= 0x00000400; @@ -6669,6 +6764,26 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Agent other) { if (other.hasPersonalizationSettings()) { mergePersonalizationSettings(other.getPersonalizationSettings()); } + switch (other.getSessionEntryResourceCase()) { + case START_FLOW: + { + sessionEntryResourceCase_ = 16; + sessionEntryResource_ = other.sessionEntryResource_; + onChanged(); + break; + } + case START_PLAYBOOK: + { + sessionEntryResourceCase_ = 39; + sessionEntryResource_ = other.sessionEntryResource_; + onChanged(); + break; + } + case SESSIONENTRYRESOURCE_NOT_SET: + { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -6747,8 +6862,9 @@ public Builder mergeFrom( } // case 106 case 130: { - startFlow_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; + java.lang.String s = input.readStringRequireUtf8(); + sessionEntryResourceCase_ = 16; + sessionEntryResource_ = s; break; } // case 130 case 138: @@ -6812,8 +6928,9 @@ public Builder mergeFrom( } // case 306 case 314: { - startPlaybook_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; + java.lang.String s = input.readStringRequireUtf8(); + sessionEntryResourceCase_ = 39; + sessionEntryResource_ = s; break; } // case 314 case 320: @@ -6846,6 +6963,20 @@ public Builder mergeFrom( return this; } + private int sessionEntryResourceCase_ = 0; + private java.lang.Object sessionEntryResource_; + + public SessionEntryResourceCase getSessionEntryResourceCase() { + return SessionEntryResourceCase.forNumber(sessionEntryResourceCase_); + } + + public Builder clearSessionEntryResource() { + sessionEntryResourceCase_ = 0; + sessionEntryResource_ = null; + onChanged(); + return this; + } + private int bitField0_; private java.lang.Object name_ = ""; @@ -7969,29 +8100,54 @@ public Builder clearSpeechToTextSettings() { return speechToTextSettingsBuilder_; } - private java.lang.Object startFlow_ = ""; /** * * *
-     * Immutable. Name of the start flow in this agent. A start flow will be
-     * automatically created when the agent is created, and can only be deleted by
-     * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-     * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+     * Name of the start flow in this agent. A start flow will be automatically
+     * created when the agent is created, and can only be deleted by deleting
+     * the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+     * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
      * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } + * + * @return Whether the startFlow field is set. + */ + @java.lang.Override + public boolean hasStartFlow() { + return sessionEntryResourceCase_ == 16; + } + /** + * + * + *
+     * Name of the start flow in this agent. A start flow will be automatically
+     * created when the agent is created, and can only be deleted by deleting
+     * the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+     * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
+     * 
+ * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @return The startFlow. */ + @java.lang.Override public java.lang.String getStartFlow() { - java.lang.Object ref = startFlow_; + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 16) { + ref = sessionEntryResource_; + } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - startFlow_ = s; + if (sessionEntryResourceCase_ == 16) { + sessionEntryResource_ = s; + } return s; } else { return (java.lang.String) ref; @@ -8001,24 +8157,30 @@ public java.lang.String getStartFlow() { * * *
-     * Immutable. Name of the start flow in this agent. A start flow will be
-     * automatically created when the agent is created, and can only be deleted by
-     * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-     * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+     * Name of the start flow in this agent. A start flow will be automatically
+     * created when the agent is created, and can only be deleted by deleting
+     * the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+     * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
      * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @return The bytes for startFlow. */ + @java.lang.Override public com.google.protobuf.ByteString getStartFlowBytes() { - java.lang.Object ref = startFlow_; + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 16) { + ref = sessionEntryResource_; + } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - startFlow_ = b; + if (sessionEntryResourceCase_ == 16) { + sessionEntryResource_ = b; + } return b; } else { return (com.google.protobuf.ByteString) ref; @@ -8028,15 +8190,15 @@ public com.google.protobuf.ByteString getStartFlowBytes() { * * *
-     * Immutable. Name of the start flow in this agent. A start flow will be
-     * automatically created when the agent is created, and can only be deleted by
-     * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-     * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+     * Name of the start flow in this agent. A start flow will be automatically
+     * created when the agent is created, and can only be deleted by deleting
+     * the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+     * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
      * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @param value The startFlow to set. * @return This builder for chaining. @@ -8045,8 +8207,8 @@ public Builder setStartFlow(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - startFlow_ = value; - bitField0_ |= 0x00000100; + sessionEntryResourceCase_ = 16; + sessionEntryResource_ = value; onChanged(); return this; } @@ -8054,37 +8216,39 @@ public Builder setStartFlow(java.lang.String value) { * * *
-     * Immutable. Name of the start flow in this agent. A start flow will be
-     * automatically created when the agent is created, and can only be deleted by
-     * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-     * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+     * Name of the start flow in this agent. A start flow will be automatically
+     * created when the agent is created, and can only be deleted by deleting
+     * the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+     * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
      * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ public Builder clearStartFlow() { - startFlow_ = getDefaultInstance().getStartFlow(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); + if (sessionEntryResourceCase_ == 16) { + sessionEntryResourceCase_ = 0; + sessionEntryResource_ = null; + onChanged(); + } return this; } /** * * *
-     * Immutable. Name of the start flow in this agent. A start flow will be
-     * automatically created when the agent is created, and can only be deleted by
-     * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-     * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+     * Name of the start flow in this agent. A start flow will be automatically
+     * created when the agent is created, and can only be deleted by deleting
+     * the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+     * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
      * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @param value The bytes for startFlow to set. * @return This builder for chaining. @@ -8094,40 +8258,62 @@ public Builder setStartFlowBytes(com.google.protobuf.ByteString value) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - startFlow_ = value; - bitField0_ |= 0x00000100; + sessionEntryResourceCase_ = 16; + sessionEntryResource_ = value; onChanged(); return this; } - private java.lang.Object startPlaybook_ = ""; /** * * *
-     * Optional. Name of the start playbook in this agent. A start playbook will
-     * be automatically created when the agent is created, and can only be deleted
+     * Name of the start playbook in this agent. A start playbook will be
+     * automatically created when the agent is created, and can only be deleted
      * by deleting the agent.
      * Format: `projects/<Project ID>/locations/<Location
      * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
      * default playbook with id
      * "00000000-0000-0000-0000-000000000000" is allowed.
+     * 
+ * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } + * + * @return Whether the startPlaybook field is set. + */ + @java.lang.Override + public boolean hasStartPlaybook() { + return sessionEntryResourceCase_ == 39; + } + /** * - * Only one of `start_flow` or `start_playbook` should be set, but not both. + * + *
+     * Name of the start playbook in this agent. A start playbook will be
+     * automatically created when the agent is created, and can only be deleted
+     * by deleting the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
+     * default playbook with id
+     * "00000000-0000-0000-0000-000000000000" is allowed.
      * 
* - * - * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } * * @return The startPlaybook. */ + @java.lang.Override public java.lang.String getStartPlaybook() { - java.lang.Object ref = startPlaybook_; + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 39) { + ref = sessionEntryResource_; + } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - startPlaybook_ = s; + if (sessionEntryResourceCase_ == 39) { + sessionEntryResource_ = s; + } return s; } else { return (java.lang.String) ref; @@ -8137,29 +8323,31 @@ public java.lang.String getStartPlaybook() { * * *
-     * Optional. Name of the start playbook in this agent. A start playbook will
-     * be automatically created when the agent is created, and can only be deleted
+     * Name of the start playbook in this agent. A start playbook will be
+     * automatically created when the agent is created, and can only be deleted
      * by deleting the agent.
      * Format: `projects/<Project ID>/locations/<Location
      * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
      * default playbook with id
      * "00000000-0000-0000-0000-000000000000" is allowed.
-     *
-     * Only one of `start_flow` or `start_playbook` should be set, but not both.
      * 
* - * - * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } * * @return The bytes for startPlaybook. */ + @java.lang.Override public com.google.protobuf.ByteString getStartPlaybookBytes() { - java.lang.Object ref = startPlaybook_; + java.lang.Object ref = ""; + if (sessionEntryResourceCase_ == 39) { + ref = sessionEntryResource_; + } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - startPlaybook_ = b; + if (sessionEntryResourceCase_ == 39) { + sessionEntryResource_ = b; + } return b; } else { return (com.google.protobuf.ByteString) ref; @@ -8169,20 +8357,16 @@ public com.google.protobuf.ByteString getStartPlaybookBytes() { * * *
-     * Optional. Name of the start playbook in this agent. A start playbook will
-     * be automatically created when the agent is created, and can only be deleted
+     * Name of the start playbook in this agent. A start playbook will be
+     * automatically created when the agent is created, and can only be deleted
      * by deleting the agent.
      * Format: `projects/<Project ID>/locations/<Location
      * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
      * default playbook with id
      * "00000000-0000-0000-0000-000000000000" is allowed.
-     *
-     * Only one of `start_flow` or `start_playbook` should be set, but not both.
      * 
* - * - * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } * * @param value The startPlaybook to set. * @return This builder for chaining. @@ -8191,8 +8375,8 @@ public Builder setStartPlaybook(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - startPlaybook_ = value; - bitField0_ |= 0x00000200; + sessionEntryResourceCase_ = 39; + sessionEntryResource_ = value; onChanged(); return this; } @@ -8200,47 +8384,41 @@ public Builder setStartPlaybook(java.lang.String value) { * * *
-     * Optional. Name of the start playbook in this agent. A start playbook will
-     * be automatically created when the agent is created, and can only be deleted
+     * Name of the start playbook in this agent. A start playbook will be
+     * automatically created when the agent is created, and can only be deleted
      * by deleting the agent.
      * Format: `projects/<Project ID>/locations/<Location
      * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
      * default playbook with id
      * "00000000-0000-0000-0000-000000000000" is allowed.
-     *
-     * Only one of `start_flow` or `start_playbook` should be set, but not both.
      * 
* - * - * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ public Builder clearStartPlaybook() { - startPlaybook_ = getDefaultInstance().getStartPlaybook(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); + if (sessionEntryResourceCase_ == 39) { + sessionEntryResourceCase_ = 0; + sessionEntryResource_ = null; + onChanged(); + } return this; } /** * * *
-     * Optional. Name of the start playbook in this agent. A start playbook will
-     * be automatically created when the agent is created, and can only be deleted
+     * Name of the start playbook in this agent. A start playbook will be
+     * automatically created when the agent is created, and can only be deleted
      * by deleting the agent.
      * Format: `projects/<Project ID>/locations/<Location
      * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
      * default playbook with id
      * "00000000-0000-0000-0000-000000000000" is allowed.
-     *
-     * Only one of `start_flow` or `start_playbook` should be set, but not both.
      * 
* - * - * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } * * @param value The bytes for startPlaybook to set. * @return This builder for chaining. @@ -8250,8 +8428,8 @@ public Builder setStartPlaybookBytes(com.google.protobuf.ByteString value) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - startPlaybook_ = value; - bitField0_ |= 0x00000200; + sessionEntryResourceCase_ = 39; + sessionEntryResource_ = value; onChanged(); return this; } @@ -8391,7 +8569,7 @@ public Builder setSecuritySettingsBytes(com.google.protobuf.ByteString value) { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.Agent.enable_stackdriver_logging is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=353 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=352 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -8412,7 +8590,7 @@ public boolean getEnableStackdriverLogging() { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.Agent.enable_stackdriver_logging is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=353 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=352 * @param value The enableStackdriverLogging to set. * @return This builder for chaining. */ @@ -8437,7 +8615,7 @@ public Builder setEnableStackdriverLogging(boolean value) { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.Agent.enable_stackdriver_logging is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=353 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=352 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java index b56eadf916a6..8bba9a18e046 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java @@ -312,15 +312,32 @@ public interface AgentOrBuilder * * *
-   * Immutable. Name of the start flow in this agent. A start flow will be
-   * automatically created when the agent is created, and can only be deleted by
-   * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-   * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+   * Name of the start flow in this agent. A start flow will be automatically
+   * created when the agent is created, and can only be deleted by deleting
+   * the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+   * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
    * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } + * + * @return Whether the startFlow field is set. + */ + boolean hasStartFlow(); + /** + * + * + *
+   * Name of the start flow in this agent. A start flow will be automatically
+   * created when the agent is created, and can only be deleted by deleting
+   * the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+   * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
+   * 
+ * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @return The startFlow. */ @@ -329,15 +346,15 @@ public interface AgentOrBuilder * * *
-   * Immutable. Name of the start flow in this agent. A start flow will be
-   * automatically created when the agent is created, and can only be deleted by
-   * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-   * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+   * Name of the start flow in this agent. A start flow will be automatically
+   * created when the agent is created, and can only be deleted by deleting
+   * the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+   * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
    * 
* - * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * + * string start_flow = 16 [(.google.api.resource_reference) = { ... } * * @return The bytes for startFlow. */ @@ -347,20 +364,34 @@ public interface AgentOrBuilder * * *
-   * Optional. Name of the start playbook in this agent. A start playbook will
-   * be automatically created when the agent is created, and can only be deleted
+   * Name of the start playbook in this agent. A start playbook will be
+   * automatically created when the agent is created, and can only be deleted
    * by deleting the agent.
    * Format: `projects/<Project ID>/locations/<Location
    * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
    * default playbook with id
    * "00000000-0000-0000-0000-000000000000" is allowed.
+   * 
+ * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } * - * Only one of `start_flow` or `start_playbook` should be set, but not both. + * @return Whether the startPlaybook field is set. + */ + boolean hasStartPlaybook(); + /** + * + * + *
+   * Name of the start playbook in this agent. A start playbook will be
+   * automatically created when the agent is created, and can only be deleted
+   * by deleting the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
+   * default playbook with id
+   * "00000000-0000-0000-0000-000000000000" is allowed.
    * 
* - * - * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } * * @return The startPlaybook. */ @@ -369,20 +400,16 @@ public interface AgentOrBuilder * * *
-   * Optional. Name of the start playbook in this agent. A start playbook will
-   * be automatically created when the agent is created, and can only be deleted
+   * Name of the start playbook in this agent. A start playbook will be
+   * automatically created when the agent is created, and can only be deleted
    * by deleting the agent.
    * Format: `projects/<Project ID>/locations/<Location
    * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
    * default playbook with id
    * "00000000-0000-0000-0000-000000000000" is allowed.
-   *
-   * Only one of `start_flow` or `start_playbook` should be set, but not both.
    * 
* - * - * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * + * string start_playbook = 39 [(.google.api.resource_reference) = { ... } * * @return The bytes for startPlaybook. */ @@ -432,7 +459,7 @@ public interface AgentOrBuilder * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.Agent.enable_stackdriver_logging is deprecated. - * See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=353 + * See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=352 * @return The enableStackdriverLogging. */ @java.lang.Deprecated @@ -728,4 +755,7 @@ public interface AgentOrBuilder */ com.google.cloud.dialogflow.cx.v3beta1.Agent.PersonalizationSettingsOrBuilder getPersonalizationSettingsOrBuilder(); + + com.google.cloud.dialogflow.cx.v3beta1.Agent.SessionEntryResourceCase + getSessionEntryResourceCase(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java index 4562301ce5c1..50c06e362338 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java @@ -144,183 +144,183 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pty.proto\032 google/protobuf/field_mask.pr" + "oto\032\034google/protobuf/struct.proto\"8\n\024Spe" + "echToTextSettings\022 \n\030enable_speech_adapt" - + "ation\030\001 \001(\010\"\216\016\n\005Agent\022\014\n\004name\030\001 \001(\t\022\031\n\014d" + + "ation\030\001 \001(\010\"\246\016\n\005Agent\022\014\n\004name\030\001 \001(\t\022\031\n\014d" + "isplay_name\030\002 \001(\tB\003\340A\002\022%\n\025default_langua" + "ge_code\030\003 \001(\tB\006\340A\002\340A\005\022 \n\030supported_langu" + "age_codes\030\004 \003(\t\022\026\n\ttime_zone\030\005 \001(\tB\003\340A\002\022" + "\023\n\013description\030\006 \001(\t\022\022\n\navatar_uri\030\007 \001(\t" + "\022Y\n\027speech_to_text_settings\030\r \001(\01328.goog" + "le.cloud.dialogflow.cx.v3beta1.SpeechToT" - + "extSettings\022:\n\nstart_flow\030\020 \001(\tB&\340A\005\372A \n" - + "\036dialogflow.googleapis.com/Flow\022B\n\016start" - + "_playbook\030\' \001(\tB*\340A\001\372A$\n\"dialogflow.goog" - + "leapis.com/Playbook\022J\n\021security_settings" - + "\030\021 \001(\tB/\372A,\n*dialogflow.googleapis.com/S" - + "ecuritySettings\022&\n\032enable_stackdriver_lo" - + "gging\030\022 \001(\010B\002\030\001\022\037\n\027enable_spell_correcti" - + "on\030\024 \001(\010\022+\n\036enable_multi_language_traini" - + "ng\030( \001(\010B\003\340A\001\022\016\n\006locked\030\033 \001(\010\022O\n\021advance" - + "d_settings\030\026 \001(\01324.google.cloud.dialogfl" - + "ow.cx.v3beta1.AdvancedSettings\022b\n\030git_in" - + "tegration_settings\030\036 \001(\0132@.google.cloud." - + "dialogflow.cx.v3beta1.Agent.GitIntegrati" - + "onSettings\022Y\n\027text_to_speech_settings\030\037 " - + "\001(\01328.google.cloud.dialogflow.cx.v3beta1" - + ".TextToSpeechSettings\022f\n\030gen_app_builder" - + "_settings\030! \001(\0132?.google.cloud.dialogflo" - + "w.cx.v3beta1.Agent.GenAppBuilderSettings" - + "H\000\210\001\001\022g\n\030answer_feedback_settings\030& \001(\0132" - + "@.google.cloud.dialogflow.cx.v3beta1.Age" - + "nt.AnswerFeedbackSettingsB\003\340A\001\022h\n\030person" - + "alization_settings\030* \001(\0132A.google.cloud." - + "dialogflow.cx.v3beta1.Agent.Personalizat" - + "ionSettingsB\003\340A\001\032\225\002\n\026GitIntegrationSetti" - + "ngs\022j\n\017github_settings\030\001 \001(\0132O.google.cl" - + "oud.dialogflow.cx.v3beta1.Agent.GitInteg" - + "rationSettings.GithubSettingsH\000\032\177\n\016Githu" - + "bSettings\022\024\n\014display_name\030\001 \001(\t\022\026\n\016repos" - + "itory_uri\030\002 \001(\t\022\027\n\017tracking_branch\030\003 \001(\t" - + "\022\024\n\014access_token\030\004 \001(\t\022\020\n\010branches\030\005 \003(\t" - + "B\016\n\014git_settings\032,\n\025GenAppBuilderSetting" - + "s\022\023\n\006engine\030\001 \001(\tB\003\340A\002\032=\n\026AnswerFeedback" - + "Settings\022#\n\026enable_answer_feedback\030\001 \001(\010" - + "B\003\340A\001\032Z\n\027PersonalizationSettings\022?\n\031defa" - + "ult_end_user_metadata\030\001 \001(\0132\027.google.pro" - + "tobuf.StructB\003\340A\001:\\\352AY\n\037dialogflow.googl" - + "eapis.com/Agent\0226projects/{project}/loca" - + "tions/{location}/agents/{agent}B\033\n\031_gen_" - + "app_builder_settings\"s\n\021ListAgentsReques" - + "t\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037dialogflow.go" - + "ogleapis.com/Agent\022\021\n\tpage_size\030\002 \001(\005\022\022\n" - + "\npage_token\030\003 \001(\t\"h\n\022ListAgentsResponse\022" - + "9\n\006agents\030\001 \003(\0132).google.cloud.dialogflo" - + "w.cx.v3beta1.Agent\022\027\n\017next_page_token\030\002 " - + "\001(\t\"H\n\017GetAgentRequest\0225\n\004name\030\001 \001(\tB\'\340A" - + "\002\372A!\n\037dialogflow.googleapis.com/Agent\"\214\001" - + "\n\022CreateAgentRequest\0227\n\006parent\030\001 \001(\tB\'\340A" - + "\002\372A!\022\037dialogflow.googleapis.com/Agent\022=\n" - + "\005agent\030\002 \001(\0132).google.cloud.dialogflow.c" - + "x.v3beta1.AgentB\003\340A\002\"\204\001\n\022UpdateAgentRequ" - + "est\022=\n\005agent\030\001 \001(\0132).google.cloud.dialog" - + "flow.cx.v3beta1.AgentB\003\340A\002\022/\n\013update_mas" - + "k\030\002 \001(\0132\032.google.protobuf.FieldMask\"K\n\022D" - + "eleteAgentRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n" - + "\037dialogflow.googleapis.com/Agent\"\242\004\n\022Exp" - + "ortAgentRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037d" - + "ialogflow.googleapis.com/Agent\022\026\n\tagent_" - + "uri\030\002 \001(\tB\003\340A\001\022[\n\013data_format\030\003 \001(\0162A.go" - + "ogle.cloud.dialogflow.cx.v3beta1.ExportA" - + "gentRequest.DataFormatB\003\340A\001\022B\n\013environme" - + "nt\030\005 \001(\tB-\340A\001\372A\'\n%dialogflow.googleapis." - + "com/Environment\022c\n\017git_destination\030\006 \001(\013" - + "2E.google.cloud.dialogflow.cx.v3beta1.Ex" - + "portAgentRequest.GitDestinationB\003\340A\001\022-\n " - + "include_bigquery_export_settings\030\007 \001(\010B\003" - + "\340A\001\032A\n\016GitDestination\022\027\n\017tracking_branch" - + "\030\001 \001(\t\022\026\n\016commit_message\030\002 \001(\t\"E\n\nDataFo" - + "rmat\022\033\n\027DATA_FORMAT_UNSPECIFIED\020\000\022\010\n\004BLO" - + "B\020\001\022\020\n\014JSON_PACKAGE\020\004\"b\n\023ExportAgentResp" - + "onse\022\023\n\tagent_uri\030\001 \001(\tH\000\022\027\n\ragent_conte" - + "nt\030\002 \001(\014H\000\022\024\n\ncommit_sha\030\003 \001(\tH\000B\007\n\005agen" - + "t\"\252\003\n\023RestoreAgentRequest\0225\n\004name\030\001 \001(\tB" - + "\'\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" - + "\022\023\n\tagent_uri\030\002 \001(\tH\000\022\027\n\ragent_content\030\003" - + " \001(\014H\000\022W\n\ngit_source\030\006 \001(\0132A.google.clou" - + "d.dialogflow.cx.v3beta1.RestoreAgentRequ" - + "est.GitSourceH\000\022]\n\016restore_option\030\005 \001(\0162" - + "E.google.cloud.dialogflow.cx.v3beta1.Res" - + "toreAgentRequest.RestoreOption\032$\n\tGitSou" - + "rce\022\027\n\017tracking_branch\030\001 \001(\t\"G\n\rRestoreO" - + "ption\022\036\n\032RESTORE_OPTION_UNSPECIFIED\020\000\022\010\n" - + "\004KEEP\020\001\022\014\n\010FALLBACK\020\002B\007\n\005agent\"d\n\024Valida" - + "teAgentRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037di" - + "alogflow.googleapis.com/Agent\022\025\n\rlanguag" - + "e_code\030\002 \001(\t\"\177\n\037GetAgentValidationResult" - + "Request\022E\n\004name\030\001 \001(\tB7\340A\002\372A1\n/dialogflo" - + "w.googleapis.com/AgentValidationResult\022\025" - + "\n\rlanguage_code\030\002 \001(\t\"\377\001\n\025AgentValidatio" - + "nResult\022\014\n\004name\030\001 \001(\t\022Y\n\027flow_validation" - + "_results\030\002 \003(\01328.google.cloud.dialogflow" - + ".cx.v3beta1.FlowValidationResult:}\352Az\n/d" - + "ialogflow.googleapis.com/AgentValidation" - + "Result\022Gprojects/{project}/locations/{lo" - + "cation}/agents/{agent}/validationResult\"" - + "\203\001\n\034GetGenerativeSettingsRequest\022G\n\004name" - + "\030\001 \001(\tB9\340A\002\372A3\n1dialogflow.googleapis.co" - + "m/AgentGenerativeSettings\022\032\n\rlanguage_co" - + "de\030\002 \001(\tB\003\340A\002\"\261\001\n\037UpdateGenerativeSettin" - + "gsRequest\022X\n\023generative_settings\030\001 \001(\01326" - + ".google.cloud.dialogflow.cx.v3beta1.Gene" - + "rativeSettingsB\003\340A\002\0224\n\013update_mask\030\002 \001(\013" - + "2\032.google.protobuf.FieldMaskB\003\340A\0012\270\023\n\006Ag" - + "ents\022\275\001\n\nListAgents\0225.google.cloud.dialo" - + "gflow.cx.v3beta1.ListAgentsRequest\0326.goo" - + "gle.cloud.dialogflow.cx.v3beta1.ListAgen" - + "tsResponse\"@\332A\006parent\202\323\344\223\0021\022//v3beta1/{p" - + "arent=projects/*/locations/*}/agents\022\252\001\n" - + "\010GetAgent\0223.google.cloud.dialogflow.cx.v" - + "3beta1.GetAgentRequest\032).google.cloud.di" - + "alogflow.cx.v3beta1.Agent\">\332A\004name\202\323\344\223\0021" - + "\022//v3beta1/{name=projects/*/locations/*/" - + "agents/*}\022\277\001\n\013CreateAgent\0226.google.cloud" - + ".dialogflow.cx.v3beta1.CreateAgentReques" - + "t\032).google.cloud.dialogflow.cx.v3beta1.A" - + "gent\"M\332A\014parent,agent\202\323\344\223\0028\"//v3beta1/{p" - + "arent=projects/*/locations/*}/agents:\005ag" - + "ent\022\312\001\n\013UpdateAgent\0226.google.cloud.dialo" - + "gflow.cx.v3beta1.UpdateAgentRequest\032).go" - + "ogle.cloud.dialogflow.cx.v3beta1.Agent\"X" - + "\332A\021agent,update_mask\202\323\344\223\002>25/v3beta1/{ag" - + "ent.name=projects/*/locations/*/agents/*" - + "}:\005agent\022\235\001\n\013DeleteAgent\0226.google.cloud." - + "dialogflow.cx.v3beta1.DeleteAgentRequest" - + "\032\026.google.protobuf.Empty\">\332A\004name\202\323\344\223\0021*" - + "//v3beta1/{name=projects/*/locations/*/a" - + "gents/*}\022\327\001\n\013ExportAgent\0226.google.cloud." + + "extSettings\0229\n\nstart_flow\030\020 \001(\tB#\372A \n\036di" + + "alogflow.googleapis.com/FlowH\000\022A\n\016start_" + + "playbook\030\' \001(\tB\'\372A$\n\"dialogflow.googleap" + + "is.com/PlaybookH\000\022J\n\021security_settings\030\021" + + " \001(\tB/\372A,\n*dialogflow.googleapis.com/Sec" + + "uritySettings\022&\n\032enable_stackdriver_logg" + + "ing\030\022 \001(\010B\002\030\001\022\037\n\027enable_spell_correction" + + "\030\024 \001(\010\022+\n\036enable_multi_language_training" + + "\030( \001(\010B\003\340A\001\022\016\n\006locked\030\033 \001(\010\022O\n\021advanced_" + + "settings\030\026 \001(\01324.google.cloud.dialogflow" + + ".cx.v3beta1.AdvancedSettings\022b\n\030git_inte" + + "gration_settings\030\036 \001(\0132@.google.cloud.di" + + "alogflow.cx.v3beta1.Agent.GitIntegration" + + "Settings\022Y\n\027text_to_speech_settings\030\037 \001(" + + "\01328.google.cloud.dialogflow.cx.v3beta1.T" + + "extToSpeechSettings\022f\n\030gen_app_builder_s" + + "ettings\030! \001(\0132?.google.cloud.dialogflow." + + "cx.v3beta1.Agent.GenAppBuilderSettingsH\001" + + "\210\001\001\022g\n\030answer_feedback_settings\030& \001(\0132@." + + "google.cloud.dialogflow.cx.v3beta1.Agent" + + ".AnswerFeedbackSettingsB\003\340A\001\022h\n\030personal" + + "ization_settings\030* \001(\0132A.google.cloud.di" + + "alogflow.cx.v3beta1.Agent.Personalizatio" + + "nSettingsB\003\340A\001\032\225\002\n\026GitIntegrationSetting" + + "s\022j\n\017github_settings\030\001 \001(\0132O.google.clou" + + "d.dialogflow.cx.v3beta1.Agent.GitIntegra" + + "tionSettings.GithubSettingsH\000\032\177\n\016GithubS" + + "ettings\022\024\n\014display_name\030\001 \001(\t\022\026\n\016reposit" + + "ory_uri\030\002 \001(\t\022\027\n\017tracking_branch\030\003 \001(\t\022\024" + + "\n\014access_token\030\004 \001(\t\022\020\n\010branches\030\005 \003(\tB\016" + + "\n\014git_settings\032,\n\025GenAppBuilderSettings\022" + + "\023\n\006engine\030\001 \001(\tB\003\340A\002\032=\n\026AnswerFeedbackSe" + + "ttings\022#\n\026enable_answer_feedback\030\001 \001(\010B\003" + + "\340A\001\032Z\n\027PersonalizationSettings\022?\n\031defaul" + + "t_end_user_metadata\030\001 \001(\0132\027.google.proto" + + "buf.StructB\003\340A\001:\\\352AY\n\037dialogflow.googlea" + + "pis.com/Agent\0226projects/{project}/locati" + + "ons/{location}/agents/{agent}B\030\n\026session" + + "_entry_resourceB\033\n\031_gen_app_builder_sett" + + "ings\"s\n\021ListAgentsRequest\0227\n\006parent\030\001 \001(" + + "\tB\'\340A\002\372A!\022\037dialogflow.googleapis.com/Age" + + "nt\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" + + "\t\"h\n\022ListAgentsResponse\0229\n\006agents\030\001 \003(\0132" + + ").google.cloud.dialogflow.cx.v3beta1.Age" + + "nt\022\027\n\017next_page_token\030\002 \001(\t\"H\n\017GetAgentR" + + "equest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflow" + + ".googleapis.com/Agent\"\214\001\n\022CreateAgentReq" + + "uest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037dialogflow" + + ".googleapis.com/Agent\022=\n\005agent\030\002 \001(\0132).g" + + "oogle.cloud.dialogflow.cx.v3beta1.AgentB" + + "\003\340A\002\"\204\001\n\022UpdateAgentRequest\022=\n\005agent\030\001 \001" + + "(\0132).google.cloud.dialogflow.cx.v3beta1." + + "AgentB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.google" + + ".protobuf.FieldMask\"K\n\022DeleteAgentReques" + + "t\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflow.goog" + + "leapis.com/Agent\"\242\004\n\022ExportAgentRequest\022" + + "5\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflow.google" + + "apis.com/Agent\022\026\n\tagent_uri\030\002 \001(\tB\003\340A\001\022[" + + "\n\013data_format\030\003 \001(\0162A.google.cloud.dialo" + + "gflow.cx.v3beta1.ExportAgentRequest.Data" + + "FormatB\003\340A\001\022B\n\013environment\030\005 \001(\tB-\340A\001\372A\'" + + "\n%dialogflow.googleapis.com/Environment\022" + + "c\n\017git_destination\030\006 \001(\0132E.google.cloud." + "dialogflow.cx.v3beta1.ExportAgentRequest" - + "\032\035.google.longrunning.Operation\"q\312A-\n\023Ex" - + "portAgentResponse\022\026google.protobuf.Struc" - + "t\202\323\344\223\002;\"6/v3beta1/{name=projects/*/locat" - + "ions/*/agents/*}:export:\001*\022\334\001\n\014RestoreAg" - + "ent\0227.google.cloud.dialogflow.cx.v3beta1" - + ".RestoreAgentRequest\032\035.google.longrunnin" - + "g.Operation\"t\312A/\n\025google.protobuf.Empty\022" - + "\026google.protobuf.Struct\202\323\344\223\002<\"7/v3beta1/" - + "{name=projects/*/locations/*/agents/*}:r" - + "estore:\001*\022\311\001\n\rValidateAgent\0228.google.clo" - + "ud.dialogflow.cx.v3beta1.ValidateAgentRe" - + "quest\0329.google.cloud.dialogflow.cx.v3bet" - + "a1.AgentValidationResult\"C\202\323\344\223\002=\"8/v3bet" - + "a1/{name=projects/*/locations/*/agents/*" - + "}:validate:\001*\022\353\001\n\030GetAgentValidationResu" - + "lt\022C.google.cloud.dialogflow.cx.v3beta1." - + "GetAgentValidationResultRequest\0329.google" - + ".cloud.dialogflow.cx.v3beta1.AgentValida" - + "tionResult\"O\332A\004name\202\323\344\223\002B\022@/v3beta1/{nam" - + "e=projects/*/locations/*/agents/*/valida" - + "tionResult}\022\362\001\n\025GetGenerativeSettings\022@." - + "google.cloud.dialogflow.cx.v3beta1.GetGe" - + "nerativeSettingsRequest\0326.google.cloud.d" - + "ialogflow.cx.v3beta1.GenerativeSettings\"" - + "_\332A\022name,language_code\202\323\344\223\002D\022B/v3beta1/{" - + "name=projects/*/locations/*/agents/*/gen" - + "erativeSettings}\022\257\002\n\030UpdateGenerativeSet" - + "tings\022C.google.cloud.dialogflow.cx.v3bet" - + "a1.UpdateGenerativeSettingsRequest\0326.goo" - + "gle.cloud.dialogflow.cx.v3beta1.Generati" - + "veSettings\"\225\001\332A\037generative_settings,upda" - + "te_mask\202\323\344\223\002m2V/v3beta1/{generative_sett" - + "ings.name=projects/*/locations/*/agents/" - + "*/generativeSettings}:\023generative_settin" - + "gs\032x\312A\031dialogflow.googleapis.com\322AYhttps" - + "://www.googleapis.com/auth/cloud-platfor" - + "m,https://www.googleapis.com/auth/dialog" - + "flowB\304\001\n&com.google.cloud.dialogflow.cx." - + "v3beta1B\nAgentProtoP\001Z6cloud.google.com/" - + "go/dialogflow/cx/apiv3beta1/cxpb;cxpb\370\001\001" - + "\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Bet" - + "a1\352\002&Google::Cloud::Dialogflow::CX::V3be" - + "ta1b\006proto3" + + ".GitDestinationB\003\340A\001\022-\n include_bigquery" + + "_export_settings\030\007 \001(\010B\003\340A\001\032A\n\016GitDestin" + + "ation\022\027\n\017tracking_branch\030\001 \001(\t\022\026\n\016commit" + + "_message\030\002 \001(\t\"E\n\nDataFormat\022\033\n\027DATA_FOR" + + "MAT_UNSPECIFIED\020\000\022\010\n\004BLOB\020\001\022\020\n\014JSON_PACK" + + "AGE\020\004\"b\n\023ExportAgentResponse\022\023\n\tagent_ur" + + "i\030\001 \001(\tH\000\022\027\n\ragent_content\030\002 \001(\014H\000\022\024\n\nco" + + "mmit_sha\030\003 \001(\tH\000B\007\n\005agent\"\252\003\n\023RestoreAge" + + "ntRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogf" + + "low.googleapis.com/Agent\022\023\n\tagent_uri\030\002 " + + "\001(\tH\000\022\027\n\ragent_content\030\003 \001(\014H\000\022W\n\ngit_so" + + "urce\030\006 \001(\0132A.google.cloud.dialogflow.cx." + + "v3beta1.RestoreAgentRequest.GitSourceH\000\022" + + "]\n\016restore_option\030\005 \001(\0162E.google.cloud.d" + + "ialogflow.cx.v3beta1.RestoreAgentRequest" + + ".RestoreOption\032$\n\tGitSource\022\027\n\017tracking_" + + "branch\030\001 \001(\t\"G\n\rRestoreOption\022\036\n\032RESTORE" + + "_OPTION_UNSPECIFIED\020\000\022\010\n\004KEEP\020\001\022\014\n\010FALLB" + + "ACK\020\002B\007\n\005agent\"d\n\024ValidateAgentRequest\0225" + + "\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflow.googlea" + + "pis.com/Agent\022\025\n\rlanguage_code\030\002 \001(\t\"\177\n\037" + + "GetAgentValidationResultRequest\022E\n\004name\030" + + "\001 \001(\tB7\340A\002\372A1\n/dialogflow.googleapis.com" + + "/AgentValidationResult\022\025\n\rlanguage_code\030" + + "\002 \001(\t\"\377\001\n\025AgentValidationResult\022\014\n\004name\030" + + "\001 \001(\t\022Y\n\027flow_validation_results\030\002 \003(\01328" + + ".google.cloud.dialogflow.cx.v3beta1.Flow" + + "ValidationResult:}\352Az\n/dialogflow.google" + + "apis.com/AgentValidationResult\022Gprojects" + + "/{project}/locations/{location}/agents/{" + + "agent}/validationResult\"\203\001\n\034GetGenerativ" + + "eSettingsRequest\022G\n\004name\030\001 \001(\tB9\340A\002\372A3\n1" + + "dialogflow.googleapis.com/AgentGenerativ" + + "eSettings\022\032\n\rlanguage_code\030\002 \001(\tB\003\340A\002\"\261\001" + + "\n\037UpdateGenerativeSettingsRequest\022X\n\023gen" + + "erative_settings\030\001 \001(\01326.google.cloud.di" + + "alogflow.cx.v3beta1.GenerativeSettingsB\003" + + "\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.protob" + + "uf.FieldMaskB\003\340A\0012\270\023\n\006Agents\022\275\001\n\nListAge" + + "nts\0225.google.cloud.dialogflow.cx.v3beta1" + + ".ListAgentsRequest\0326.google.cloud.dialog" + + "flow.cx.v3beta1.ListAgentsResponse\"@\332A\006p" + + "arent\202\323\344\223\0021\022//v3beta1/{parent=projects/*" + + "/locations/*}/agents\022\252\001\n\010GetAgent\0223.goog" + + "le.cloud.dialogflow.cx.v3beta1.GetAgentR" + + "equest\032).google.cloud.dialogflow.cx.v3be" + + "ta1.Agent\">\332A\004name\202\323\344\223\0021\022//v3beta1/{name" + + "=projects/*/locations/*/agents/*}\022\277\001\n\013Cr" + + "eateAgent\0226.google.cloud.dialogflow.cx.v" + + "3beta1.CreateAgentRequest\032).google.cloud" + + ".dialogflow.cx.v3beta1.Agent\"M\332A\014parent," + + "agent\202\323\344\223\0028\"//v3beta1/{parent=projects/*" + + "/locations/*}/agents:\005agent\022\312\001\n\013UpdateAg" + + "ent\0226.google.cloud.dialogflow.cx.v3beta1" + + ".UpdateAgentRequest\032).google.cloud.dialo" + + "gflow.cx.v3beta1.Agent\"X\332A\021agent,update_" + + "mask\202\323\344\223\002>25/v3beta1/{agent.name=project" + + "s/*/locations/*/agents/*}:\005agent\022\235\001\n\013Del" + + "eteAgent\0226.google.cloud.dialogflow.cx.v3" + + "beta1.DeleteAgentRequest\032\026.google.protob" + + "uf.Empty\">\332A\004name\202\323\344\223\0021*//v3beta1/{name=" + + "projects/*/locations/*/agents/*}\022\327\001\n\013Exp" + + "ortAgent\0226.google.cloud.dialogflow.cx.v3" + + "beta1.ExportAgentRequest\032\035.google.longru" + + "nning.Operation\"q\312A-\n\023ExportAgentRespons" + + "e\022\026google.protobuf.Struct\202\323\344\223\002;\"6/v3beta" + + "1/{name=projects/*/locations/*/agents/*}" + + ":export:\001*\022\334\001\n\014RestoreAgent\0227.google.clo" + + "ud.dialogflow.cx.v3beta1.RestoreAgentReq" + + "uest\032\035.google.longrunning.Operation\"t\312A/" + + "\n\025google.protobuf.Empty\022\026google.protobuf" + + ".Struct\202\323\344\223\002<\"7/v3beta1/{name=projects/*" + + "/locations/*/agents/*}:restore:\001*\022\311\001\n\rVa" + + "lidateAgent\0228.google.cloud.dialogflow.cx" + + ".v3beta1.ValidateAgentRequest\0329.google.c" + + "loud.dialogflow.cx.v3beta1.AgentValidati" + + "onResult\"C\202\323\344\223\002=\"8/v3beta1/{name=project" + + "s/*/locations/*/agents/*}:validate:\001*\022\353\001" + + "\n\030GetAgentValidationResult\022C.google.clou" + + "d.dialogflow.cx.v3beta1.GetAgentValidati" + + "onResultRequest\0329.google.cloud.dialogflo" + + "w.cx.v3beta1.AgentValidationResult\"O\332A\004n" + + "ame\202\323\344\223\002B\022@/v3beta1/{name=projects/*/loc" + + "ations/*/agents/*/validationResult}\022\362\001\n\025" + + "GetGenerativeSettings\022@.google.cloud.dia" + + "logflow.cx.v3beta1.GetGenerativeSettings" + + "Request\0326.google.cloud.dialogflow.cx.v3b" + + "eta1.GenerativeSettings\"_\332A\022name,languag" + + "e_code\202\323\344\223\002D\022B/v3beta1/{name=projects/*/" + + "locations/*/agents/*/generativeSettings}" + + "\022\257\002\n\030UpdateGenerativeSettings\022C.google.c" + + "loud.dialogflow.cx.v3beta1.UpdateGenerat" + + "iveSettingsRequest\0326.google.cloud.dialog" + + "flow.cx.v3beta1.GenerativeSettings\"\225\001\332A\037" + + "generative_settings,update_mask\202\323\344\223\002m2V/" + + "v3beta1/{generative_settings.name=projec" + + "ts/*/locations/*/agents/*/generativeSett" + + "ings}:\023generative_settings\032x\312A\031dialogflo" + + "w.googleapis.com\322AYhttps://www.googleapi" + + "s.com/auth/cloud-platform,https://www.go" + + "ogleapis.com/auth/dialogflowB\304\001\n&com.goo" + + "gle.cloud.dialogflow.cx.v3beta1B\nAgentPr" + + "otoP\001Z6cloud.google.com/go/dialogflow/cx" + + "/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.C" + + "loud.Dialogflow.Cx.V3Beta1\352\002&Google::Clo" + + "ud::Dialogflow::CX::V3beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -374,6 +374,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GenAppBuilderSettings", "AnswerFeedbackSettings", "PersonalizationSettings", + "SessionEntryResource", }); internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_GitIntegrationSettings_descriptor = internal_static_google_cloud_dialogflow_cx_v3beta1_Agent_descriptor.getNestedTypes().get(0); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExampleProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExampleProto.java index b65fa182c43d..3be95b7085c8 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExampleProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExampleProto.java @@ -80,10 +80,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_ToolUse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_ToolUse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInvocation_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -145,89 +141,84 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/Example\022^projects/{project}/locations/{" + "location}/agents/{agent}/playbooks/{play" + "book}/examples/{example}*\010examples2\007exam" - + "ple\"\212\001\n\rPlaybookInput\022+\n\036preceding_conve" - + "rsation_summary\030\001 \001(\tB\003\340A\001\022L\n\nparameters" - + "\030\002 \003(\01323.google.cloud.dialogflow.cx.v3be" - + "ta1.ActionParameterB\003\340A\001\"~\n\016PlaybookOutp" - + "ut\022\036\n\021execution_summary\030\001 \001(\tB\003\340A\001\022L\n\npa" - + "rameters\030\003 \003(\01323.google.cloud.dialogflow" - + ".cx.v3beta1.ActionParameterB\003\340A\001\"\256\003\n\006Act" - + "ion\022P\n\016user_utterance\030\001 \001(\01321.google.clo" - + "ud.dialogflow.cx.v3beta1.UserUtteranceB\003" - + "\340A\001H\000\022R\n\017agent_utterance\030\002 \001(\01322.google." - + "cloud.dialogflow.cx.v3beta1.AgentUtteran" - + "ceB\003\340A\001H\000\022D\n\010tool_use\030\003 \001(\0132+.google.clo" - + "ud.dialogflow.cx.v3beta1.ToolUseB\003\340A\001H\000\022" - + "Z\n\023playbook_invocation\030\004 \001(\01326.google.cl" - + "oud.dialogflow.cx.v3beta1.PlaybookInvoca" - + "tionB\003\340A\001H\000\022R\n\017flow_invocation\030\005 \001(\01322.g" - + "oogle.cloud.dialogflow.cx.v3beta1.FlowIn" - + "vocationB\003\340A\001H\000B\010\n\006action\"\"\n\rUserUtteran" - + "ce\022\021\n\004text\030\001 \001(\tB\003\340A\002\"#\n\016AgentUtterance\022" - + "\021\n\004text\030\001 \001(\tB\003\340A\002\"\363\001\n\007ToolUse\0224\n\004tool\030\001" - + " \001(\tB&\340A\002\372A \n\036dialogflow.googleapis.com/" - + "Tool\022\023\n\006action\030\002 \001(\tB\003\340A\001\022M\n\020input_param" - + "eters\030\003 \003(\01323.google.cloud.dialogflow.cx" - + ".v3beta1.ActionParameter\022N\n\021output_param" - + "eters\030\004 \003(\01323.google.cloud.dialogflow.cx" - + ".v3beta1.ActionParameter\"P\n\017ActionParame" - + "ter\022\021\n\004name\030\001 \001(\tB\003\340A\002\022*\n\005value\030\002 \001(\0132\026." - + "google.protobuf.ValueB\003\340A\002\"\302\002\n\022PlaybookI" - + "nvocation\022<\n\010playbook\030\001 \001(\tB*\340A\002\372A$\n\"dia" - + "logflow.googleapis.com/Playbook\022N\n\016playb" - + "ook_input\030\002 \001(\01321.google.cloud.dialogflo" - + "w.cx.v3beta1.PlaybookInputB\003\340A\001\022P\n\017playb" - + "ook_output\030\003 \001(\01322.google.cloud.dialogfl" - + "ow.cx.v3beta1.PlaybookOutputB\003\340A\001\022L\n\016pla" - + "ybook_state\030\004 \001(\0162/.google.cloud.dialogf" - + "low.cx.v3beta1.OutputStateB\003\340A\002\"\257\002\n\016Flow" - + "Invocation\0224\n\004flow\030\001 \001(\tB&\340A\002\372A \n\036dialog" - + "flow.googleapis.com/Flow\022M\n\020input_parame" - + "ters\030\002 \003(\01323.google.cloud.dialogflow.cx." - + "v3beta1.ActionParameter\022N\n\021output_parame" - + "ters\030\003 \003(\01323.google.cloud.dialogflow.cx." - + "v3beta1.ActionParameter\022H\n\nflow_state\030\004 " - + "\001(\0162/.google.cloud.dialogflow.cx.v3beta1" - + ".OutputStateB\003\340A\002*\253\001\n\013OutputState\022\034\n\030OUT" - + "PUT_STATE_UNSPECIFIED\020\000\022\023\n\017OUTPUT_STATE_" - + "OK\020\001\022\032\n\026OUTPUT_STATE_CANCELLED\020\002\022\027\n\023OUTP" - + "UT_STATE_FAILED\020\003\022\032\n\026OUTPUT_STATE_ESCALA" - + "TED\020\004\022\030\n\024OUTPUT_STATE_PENDING\020\0052\271\t\n\010Exam" - + "ples\022\340\001\n\rCreateExample\0228.google.cloud.di" - + "alogflow.cx.v3beta1.CreateExampleRequest" + + "ple\"u\n\rPlaybookInput\022+\n\036preceding_conver" + + "sation_summary\030\001 \001(\tB\003\340A\001\0227\n\021action_para" + + "meters\030\003 \001(\0132\027.google.protobuf.StructB\003\340" + + "A\001\"i\n\016PlaybookOutput\022\036\n\021execution_summar" + + "y\030\001 \001(\tB\003\340A\001\0227\n\021action_parameters\030\004 \001(\0132" + + "\027.google.protobuf.StructB\003\340A\001\"\256\003\n\006Action" + + "\022P\n\016user_utterance\030\001 \001(\01321.google.cloud." + + "dialogflow.cx.v3beta1.UserUtteranceB\003\340A\001" + + "H\000\022R\n\017agent_utterance\030\002 \001(\01322.google.clo" + + "ud.dialogflow.cx.v3beta1.AgentUtteranceB" + + "\003\340A\001H\000\022D\n\010tool_use\030\003 \001(\0132+.google.cloud." + + "dialogflow.cx.v3beta1.ToolUseB\003\340A\001H\000\022Z\n\023" + + "playbook_invocation\030\004 \001(\01326.google.cloud" + + ".dialogflow.cx.v3beta1.PlaybookInvocatio" + + "nB\003\340A\001H\000\022R\n\017flow_invocation\030\005 \001(\01322.goog" + + "le.cloud.dialogflow.cx.v3beta1.FlowInvoc" + + "ationB\003\340A\001H\000B\010\n\006action\"\"\n\rUserUtterance\022" + + "\021\n\004text\030\001 \001(\tB\003\340A\002\"#\n\016AgentUtterance\022\021\n\004" + + "text\030\001 \001(\tB\003\340A\002\"\323\001\n\007ToolUse\0224\n\004tool\030\001 \001(" + + "\tB&\340A\002\372A \n\036dialogflow.googleapis.com/Too" + + "l\022\023\n\006action\030\002 \001(\tB\003\340A\001\022=\n\027input_action_p" + + "arameters\030\005 \001(\0132\027.google.protobuf.Struct" + + "B\003\340A\001\022>\n\030output_action_parameters\030\006 \001(\0132" + + "\027.google.protobuf.StructB\003\340A\001\"\302\002\n\022Playbo" + + "okInvocation\022<\n\010playbook\030\001 \001(\tB*\340A\002\372A$\n\"" + + "dialogflow.googleapis.com/Playbook\022N\n\016pl" + + "aybook_input\030\002 \001(\01321.google.cloud.dialog" + + "flow.cx.v3beta1.PlaybookInputB\003\340A\001\022P\n\017pl" + + "aybook_output\030\003 \001(\01322.google.cloud.dialo" + + "gflow.cx.v3beta1.PlaybookOutputB\003\340A\001\022L\n\016" + + "playbook_state\030\004 \001(\0162/.google.cloud.dial" + + "ogflow.cx.v3beta1.OutputStateB\003\340A\002\"\217\002\n\016F" + + "lowInvocation\0224\n\004flow\030\001 \001(\tB&\340A\002\372A \n\036dia" + + "logflow.googleapis.com/Flow\022=\n\027input_act" + + "ion_parameters\030\005 \001(\0132\027.google.protobuf.S" + + "tructB\003\340A\001\022>\n\030output_action_parameters\030\006" + + " \001(\0132\027.google.protobuf.StructB\003\340A\001\022H\n\nfl" + + "ow_state\030\004 \001(\0162/.google.cloud.dialogflow" + + ".cx.v3beta1.OutputStateB\003\340A\002*\253\001\n\013OutputS" + + "tate\022\034\n\030OUTPUT_STATE_UNSPECIFIED\020\000\022\023\n\017OU" + + "TPUT_STATE_OK\020\001\022\032\n\026OUTPUT_STATE_CANCELLE" + + "D\020\002\022\027\n\023OUTPUT_STATE_FAILED\020\003\022\032\n\026OUTPUT_S" + + "TATE_ESCALATED\020\004\022\030\n\024OUTPUT_STATE_PENDING" + + "\020\0052\271\t\n\010Examples\022\340\001\n\rCreateExample\0228.goog" + + "le.cloud.dialogflow.cx.v3beta1.CreateExa" + + "mpleRequest\032+.google.cloud.dialogflow.cx" + + ".v3beta1.Example\"h\332A\016parent,example\202\323\344\223\002" + + "Q\"F/v3beta1/{parent=projects/*/locations" + + "/*/agents/*/playbooks/*}/examples:\007examp" + + "le\022\270\001\n\rDeleteExample\0228.google.cloud.dial" + + "ogflow.cx.v3beta1.DeleteExampleRequest\032\026" + + ".google.protobuf.Empty\"U\332A\004name\202\323\344\223\002H*F/" + + "v3beta1/{name=projects/*/locations/*/age" + + "nts/*/playbooks/*/examples/*}\022\332\001\n\014ListEx" + + "amples\0227.google.cloud.dialogflow.cx.v3be" + + "ta1.ListExamplesRequest\0328.google.cloud.d" + + "ialogflow.cx.v3beta1.ListExamplesRespons" + + "e\"W\332A\006parent\202\323\344\223\002H\022F/v3beta1/{parent=pro" + + "jects/*/locations/*/agents/*/playbooks/*" + + "}/examples\022\307\001\n\nGetExample\0225.google.cloud" + + ".dialogflow.cx.v3beta1.GetExampleRequest" + "\032+.google.cloud.dialogflow.cx.v3beta1.Ex" - + "ample\"h\332A\016parent,example\202\323\344\223\002Q\"F/v3beta1" - + "/{parent=projects/*/locations/*/agents/*" - + "/playbooks/*}/examples:\007example\022\270\001\n\rDele" - + "teExample\0228.google.cloud.dialogflow.cx.v" - + "3beta1.DeleteExampleRequest\032\026.google.pro" - + "tobuf.Empty\"U\332A\004name\202\323\344\223\002H*F/v3beta1/{na" - + "me=projects/*/locations/*/agents/*/playb" - + "ooks/*/examples/*}\022\332\001\n\014ListExamples\0227.go" - + "ogle.cloud.dialogflow.cx.v3beta1.ListExa" - + "mplesRequest\0328.google.cloud.dialogflow.c" - + "x.v3beta1.ListExamplesResponse\"W\332A\006paren" - + "t\202\323\344\223\002H\022F/v3beta1/{parent=projects/*/loc" - + "ations/*/agents/*/playbooks/*}/examples\022" - + "\307\001\n\nGetExample\0225.google.cloud.dialogflow" - + ".cx.v3beta1.GetExampleRequest\032+.google.c" - + "loud.dialogflow.cx.v3beta1.Example\"U\332A\004n" - + "ame\202\323\344\223\002H\022F/v3beta1/{name=projects/*/loc" - + "ations/*/agents/*/playbooks/*/examples/*" - + "}\022\355\001\n\rUpdateExample\0228.google.cloud.dialo" - + "gflow.cx.v3beta1.UpdateExampleRequest\032+." - + "google.cloud.dialogflow.cx.v3beta1.Examp" - + "le\"u\332A\023example,update_mask\202\323\344\223\002Y2N/v3bet" - + "a1/{example.name=projects/*/locations/*/" - + "agents/*/playbooks/*/examples/*}:\007exampl" - + "e\032x\312A\031dialogflow.googleapis.com\322AYhttps:" - + "//www.googleapis.com/auth/cloud-platform" - + ",https://www.googleapis.com/auth/dialogf" - + "lowB\235\001\n&com.google.cloud.dialogflow.cx.v" - + "3beta1B\014ExampleProtoP\001Z6cloud.google.com" - + "/go/dialogflow/cx/apiv3beta1/cxpb;cxpb\370\001" - + "\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Be" - + "ta1b\006proto3" + + "ample\"U\332A\004name\202\323\344\223\002H\022F/v3beta1/{name=pro" + + "jects/*/locations/*/agents/*/playbooks/*" + + "/examples/*}\022\355\001\n\rUpdateExample\0228.google." + + "cloud.dialogflow.cx.v3beta1.UpdateExampl" + + "eRequest\032+.google.cloud.dialogflow.cx.v3" + + "beta1.Example\"u\332A\023example,update_mask\202\323\344" + + "\223\002Y2N/v3beta1/{example.name=projects/*/l" + + "ocations/*/agents/*/playbooks/*/examples" + + "/*}:\007example\032x\312A\031dialogflow.googleapis.c" + + "om\322AYhttps://www.googleapis.com/auth/clo" + + "ud-platform,https://www.googleapis.com/a" + + "uth/dialogflowB\235\001\n&com.google.cloud.dial" + + "ogflow.cx.v3beta1B\014ExampleProtoP\001Z6cloud" + + ".google.com/go/dialogflow/cx/apiv3beta1/" + + "cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogf" + + "low.Cx.V3Beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -314,7 +305,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInput_descriptor, new java.lang.String[] { - "PrecedingConversationSummary", "Parameters", + "PrecedingConversationSummary", "ActionParameters", }); internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookOutput_descriptor = getDescriptor().getMessageTypes().get(8); @@ -322,7 +313,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookOutput_descriptor, new java.lang.String[] { - "ExecutionSummary", "Parameters", + "ExecutionSummary", "ActionParameters", }); internal_static_google_cloud_dialogflow_cx_v3beta1_Action_descriptor = getDescriptor().getMessageTypes().get(9); @@ -359,18 +350,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ToolUse_descriptor, new java.lang.String[] { - "Tool", "Action", "InputParameters", "OutputParameters", - }); - internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_descriptor, - new java.lang.String[] { - "Name", "Value", + "Tool", "Action", "InputActionParameters", "OutputActionParameters", }); internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInvocation_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInvocation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInvocation_descriptor, @@ -378,12 +361,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Playbook", "PlaybookInput", "PlaybookOutput", "PlaybookState", }); internal_static_google_cloud_dialogflow_cx_v3beta1_FlowInvocation_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_dialogflow_cx_v3beta1_FlowInvocation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_FlowInvocation_descriptor, new java.lang.String[] { - "Flow", "InputParameters", "OutputParameters", "FlowState", + "Flow", "InputActionParameters", "OutputActionParameters", "FlowState", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowInvocation.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowInvocation.java index de5600f968a9..21de865b0668 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowInvocation.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowInvocation.java @@ -41,8 +41,6 @@ private FlowInvocation(com.google.protobuf.GeneratedMessageV3.Builder builder private FlowInvocation() { flow_ = ""; - inputParameters_ = java.util.Collections.emptyList(); - outputParameters_ = java.util.Collections.emptyList(); flowState_ = 0; } @@ -67,6 +65,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.Builder.class); } + private int bitField0_; public static final int FLOW_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -126,155 +125,116 @@ public com.google.protobuf.ByteString getFlowBytes() { } } - public static final int INPUT_PARAMETERS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List inputParameters_; + public static final int INPUT_ACTION_PARAMETERS_FIELD_NUMBER = 5; + private com.google.protobuf.Struct inputActionParameters_; /** * * *
-   * A list of input parameters for the flow invocation.
+   * Optional. A list of input parameters for the flow.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; - */ - @java.lang.Override - public java.util.List - getInputParametersList() { - return inputParameters_; - } - /** - * - * - *
-   * A list of input parameters for the flow invocation.
-   * 
+ * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * @return Whether the inputActionParameters field is set. */ @java.lang.Override - public java.util.List - getInputParametersOrBuilderList() { - return inputParameters_; + public boolean hasInputActionParameters() { + return ((bitField0_ & 0x00000001) != 0); } /** * * *
-   * A list of input parameters for the flow invocation.
+   * Optional. A list of input parameters for the flow.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; - */ - @java.lang.Override - public int getInputParametersCount() { - return inputParameters_.size(); - } - /** - * - * - *
-   * A list of input parameters for the flow invocation.
-   * 
+ * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * @return The inputActionParameters. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getInputParameters(int index) { - return inputParameters_.get(index); + public com.google.protobuf.Struct getInputActionParameters() { + return inputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputActionParameters_; } /** * * *
-   * A list of input parameters for the flow invocation.
+   * Optional. A list of input parameters for the flow.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder - getInputParametersOrBuilder(int index) { - return inputParameters_.get(index); + public com.google.protobuf.StructOrBuilder getInputActionParametersOrBuilder() { + return inputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputActionParameters_; } - public static final int OUTPUT_PARAMETERS_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private java.util.List outputParameters_; + public static final int OUTPUT_ACTION_PARAMETERS_FIELD_NUMBER = 6; + private com.google.protobuf.Struct outputActionParameters_; /** * * *
-   * A list of output parameters generated by the flow invocation.
+   * Optional. A list of output parameters generated by the flow invocation.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * - */ - @java.lang.Override - public java.util.List - getOutputParametersList() { - return outputParameters_; - } - /** - * - * - *
-   * A list of output parameters generated by the flow invocation.
-   * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; - * + * @return Whether the outputActionParameters field is set. */ @java.lang.Override - public java.util.List - getOutputParametersOrBuilderList() { - return outputParameters_; + public boolean hasOutputActionParameters() { + return ((bitField0_ & 0x00000002) != 0); } /** * * *
-   * A list of output parameters generated by the flow invocation.
+   * Optional. A list of output parameters generated by the flow invocation.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * - */ - @java.lang.Override - public int getOutputParametersCount() { - return outputParameters_.size(); - } - /** * - * - *
-   * A list of output parameters generated by the flow invocation.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; - * + * @return The outputActionParameters. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getOutputParameters(int index) { - return outputParameters_.get(index); + public com.google.protobuf.Struct getOutputActionParameters() { + return outputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputActionParameters_; } /** * * *
-   * A list of output parameters generated by the flow invocation.
+   * Optional. A list of output parameters generated by the flow invocation.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder - getOutputParametersOrBuilder(int index) { - return outputParameters_.get(index); + public com.google.protobuf.StructOrBuilder getOutputActionParametersOrBuilder() { + return outputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputActionParameters_; } public static final int FLOW_STATE_FIELD_NUMBER = 4; @@ -335,17 +295,17 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(flow_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, flow_); } - for (int i = 0; i < inputParameters_.size(); i++) { - output.writeMessage(2, inputParameters_.get(i)); - } - for (int i = 0; i < outputParameters_.size(); i++) { - output.writeMessage(3, outputParameters_.get(i)); - } if (flowState_ != com.google.cloud.dialogflow.cx.v3beta1.OutputState.OUTPUT_STATE_UNSPECIFIED .getNumber()) { output.writeEnum(4, flowState_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getInputActionParameters()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getOutputActionParameters()); + } getUnknownFields().writeTo(output); } @@ -358,17 +318,19 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(flow_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, flow_); } - for (int i = 0; i < inputParameters_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, inputParameters_.get(i)); - } - for (int i = 0; i < outputParameters_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, outputParameters_.get(i)); - } if (flowState_ != com.google.cloud.dialogflow.cx.v3beta1.OutputState.OUTPUT_STATE_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, flowState_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, getInputActionParameters()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getOutputActionParameters()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -386,8 +348,14 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation) obj; if (!getFlow().equals(other.getFlow())) return false; - if (!getInputParametersList().equals(other.getInputParametersList())) return false; - if (!getOutputParametersList().equals(other.getOutputParametersList())) return false; + if (hasInputActionParameters() != other.hasInputActionParameters()) return false; + if (hasInputActionParameters()) { + if (!getInputActionParameters().equals(other.getInputActionParameters())) return false; + } + if (hasOutputActionParameters() != other.hasOutputActionParameters()) return false; + if (hasOutputActionParameters()) { + if (!getOutputActionParameters().equals(other.getOutputActionParameters())) return false; + } if (flowState_ != other.flowState_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -402,13 +370,13 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FLOW_FIELD_NUMBER; hash = (53 * hash) + getFlow().hashCode(); - if (getInputParametersCount() > 0) { - hash = (37 * hash) + INPUT_PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getInputParametersList().hashCode(); + if (hasInputActionParameters()) { + hash = (37 * hash) + INPUT_ACTION_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getInputActionParameters().hashCode(); } - if (getOutputParametersCount() > 0) { - hash = (37 * hash) + OUTPUT_PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getOutputParametersList().hashCode(); + if (hasOutputActionParameters()) { + hash = (37 * hash) + OUTPUT_ACTION_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getOutputActionParameters().hashCode(); } hash = (37 * hash) + FLOW_STATE_FIELD_NUMBER; hash = (53 * hash) + flowState_; @@ -543,10 +511,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputActionParametersFieldBuilder(); + getOutputActionParametersFieldBuilder(); + } } @java.lang.Override @@ -554,20 +532,16 @@ public Builder clear() { super.clear(); bitField0_ = 0; flow_ = ""; - if (inputParametersBuilder_ == null) { - inputParameters_ = java.util.Collections.emptyList(); - } else { - inputParameters_ = null; - inputParametersBuilder_.clear(); + inputActionParameters_ = null; + if (inputActionParametersBuilder_ != null) { + inputActionParametersBuilder_.dispose(); + inputActionParametersBuilder_ = null; } - bitField0_ = (bitField0_ & ~0x00000002); - if (outputParametersBuilder_ == null) { - outputParameters_ = java.util.Collections.emptyList(); - } else { - outputParameters_ = null; - outputParametersBuilder_.clear(); + outputActionParameters_ = null; + if (outputActionParametersBuilder_ != null) { + outputActionParametersBuilder_.dispose(); + outputActionParametersBuilder_ = null; } - bitField0_ = (bitField0_ & ~0x00000004); flowState_ = 0; return this; } @@ -596,7 +570,6 @@ public com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation build() { public com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation buildPartial() { com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation result = new com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation(this); - buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -604,36 +577,30 @@ public com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation buildPartial() { return result; } - private void buildPartialRepeatedFields( - com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation result) { - if (inputParametersBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - inputParameters_ = java.util.Collections.unmodifiableList(inputParameters_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.inputParameters_ = inputParameters_; - } else { - result.inputParameters_ = inputParametersBuilder_.build(); - } - if (outputParametersBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - outputParameters_ = java.util.Collections.unmodifiableList(outputParameters_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.outputParameters_ = outputParameters_; - } else { - result.outputParameters_ = outputParametersBuilder_.build(); - } - } - private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.flow_ = flow_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.inputActionParameters_ = + inputActionParametersBuilder_ == null + ? inputActionParameters_ + : inputActionParametersBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.outputActionParameters_ = + outputActionParametersBuilder_ == null + ? outputActionParameters_ + : outputActionParametersBuilder_.build(); + to_bitField0_ |= 0x00000002; + } if (((from_bitField0_ & 0x00000008) != 0)) { result.flowState_ = flowState_; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -687,59 +654,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation o bitField0_ |= 0x00000001; onChanged(); } - if (inputParametersBuilder_ == null) { - if (!other.inputParameters_.isEmpty()) { - if (inputParameters_.isEmpty()) { - inputParameters_ = other.inputParameters_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureInputParametersIsMutable(); - inputParameters_.addAll(other.inputParameters_); - } - onChanged(); - } - } else { - if (!other.inputParameters_.isEmpty()) { - if (inputParametersBuilder_.isEmpty()) { - inputParametersBuilder_.dispose(); - inputParametersBuilder_ = null; - inputParameters_ = other.inputParameters_; - bitField0_ = (bitField0_ & ~0x00000002); - inputParametersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getInputParametersFieldBuilder() - : null; - } else { - inputParametersBuilder_.addAllMessages(other.inputParameters_); - } - } + if (other.hasInputActionParameters()) { + mergeInputActionParameters(other.getInputActionParameters()); } - if (outputParametersBuilder_ == null) { - if (!other.outputParameters_.isEmpty()) { - if (outputParameters_.isEmpty()) { - outputParameters_ = other.outputParameters_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureOutputParametersIsMutable(); - outputParameters_.addAll(other.outputParameters_); - } - onChanged(); - } - } else { - if (!other.outputParameters_.isEmpty()) { - if (outputParametersBuilder_.isEmpty()) { - outputParametersBuilder_.dispose(); - outputParametersBuilder_ = null; - outputParameters_ = other.outputParameters_; - bitField0_ = (bitField0_ & ~0x00000004); - outputParametersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getOutputParametersFieldBuilder() - : null; - } else { - outputParametersBuilder_.addAllMessages(other.outputParameters_); - } - } + if (other.hasOutputActionParameters()) { + mergeOutputActionParameters(other.getOutputActionParameters()); } if (other.flowState_ != 0) { setFlowStateValue(other.getFlowStateValue()); @@ -776,40 +695,26 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 - case 18: - { - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter m = - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.parser(), - extensionRegistry); - if (inputParametersBuilder_ == null) { - ensureInputParametersIsMutable(); - inputParameters_.add(m); - } else { - inputParametersBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter m = - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.parser(), - extensionRegistry); - if (outputParametersBuilder_ == null) { - ensureOutputParametersIsMutable(); - outputParameters_.add(m); - } else { - outputParametersBuilder_.addMessage(m); - } - break; - } // case 26 case 32: { flowState_ = input.readEnum(); bitField0_ |= 0x00000008; break; } // case 32 + case 42: + { + input.readMessage( + getInputActionParametersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 42 + case 50: + { + input.readMessage( + getOutputActionParametersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -955,250 +860,121 @@ public Builder setFlowBytes(com.google.protobuf.ByteString value) { return this; } - private java.util.List - inputParameters_ = java.util.Collections.emptyList(); - - private void ensureInputParametersIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - inputParameters_ = - new java.util.ArrayList( - inputParameters_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> - inputParametersBuilder_; - - /** - * - * - *
-     * A list of input parameters for the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; - * - */ - public java.util.List - getInputParametersList() { - if (inputParametersBuilder_ == null) { - return java.util.Collections.unmodifiableList(inputParameters_); - } else { - return inputParametersBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * A list of input parameters for the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; - * - */ - public int getInputParametersCount() { - if (inputParametersBuilder_ == null) { - return inputParameters_.size(); - } else { - return inputParametersBuilder_.getCount(); - } - } + private com.google.protobuf.Struct inputActionParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + inputActionParametersBuilder_; /** * * *
-     * A list of input parameters for the flow invocation.
+     * Optional. A list of input parameters for the flow.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getInputParameters(int index) { - if (inputParametersBuilder_ == null) { - return inputParameters_.get(index); - } else { - return inputParametersBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * A list of input parameters for the flow invocation.
-     * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; - * + * @return Whether the inputActionParameters field is set. */ - public Builder setInputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (inputParametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputParametersIsMutable(); - inputParameters_.set(index, value); - onChanged(); - } else { - inputParametersBuilder_.setMessage(index, value); - } - return this; + public boolean hasInputActionParameters() { + return ((bitField0_ & 0x00000002) != 0); } /** * * *
-     * A list of input parameters for the flow invocation.
+     * Optional. A list of input parameters for the flow.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * - */ - public Builder setInputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (inputParametersBuilder_ == null) { - ensureInputParametersIsMutable(); - inputParameters_.set(index, builderForValue.build()); - onChanged(); - } else { - inputParametersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * * - *
-     * A list of input parameters for the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; - * + * @return The inputActionParameters. */ - public Builder addInputParameters( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (inputParametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputParametersIsMutable(); - inputParameters_.add(value); - onChanged(); + public com.google.protobuf.Struct getInputActionParameters() { + if (inputActionParametersBuilder_ == null) { + return inputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputActionParameters_; } else { - inputParametersBuilder_.addMessage(value); + return inputActionParametersBuilder_.getMessage(); } - return this; } /** * * *
-     * A list of input parameters for the flow invocation.
+     * Optional. A list of input parameters for the flow.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addInputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (inputParametersBuilder_ == null) { + public Builder setInputActionParameters(com.google.protobuf.Struct value) { + if (inputActionParametersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureInputParametersIsMutable(); - inputParameters_.add(index, value); - onChanged(); + inputActionParameters_ = value; } else { - inputParametersBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * A list of input parameters for the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; - * - */ - public Builder addInputParameters( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (inputParametersBuilder_ == null) { - ensureInputParametersIsMutable(); - inputParameters_.add(builderForValue.build()); - onChanged(); - } else { - inputParametersBuilder_.addMessage(builderForValue.build()); + inputActionParametersBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** * * *
-     * A list of input parameters for the flow invocation.
+     * Optional. A list of input parameters for the flow.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addInputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (inputParametersBuilder_ == null) { - ensureInputParametersIsMutable(); - inputParameters_.add(index, builderForValue.build()); - onChanged(); + public Builder setInputActionParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (inputActionParametersBuilder_ == null) { + inputActionParameters_ = builderForValue.build(); } else { - inputParametersBuilder_.addMessage(index, builderForValue.build()); + inputActionParametersBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** * * *
-     * A list of input parameters for the flow invocation.
+     * Optional. A list of input parameters for the flow.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addAllInputParameters( - java.lang.Iterable - values) { - if (inputParametersBuilder_ == null) { - ensureInputParametersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputParameters_); - onChanged(); + public Builder mergeInputActionParameters(com.google.protobuf.Struct value) { + if (inputActionParametersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && inputActionParameters_ != null + && inputActionParameters_ != com.google.protobuf.Struct.getDefaultInstance()) { + getInputActionParametersBuilder().mergeFrom(value); + } else { + inputActionParameters_ = value; + } } else { - inputParametersBuilder_.addAllMessages(values); + inputActionParametersBuilder_.mergeFrom(value); } - return this; - } - /** - * - * - *
-     * A list of input parameters for the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; - * - */ - public Builder clearInputParameters() { - if (inputParametersBuilder_ == null) { - inputParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + if (inputActionParameters_ != null) { + bitField0_ |= 0x00000002; onChanged(); - } else { - inputParametersBuilder_.clear(); } return this; } @@ -1206,382 +982,202 @@ public Builder clearInputParameters() { * * *
-     * A list of input parameters for the flow invocation.
+     * Optional. A list of input parameters for the flow.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder removeInputParameters(int index) { - if (inputParametersBuilder_ == null) { - ensureInputParametersIsMutable(); - inputParameters_.remove(index); - onChanged(); - } else { - inputParametersBuilder_.remove(index); + public Builder clearInputActionParameters() { + bitField0_ = (bitField0_ & ~0x00000002); + inputActionParameters_ = null; + if (inputActionParametersBuilder_ != null) { + inputActionParametersBuilder_.dispose(); + inputActionParametersBuilder_ = null; } + onChanged(); return this; } /** * * *
-     * A list of input parameters for the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder getInputParametersBuilder( - int index) { - return getInputParametersFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * A list of input parameters for the flow invocation.
+     * Optional. A list of input parameters for the flow.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder - getInputParametersOrBuilder(int index) { - if (inputParametersBuilder_ == null) { - return inputParameters_.get(index); - } else { - return inputParametersBuilder_.getMessageOrBuilder(index); - } + public com.google.protobuf.Struct.Builder getInputActionParametersBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getInputActionParametersFieldBuilder().getBuilder(); } /** * * *
-     * A list of input parameters for the flow invocation.
+     * Optional. A list of input parameters for the flow.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getInputParametersOrBuilderList() { - if (inputParametersBuilder_ != null) { - return inputParametersBuilder_.getMessageOrBuilderList(); + public com.google.protobuf.StructOrBuilder getInputActionParametersOrBuilder() { + if (inputActionParametersBuilder_ != null) { + return inputActionParametersBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(inputParameters_); + return inputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputActionParameters_; } } /** * * *
-     * A list of input parameters for the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder - addInputParametersBuilder() { - return getInputParametersFieldBuilder() - .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); - } - /** - * - * - *
-     * A list of input parameters for the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder addInputParametersBuilder( - int index) { - return getInputParametersFieldBuilder() - .addBuilder( - index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); - } - /** - * - * - *
-     * A list of input parameters for the flow invocation.
+     * Optional. A list of input parameters for the flow.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getInputParametersBuilderList() { - return getInputParametersFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> - getInputParametersFieldBuilder() { - if (inputParametersBuilder_ == null) { - inputParametersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder>( - inputParameters_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - inputParameters_ = null; - } - return inputParametersBuilder_; - } - - private java.util.List - outputParameters_ = java.util.Collections.emptyList(); - - private void ensureOutputParametersIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - outputParameters_ = - new java.util.ArrayList( - outputParameters_); - bitField0_ |= 0x00000004; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getInputActionParametersFieldBuilder() { + if (inputActionParametersBuilder_ == null) { + inputActionParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getInputActionParameters(), getParentForChildren(), isClean()); + inputActionParameters_ = null; } + return inputActionParametersBuilder_; } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> - outputParametersBuilder_; - + private com.google.protobuf.Struct outputActionParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + outputActionParametersBuilder_; /** * * *
-     * A list of output parameters generated by the flow invocation.
+     * Optional. A list of output parameters generated by the flow invocation.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; - * - */ - public java.util.List - getOutputParametersList() { - if (outputParametersBuilder_ == null) { - return java.util.Collections.unmodifiableList(outputParameters_); - } else { - return outputParametersBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * A list of output parameters generated by the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * - */ - public int getOutputParametersCount() { - if (outputParametersBuilder_ == null) { - return outputParameters_.size(); - } else { - return outputParametersBuilder_.getCount(); - } - } - /** - * - * - *
-     * A list of output parameters generated by the flow invocation.
-     * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; - * + * @return Whether the outputActionParameters field is set. */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getOutputParameters(int index) { - if (outputParametersBuilder_ == null) { - return outputParameters_.get(index); - } else { - return outputParametersBuilder_.getMessage(index); - } + public boolean hasOutputActionParameters() { + return ((bitField0_ & 0x00000004) != 0); } /** * * *
-     * A list of output parameters generated by the flow invocation.
+     * Optional. A list of output parameters generated by the flow invocation.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; - * - */ - public Builder setOutputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (outputParametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputParametersIsMutable(); - outputParameters_.set(index, value); - onChanged(); - } else { - outputParametersBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * A list of output parameters generated by the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * - */ - public Builder setOutputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (outputParametersBuilder_ == null) { - ensureOutputParametersIsMutable(); - outputParameters_.set(index, builderForValue.build()); - onChanged(); - } else { - outputParametersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** * - * - *
-     * A list of output parameters generated by the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; - * + * @return The outputActionParameters. */ - public Builder addOutputParameters( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (outputParametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputParametersIsMutable(); - outputParameters_.add(value); - onChanged(); + public com.google.protobuf.Struct getOutputActionParameters() { + if (outputActionParametersBuilder_ == null) { + return outputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputActionParameters_; } else { - outputParametersBuilder_.addMessage(value); + return outputActionParametersBuilder_.getMessage(); } - return this; } /** * * *
-     * A list of output parameters generated by the flow invocation.
+     * Optional. A list of output parameters generated by the flow invocation.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addOutputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (outputParametersBuilder_ == null) { + public Builder setOutputActionParameters(com.google.protobuf.Struct value) { + if (outputActionParametersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureOutputParametersIsMutable(); - outputParameters_.add(index, value); - onChanged(); - } else { - outputParametersBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * A list of output parameters generated by the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; - * - */ - public Builder addOutputParameters( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (outputParametersBuilder_ == null) { - ensureOutputParametersIsMutable(); - outputParameters_.add(builderForValue.build()); - onChanged(); + outputActionParameters_ = value; } else { - outputParametersBuilder_.addMessage(builderForValue.build()); + outputActionParametersBuilder_.setMessage(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } /** * * *
-     * A list of output parameters generated by the flow invocation.
+     * Optional. A list of output parameters generated by the flow invocation.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addOutputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (outputParametersBuilder_ == null) { - ensureOutputParametersIsMutable(); - outputParameters_.add(index, builderForValue.build()); - onChanged(); + public Builder setOutputActionParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (outputActionParametersBuilder_ == null) { + outputActionParameters_ = builderForValue.build(); } else { - outputParametersBuilder_.addMessage(index, builderForValue.build()); + outputActionParametersBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; + onChanged(); return this; } /** * * *
-     * A list of output parameters generated by the flow invocation.
+     * Optional. A list of output parameters generated by the flow invocation.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addAllOutputParameters( - java.lang.Iterable - values) { - if (outputParametersBuilder_ == null) { - ensureOutputParametersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputParameters_); - onChanged(); + public Builder mergeOutputActionParameters(com.google.protobuf.Struct value) { + if (outputActionParametersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && outputActionParameters_ != null + && outputActionParameters_ != com.google.protobuf.Struct.getDefaultInstance()) { + getOutputActionParametersBuilder().mergeFrom(value); + } else { + outputActionParameters_ = value; + } } else { - outputParametersBuilder_.addAllMessages(values); + outputActionParametersBuilder_.mergeFrom(value); } - return this; - } - /** - * - * - *
-     * A list of output parameters generated by the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; - * - */ - public Builder clearOutputParameters() { - if (outputParametersBuilder_ == null) { - outputParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + if (outputActionParameters_ != null) { + bitField0_ |= 0x00000004; onChanged(); - } else { - outputParametersBuilder_.clear(); } return this; } @@ -1589,136 +1185,85 @@ public Builder clearOutputParameters() { * * *
-     * A list of output parameters generated by the flow invocation.
+     * Optional. A list of output parameters generated by the flow invocation.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder removeOutputParameters(int index) { - if (outputParametersBuilder_ == null) { - ensureOutputParametersIsMutable(); - outputParameters_.remove(index); - onChanged(); - } else { - outputParametersBuilder_.remove(index); + public Builder clearOutputActionParameters() { + bitField0_ = (bitField0_ & ~0x00000004); + outputActionParameters_ = null; + if (outputActionParametersBuilder_ != null) { + outputActionParametersBuilder_.dispose(); + outputActionParametersBuilder_ = null; } + onChanged(); return this; } /** * * *
-     * A list of output parameters generated by the flow invocation.
+     * Optional. A list of output parameters generated by the flow invocation.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder - getOutputParametersBuilder(int index) { - return getOutputParametersFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * A list of output parameters generated by the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder - getOutputParametersOrBuilder(int index) { - if (outputParametersBuilder_ == null) { - return outputParameters_.get(index); - } else { - return outputParametersBuilder_.getMessageOrBuilder(index); - } + public com.google.protobuf.Struct.Builder getOutputActionParametersBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getOutputActionParametersFieldBuilder().getBuilder(); } /** * * *
-     * A list of output parameters generated by the flow invocation.
+     * Optional. A list of output parameters generated by the flow invocation.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getOutputParametersOrBuilderList() { - if (outputParametersBuilder_ != null) { - return outputParametersBuilder_.getMessageOrBuilderList(); + public com.google.protobuf.StructOrBuilder getOutputActionParametersOrBuilder() { + if (outputActionParametersBuilder_ != null) { + return outputActionParametersBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(outputParameters_); + return outputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputActionParameters_; } } /** * * *
-     * A list of output parameters generated by the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder - addOutputParametersBuilder() { - return getOutputParametersFieldBuilder() - .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); - } - /** - * - * - *
-     * A list of output parameters generated by the flow invocation.
+     * Optional. A list of output parameters generated by the flow invocation.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder - addOutputParametersBuilder(int index) { - return getOutputParametersFieldBuilder() - .addBuilder( - index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); - } - /** - * - * - *
-     * A list of output parameters generated by the flow invocation.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getOutputParametersBuilderList() { - return getOutputParametersFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> - getOutputParametersFieldBuilder() { - if (outputParametersBuilder_ == null) { - outputParametersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder>( - outputParameters_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - outputParameters_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getOutputActionParametersFieldBuilder() { + if (outputActionParametersBuilder_ == null) { + outputActionParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getOutputActionParameters(), getParentForChildren(), isClean()); + outputActionParameters_ = null; } - return outputParametersBuilder_; + return outputActionParametersBuilder_; } private int flowState_ = 0; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowInvocationOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowInvocationOrBuilder.java index 8db0e7243397..21b5b8d4a2f2 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowInvocationOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowInvocationOrBuilder.java @@ -61,112 +61,83 @@ public interface FlowInvocationOrBuilder * * *
-   * A list of input parameters for the flow invocation.
+   * Optional. A list of input parameters for the flow.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; - */ - java.util.List getInputParametersList(); - /** - * - * - *
-   * A list of input parameters for the flow invocation.
-   * 
+ * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * @return Whether the inputActionParameters field is set. */ - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getInputParameters(int index); + boolean hasInputActionParameters(); /** * * *
-   * A list of input parameters for the flow invocation.
+   * Optional. A list of input parameters for the flow.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; - */ - int getInputParametersCount(); - /** - * - * - *
-   * A list of input parameters for the flow invocation.
-   * 
+ * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * @return The inputActionParameters. */ - java.util.List - getInputParametersOrBuilderList(); + com.google.protobuf.Struct getInputActionParameters(); /** * * *
-   * A list of input parameters for the flow invocation.
+   * Optional. A list of input parameters for the flow.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getInputParametersOrBuilder( - int index); + com.google.protobuf.StructOrBuilder getInputActionParametersOrBuilder(); /** * * *
-   * A list of output parameters generated by the flow invocation.
+   * Optional. A list of output parameters generated by the flow invocation.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * - */ - java.util.List getOutputParametersList(); - /** * - * - *
-   * A list of output parameters generated by the flow invocation.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; - * + * @return Whether the outputActionParameters field is set. */ - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getOutputParameters(int index); + boolean hasOutputActionParameters(); /** * * *
-   * A list of output parameters generated by the flow invocation.
+   * Optional. A list of output parameters generated by the flow invocation.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * - */ - int getOutputParametersCount(); - /** - * - * - *
-   * A list of output parameters generated by the flow invocation.
-   * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; - * + * @return The outputActionParameters. */ - java.util.List - getOutputParametersOrBuilderList(); + com.google.protobuf.Struct getOutputActionParameters(); /** * * *
-   * A list of output parameters generated by the flow invocation.
+   * Optional. A list of output parameters generated by the flow invocation.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getOutputParametersOrBuilder( - int index); + com.google.protobuf.StructOrBuilder getOutputActionParametersOrBuilder(); /** * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Match.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Match.java index a10a9d29e35a..4069bb103cc3 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Match.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Match.java @@ -145,6 +145,17 @@ public enum MatchType implements com.google.protobuf.ProtocolMessageEnum { * EVENT = 6; */ EVENT(6), + /** + * + * + *
+     * The query was handled by a
+     * [`Playbook`][google.cloud.dialogflow.cx.v3beta1.Playbook].
+     * 
+ * + * PLAYBOOK = 9; + */ + PLAYBOOK(9), UNRECOGNIZED(-1), ; @@ -218,6 +229,17 @@ public enum MatchType implements com.google.protobuf.ProtocolMessageEnum { * EVENT = 6; */ public static final int EVENT_VALUE = 6; + /** + * + * + *
+     * The query was handled by a
+     * [`Playbook`][google.cloud.dialogflow.cx.v3beta1.Playbook].
+     * 
+ * + * PLAYBOOK = 9; + */ + public static final int PLAYBOOK_VALUE = 9; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -257,6 +279,8 @@ public static MatchType forNumber(int value) { return NO_INPUT; case 6: return EVENT; + case 9: + return PLAYBOOK; default: return null; } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Playbook.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Playbook.java index 14ccdf00eda8..8fbd204bad35 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Playbook.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Playbook.java @@ -51,7 +51,6 @@ private Playbook() { goal_ = ""; inputParameterDefinitions_ = java.util.Collections.emptyList(); outputParameterDefinitions_ = java.util.Collections.emptyList(); - steps_ = java.util.Collections.emptyList(); referencedPlaybooks_ = com.google.protobuf.LazyStringArrayList.emptyList(); referencedFlows_ = com.google.protobuf.LazyStringArrayList.emptyList(); referencedTools_ = com.google.protobuf.LazyStringArrayList.emptyList(); @@ -1422,6 +1421,1029 @@ public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getDefaultInstanceFo } } + public interface InstructionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + java.util.List getStepsList(); + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getSteps(int index); + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + int getStepsCount(); + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + java.util.List + getStepsOrBuilderList(); + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder getStepsOrBuilder(int index); + } + /** + * + * + *
+   * Message of the Instruction of the playbook.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction} + */ + public static final class Instruction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction) + InstructionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Instruction.newBuilder() to construct. + private Instruction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Instruction() { + steps_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Instruction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Instruction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Instruction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.class, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.Builder.class); + } + + public static final int STEPS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List steps_; + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + @java.lang.Override + public java.util.List getStepsList() { + return steps_; + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + @java.lang.Override + public java.util.List + getStepsOrBuilderList() { + return steps_; + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + @java.lang.Override + public int getStepsCount() { + return steps_.size(); + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getSteps(int index) { + return steps_.get(index); + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder getStepsOrBuilder( + int index) { + return steps_.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 < steps_.size(); i++) { + output.writeMessage(2, steps_.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 < steps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, steps_.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.dialogflow.cx.v3beta1.Playbook.Instruction)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction other = + (com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction) obj; + + if (!getStepsList().equals(other.getStepsList())) 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 (getStepsCount() > 0) { + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + getStepsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.dialogflow.cx.v3beta1.Playbook.Instruction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Message of the Instruction of the playbook.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction) + com.google.cloud.dialogflow.cx.v3beta1.Playbook.InstructionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Instruction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Instruction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.class, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + } else { + steps_ = null; + stepsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Instruction_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction build() { + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction result = + new com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction result) { + if (stepsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + steps_ = java.util.Collections.unmodifiableList(steps_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.steps_ = steps_; + } else { + result.steps_ = stepsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.getDefaultInstance()) + return this; + if (stepsBuilder_ == null) { + if (!other.steps_.isEmpty()) { + if (steps_.isEmpty()) { + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStepsIsMutable(); + steps_.addAll(other.steps_); + } + onChanged(); + } + } else { + if (!other.steps_.isEmpty()) { + if (stepsBuilder_.isEmpty()) { + stepsBuilder_.dispose(); + stepsBuilder_ = null; + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000001); + stepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getStepsFieldBuilder() + : null; + } else { + stepsBuilder_.addAllMessages(other.steps_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.parser(), + extensionRegistry); + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(m); + } else { + stepsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List steps_ = + java.util.Collections.emptyList(); + + private void ensureStepsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + steps_ = + new java.util.ArrayList(steps_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder> + stepsBuilder_; + + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public java.util.List getStepsList() { + if (stepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(steps_); + } else { + return stepsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public int getStepsCount() { + if (stepsBuilder_ == null) { + return steps_.size(); + } else { + return stepsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getSteps(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder setSteps( + int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.set(index, value); + onChanged(); + } else { + stepsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder setSteps( + int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.set(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder addSteps(com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(value); + onChanged(); + } else { + stepsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder addSteps( + int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(index, value); + onChanged(); + } else { + stepsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder addSteps( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder addSteps( + int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder addAllSteps( + java.lang.Iterable + values) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_); + onChanged(); + } else { + stepsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder clearSteps() { + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + stepsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder removeSteps(int index) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.remove(index); + onChanged(); + } else { + stepsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder getStepsBuilder( + int index) { + return getStepsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder getStepsOrBuilder( + int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public java.util.List + getStepsOrBuilderList() { + if (stepsBuilder_ != null) { + return stepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(steps_); + } + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder addStepsBuilder() { + return getStepsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.getDefaultInstance()); + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder addStepsBuilder( + int index) { + return getStepsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.getDefaultInstance()); + } + /** + * + * + *
+       * Ordered list of step by step execution instructions to accomplish
+       * target goal.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public java.util.List + getStepsBuilderList() { + return getStepsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder> + getStepsFieldBuilder() { + if (stepsBuilder_ == null) { + stepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder>( + steps_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + steps_ = null; + } + return stepsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction) + private static final com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Instruction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.dialogflow.cx.v3beta1.Playbook.Instruction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @@ -1754,81 +2776,55 @@ public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition getOutputParam return outputParameterDefinitions_.get(index); } - public static final int STEPS_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private java.util.List steps_; + public static final int INSTRUCTION_FIELD_NUMBER = 17; + private com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction_; /** * * *
-   * Ordered list of step by step execution instructions to accomplish
-   * target goal.
+   * Instruction to accomplish target goal.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; - */ - @java.lang.Override - public java.util.List getStepsList() { - return steps_; - } - /** - * + * .google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction = 17; * - *
-   * Ordered list of step by step execution instructions to accomplish
-   * target goal.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + * @return Whether the instruction field is set. */ @java.lang.Override - public java.util.List - getStepsOrBuilderList() { - return steps_; + public boolean hasInstruction() { + return ((bitField0_ & 0x00000001) != 0); } /** * * *
-   * Ordered list of step by step execution instructions to accomplish
-   * target goal.
+   * Instruction to accomplish target goal.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; - */ - @java.lang.Override - public int getStepsCount() { - return steps_.size(); - } - /** - * - * - *
-   * Ordered list of step by step execution instructions to accomplish
-   * target goal.
-   * 
+ * .google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction = 17; * - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + * @return The instruction. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getSteps(int index) { - return steps_.get(index); + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction getInstruction() { + return instruction_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.getDefaultInstance() + : instruction_; } /** * * *
-   * Ordered list of step by step execution instructions to accomplish
-   * target goal.
+   * Instruction to accomplish target goal.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + * .google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction = 17; */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder getStepsOrBuilder( - int index) { - return steps_.get(index); + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.InstructionOrBuilder + getInstructionOrBuilder() { + return instruction_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.getDefaultInstance() + : instruction_; } public static final int TOKEN_COUNT_FIELD_NUMBER = 8; @@ -1866,7 +2862,7 @@ public long getTokenCount() { */ @java.lang.Override public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -1915,7 +2911,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { */ @java.lang.Override public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -2197,7 +3193,7 @@ public com.google.protobuf.ByteString getReferencedToolsBytes(int index) { */ @java.lang.Override public boolean hasLlmModelSettings() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -2260,9 +3256,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(goal_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, goal_); } - for (int i = 0; i < steps_.size(); i++) { - output.writeMessage(4, steps_.get(i)); - } for (int i = 0; i < inputParameterDefinitions_.size(); i++) { output.writeMessage(5, inputParameterDefinitions_.get(i)); } @@ -2272,10 +3265,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (tokenCount_ != 0L) { output.writeInt64(8, tokenCount_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(9, getCreateTime()); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(10, getUpdateTime()); } for (int i = 0; i < referencedPlaybooks_.size(); i++) { @@ -2288,9 +3281,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < referencedTools_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 13, referencedTools_.getRaw(i)); } - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(14, getLlmModelSettings()); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(17, getInstruction()); + } getUnknownFields().writeTo(output); } @@ -2309,9 +3305,6 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(goal_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, goal_); } - for (int i = 0; i < steps_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, steps_.get(i)); - } for (int i = 0; i < inputParameterDefinitions_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -2325,10 +3318,10 @@ public int getSerializedSize() { if (tokenCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(8, tokenCount_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCreateTime()); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUpdateTime()); } { @@ -2355,9 +3348,12 @@ public int getSerializedSize() { size += dataSize; size += 1 * getReferencedToolsList().size(); } - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getLlmModelSettings()); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getInstruction()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2381,7 +3377,10 @@ public boolean equals(final java.lang.Object obj) { return false; if (!getOutputParameterDefinitionsList().equals(other.getOutputParameterDefinitionsList())) return false; - if (!getStepsList().equals(other.getStepsList())) return false; + if (hasInstruction() != other.hasInstruction()) return false; + if (hasInstruction()) { + if (!getInstruction().equals(other.getInstruction())) return false; + } if (getTokenCount() != other.getTokenCount()) return false; if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { @@ -2423,9 +3422,9 @@ public int hashCode() { hash = (37 * hash) + OUTPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER; hash = (53 * hash) + getOutputParameterDefinitionsList().hashCode(); } - if (getStepsCount() > 0) { - hash = (37 * hash) + STEPS_FIELD_NUMBER; - hash = (53 * hash) + getStepsList().hashCode(); + if (hasInstruction()) { + hash = (37 * hash) + INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getInstruction().hashCode(); } hash = (37 * hash) + TOKEN_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTokenCount()); @@ -2602,7 +3601,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getInputParameterDefinitionsFieldBuilder(); getOutputParameterDefinitionsFieldBuilder(); - getStepsFieldBuilder(); + getInstructionFieldBuilder(); getCreateTimeFieldBuilder(); getUpdateTimeFieldBuilder(); getLlmModelSettingsFieldBuilder(); @@ -2630,13 +3629,11 @@ public Builder clear() { outputParameterDefinitionsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); - if (stepsBuilder_ == null) { - steps_ = java.util.Collections.emptyList(); - } else { - steps_ = null; - stepsBuilder_.clear(); + instruction_ = null; + if (instructionBuilder_ != null) { + instructionBuilder_.dispose(); + instructionBuilder_ = null; } - bitField0_ = (bitField0_ & ~0x00000020); tokenCount_ = 0L; createTime_ = null; if (createTimeBuilder_ != null) { @@ -2713,15 +3710,6 @@ private void buildPartialRepeatedFields( } else { result.outputParameterDefinitions_ = outputParameterDefinitionsBuilder_.build(); } - if (stepsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - steps_ = java.util.Collections.unmodifiableList(steps_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.steps_ = steps_; - } else { - result.steps_ = stepsBuilder_.build(); - } } private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Playbook result) { @@ -2735,17 +3723,22 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Playbook resul if (((from_bitField0_ & 0x00000004) != 0)) { result.goal_ = goal_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.instruction_ = + instructionBuilder_ == null ? instruction_ : instructionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } if (((from_bitField0_ & 0x00000040) != 0)) { result.tokenCount_ = tokenCount_; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000080) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; + to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000100) != 0)) { result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - to_bitField0_ |= 0x00000002; + to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000200) != 0)) { referencedPlaybooks_.makeImmutable(); @@ -2762,7 +3755,7 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Playbook resul if (((from_bitField0_ & 0x00001000) != 0)) { result.llmModelSettings_ = llmModelSettingsBuilder_ == null ? llmModelSettings_ : llmModelSettingsBuilder_.build(); - to_bitField0_ |= 0x00000004; + to_bitField0_ |= 0x00000008; } result.bitField0_ |= to_bitField0_; } @@ -2882,32 +3875,8 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Playbook other) } } } - if (stepsBuilder_ == null) { - if (!other.steps_.isEmpty()) { - if (steps_.isEmpty()) { - steps_ = other.steps_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureStepsIsMutable(); - steps_.addAll(other.steps_); - } - onChanged(); - } - } else { - if (!other.steps_.isEmpty()) { - if (stepsBuilder_.isEmpty()) { - stepsBuilder_.dispose(); - stepsBuilder_ = null; - steps_ = other.steps_; - bitField0_ = (bitField0_ & ~0x00000020); - stepsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getStepsFieldBuilder() - : null; - } else { - stepsBuilder_.addAllMessages(other.steps_); - } - } + if (other.hasInstruction()) { + mergeInstruction(other.getInstruction()); } if (other.getTokenCount() != 0L) { setTokenCount(other.getTokenCount()); @@ -2995,20 +3964,6 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 - case 34: - { - com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step m = - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.parser(), - extensionRegistry); - if (stepsBuilder_ == null) { - ensureStepsIsMutable(); - steps_.add(m); - } else { - stepsBuilder_.addMessage(m); - } - break; - } // case 34 case 42: { com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition m = @@ -3083,6 +4038,12 @@ public Builder mergeFrom( bitField0_ |= 0x00001000; break; } // case 114 + case 138: + { + input.readMessage(getInstructionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 138 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4249,244 +5210,116 @@ public Builder removeOutputParameterDefinitions(int index) { return outputParameterDefinitionsBuilder_; } - private java.util.List steps_ = - java.util.Collections.emptyList(); - - private void ensureStepsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - steps_ = - new java.util.ArrayList(steps_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step, - com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder> - stepsBuilder_; - - /** - * - * - *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; - */ - public java.util.List getStepsList() { - if (stepsBuilder_ == null) { - return java.util.Collections.unmodifiableList(steps_); - } else { - return stepsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; - */ - public int getStepsCount() { - if (stepsBuilder_ == null) { - return steps_.size(); - } else { - return stepsBuilder_.getCount(); - } - } + private com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.InstructionOrBuilder> + instructionBuilder_; /** * * *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
+     * Instruction to accomplish target goal.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; - */ - public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getSteps(int index) { - if (stepsBuilder_ == null) { - return steps_.get(index); - } else { - return stepsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
-     * 
+ * .google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction = 17; * - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + * @return Whether the instruction field is set. */ - public Builder setSteps(int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step value) { - if (stepsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStepsIsMutable(); - steps_.set(index, value); - onChanged(); - } else { - stepsBuilder_.setMessage(index, value); - } - return this; + public boolean hasInstruction() { + return ((bitField0_ & 0x00000020) != 0); } /** * * *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
+     * Instruction to accomplish target goal.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; - */ - public Builder setSteps( - int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder builderForValue) { - if (stepsBuilder_ == null) { - ensureStepsIsMutable(); - steps_.set(index, builderForValue.build()); - onChanged(); - } else { - stepsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
-     * 
+ * .google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction = 17; * - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + * @return The instruction. */ - public Builder addSteps(com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step value) { - if (stepsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStepsIsMutable(); - steps_.add(value); - onChanged(); + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction getInstruction() { + if (instructionBuilder_ == null) { + return instruction_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.getDefaultInstance() + : instruction_; } else { - stepsBuilder_.addMessage(value); + return instructionBuilder_.getMessage(); } - return this; } /** * * *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
+     * Instruction to accomplish target goal.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + * .google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction = 17; */ - public Builder addSteps(int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step value) { - if (stepsBuilder_ == null) { + public Builder setInstruction( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction value) { + if (instructionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureStepsIsMutable(); - steps_.add(index, value); - onChanged(); - } else { - stepsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; - */ - public Builder addSteps( - com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder builderForValue) { - if (stepsBuilder_ == null) { - ensureStepsIsMutable(); - steps_.add(builderForValue.build()); - onChanged(); + instruction_ = value; } else { - stepsBuilder_.addMessage(builderForValue.build()); + instructionBuilder_.setMessage(value); } + bitField0_ |= 0x00000020; + onChanged(); return this; } /** * * *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
+     * Instruction to accomplish target goal.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + * .google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction = 17; */ - public Builder addSteps( - int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder builderForValue) { - if (stepsBuilder_ == null) { - ensureStepsIsMutable(); - steps_.add(index, builderForValue.build()); - onChanged(); + public Builder setInstruction( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.Builder builderForValue) { + if (instructionBuilder_ == null) { + instruction_ = builderForValue.build(); } else { - stepsBuilder_.addMessage(index, builderForValue.build()); + instructionBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000020; + onChanged(); return this; } /** * * *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
+     * Instruction to accomplish target goal.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + * .google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction = 17; */ - public Builder addAllSteps( - java.lang.Iterable values) { - if (stepsBuilder_ == null) { - ensureStepsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_); - onChanged(); + public Builder mergeInstruction( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction value) { + if (instructionBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && instruction_ != null + && instruction_ + != com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction + .getDefaultInstance()) { + getInstructionBuilder().mergeFrom(value); + } else { + instruction_ = value; + } } else { - stepsBuilder_.addAllMessages(values); + instructionBuilder_.mergeFrom(value); } - return this; - } - /** - * - * - *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; - */ - public Builder clearSteps() { - if (stepsBuilder_ == null) { - steps_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + if (instruction_ != null) { + bitField0_ |= 0x00000020; onChanged(); - } else { - stepsBuilder_.clear(); } return this; } @@ -4494,130 +5327,79 @@ public Builder clearSteps() { * * *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
+     * Instruction to accomplish target goal.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + * .google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction = 17; */ - public Builder removeSteps(int index) { - if (stepsBuilder_ == null) { - ensureStepsIsMutable(); - steps_.remove(index); - onChanged(); - } else { - stepsBuilder_.remove(index); + public Builder clearInstruction() { + bitField0_ = (bitField0_ & ~0x00000020); + instruction_ = null; + if (instructionBuilder_ != null) { + instructionBuilder_.dispose(); + instructionBuilder_ = null; } + onChanged(); return this; } /** * * *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; - */ - public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder getStepsBuilder(int index) { - return getStepsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
+     * Instruction to accomplish target goal.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + * .google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction = 17; */ - public com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder getStepsOrBuilder( - int index) { - if (stepsBuilder_ == null) { - return steps_.get(index); - } else { - return stepsBuilder_.getMessageOrBuilder(index); - } + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.Builder + getInstructionBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getInstructionFieldBuilder().getBuilder(); } /** * * *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
+     * Instruction to accomplish target goal.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + * .google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction = 17; */ - public java.util.List - getStepsOrBuilderList() { - if (stepsBuilder_ != null) { - return stepsBuilder_.getMessageOrBuilderList(); + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.InstructionOrBuilder + getInstructionOrBuilder() { + if (instructionBuilder_ != null) { + return instructionBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(steps_); + return instruction_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.getDefaultInstance() + : instruction_; } } /** * * *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; - */ - public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder addStepsBuilder() { - return getStepsFieldBuilder() - .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.getDefaultInstance()); - } - /** - * - * - *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; - */ - public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder addStepsBuilder(int index) { - return getStepsFieldBuilder() - .addBuilder( - index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.getDefaultInstance()); - } - /** - * - * - *
-     * Ordered list of step by step execution instructions to accomplish
-     * target goal.
+     * Instruction to accomplish target goal.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + * .google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction = 17; */ - public java.util.List - getStepsBuilderList() { - return getStepsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step, - com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder> - getStepsFieldBuilder() { - if (stepsBuilder_ == null) { - stepsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step, - com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder, - com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder>( - steps_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); - steps_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.InstructionOrBuilder> + getInstructionFieldBuilder() { + if (instructionBuilder_ == null) { + instructionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.InstructionOrBuilder>( + getInstruction(), getParentForChildren(), isClean()); + instruction_ = null; } - return stepsBuilder_; + return instructionBuilder_; } private long tokenCount_; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInput.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInput.java index 0c5eb83482d1..b6eae38ca86d 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInput.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInput.java @@ -40,7 +40,6 @@ private PlaybookInput(com.google.protobuf.GeneratedMessageV3.Builder builder) private PlaybookInput() { precedingConversationSummary_ = ""; - parameters_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -64,6 +63,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.Builder.class); } + private int bitField0_; public static final int PRECEDING_CONVERSATION_SUMMARY_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -119,87 +119,57 @@ public com.google.protobuf.ByteString getPrecedingConversationSummaryBytes() { } } - public static final int PARAMETERS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List parameters_; + public static final int ACTION_PARAMETERS_FIELD_NUMBER = 3; + private com.google.protobuf.Struct actionParameters_; /** * * *
-   * Optional. A list of input parameters for the invocation.
+   * Optional. A list of input parameters for the action.
    * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; * - */ - @java.lang.Override - public java.util.List - getParametersList() { - return parameters_; - } - /** * - * - *
-   * Optional. A list of input parameters for the invocation.
-   * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * @return Whether the actionParameters field is set. */ @java.lang.Override - public java.util.List - getParametersOrBuilderList() { - return parameters_; + public boolean hasActionParameters() { + return ((bitField0_ & 0x00000001) != 0); } /** * * *
-   * Optional. A list of input parameters for the invocation.
+   * Optional. A list of input parameters for the action.
    * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; * - */ - @java.lang.Override - public int getParametersCount() { - return parameters_.size(); - } - /** * - * - *
-   * Optional. A list of input parameters for the invocation.
-   * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * @return The actionParameters. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getParameters(int index) { - return parameters_.get(index); + public com.google.protobuf.Struct getActionParameters() { + return actionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : actionParameters_; } /** * * *
-   * Optional. A list of input parameters for the invocation.
+   * Optional. A list of input parameters for the action.
    * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getParametersOrBuilder( - int index) { - return parameters_.get(index); + public com.google.protobuf.StructOrBuilder getActionParametersOrBuilder() { + return actionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : actionParameters_; } private byte memoizedIsInitialized = -1; @@ -219,8 +189,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(precedingConversationSummary_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, precedingConversationSummary_); } - for (int i = 0; i < parameters_.size(); i++) { - output.writeMessage(2, parameters_.get(i)); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getActionParameters()); } getUnknownFields().writeTo(output); } @@ -236,8 +206,8 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 1, precedingConversationSummary_); } - for (int i = 0; i < parameters_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, parameters_.get(i)); + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getActionParameters()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -257,7 +227,10 @@ public boolean equals(final java.lang.Object obj) { if (!getPrecedingConversationSummary().equals(other.getPrecedingConversationSummary())) return false; - if (!getParametersList().equals(other.getParametersList())) return false; + if (hasActionParameters() != other.hasActionParameters()) return false; + if (hasActionParameters()) { + if (!getActionParameters().equals(other.getActionParameters())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -271,9 +244,9 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PRECEDING_CONVERSATION_SUMMARY_FIELD_NUMBER; hash = (53 * hash) + getPrecedingConversationSummary().hashCode(); - if (getParametersCount() > 0) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParametersList().hashCode(); + if (hasActionParameters()) { + hash = (37 * hash) + ACTION_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getActionParameters().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; @@ -404,10 +377,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getActionParametersFieldBuilder(); + } } @java.lang.Override @@ -415,13 +397,11 @@ public Builder clear() { super.clear(); bitField0_ = 0; precedingConversationSummary_ = ""; - if (parametersBuilder_ == null) { - parameters_ = java.util.Collections.emptyList(); - } else { - parameters_ = null; - parametersBuilder_.clear(); + actionParameters_ = null; + if (actionParametersBuilder_ != null) { + actionParametersBuilder_.dispose(); + actionParametersBuilder_ = null; } - bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -449,7 +429,6 @@ public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput build() { public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput buildPartial() { com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput result = new com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput(this); - buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -457,24 +436,18 @@ public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput buildPartial() { return result; } - private void buildPartialRepeatedFields( - com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput result) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - parameters_ = java.util.Collections.unmodifiableList(parameters_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.parameters_ = parameters_; - } else { - result.parameters_ = parametersBuilder_.build(); - } - } - private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.precedingConversationSummary_ = precedingConversationSummary_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.actionParameters_ = + actionParametersBuilder_ == null ? actionParameters_ : actionParametersBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -528,32 +501,8 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput ot bitField0_ |= 0x00000001; onChanged(); } - if (parametersBuilder_ == null) { - if (!other.parameters_.isEmpty()) { - if (parameters_.isEmpty()) { - parameters_ = other.parameters_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureParametersIsMutable(); - parameters_.addAll(other.parameters_); - } - onChanged(); - } - } else { - if (!other.parameters_.isEmpty()) { - if (parametersBuilder_.isEmpty()) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - parameters_ = other.parameters_; - bitField0_ = (bitField0_ & ~0x00000002); - parametersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getParametersFieldBuilder() - : null; - } else { - parametersBuilder_.addAllMessages(other.parameters_); - } - } + if (other.hasActionParameters()) { + mergeActionParameters(other.getActionParameters()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -587,20 +536,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 - case 18: + case 26: { - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter m = - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.parser(), - extensionRegistry); - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.add(m); - } else { - parametersBuilder_.addMessage(m); - } + input.readMessage( + getActionParametersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; break; - } // case 18 + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -736,260 +678,121 @@ public Builder setPrecedingConversationSummaryBytes(com.google.protobuf.ByteStri return this; } - private java.util.List parameters_ = - java.util.Collections.emptyList(); - - private void ensureParametersIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - parameters_ = - new java.util.ArrayList( - parameters_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> - parametersBuilder_; - + private com.google.protobuf.Struct actionParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + actionParametersBuilder_; /** * * *
-     * Optional. A list of input parameters for the invocation.
+     * Optional. A list of input parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; * - */ - public java.util.List - getParametersList() { - if (parametersBuilder_ == null) { - return java.util.Collections.unmodifiableList(parameters_); - } else { - return parametersBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Optional. A list of input parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getParametersCount() { - if (parametersBuilder_ == null) { - return parameters_.size(); - } else { - return parametersBuilder_.getCount(); - } - } - /** * - * - *
-     * Optional. A list of input parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * @return Whether the actionParameters field is set. */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getParameters(int index) { - if (parametersBuilder_ == null) { - return parameters_.get(index); - } else { - return parametersBuilder_.getMessage(index); - } + public boolean hasActionParameters() { + return ((bitField0_ & 0x00000002) != 0); } /** * * *
-     * Optional. A list of input parameters for the invocation.
+     * Optional. A list of input parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; * - */ - public Builder setParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParametersIsMutable(); - parameters_.set(index, value); - onChanged(); - } else { - parametersBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. A list of input parameters for the invocation.
-     * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * @return The actionParameters. */ - public Builder setParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.set(index, builderForValue.build()); - onChanged(); + public com.google.protobuf.Struct getActionParameters() { + if (actionParametersBuilder_ == null) { + return actionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : actionParameters_; } else { - parametersBuilder_.setMessage(index, builderForValue.build()); + return actionParametersBuilder_.getMessage(); } - return this; } /** * * *
-     * Optional. A list of input parameters for the invocation.
+     * Optional. A list of input parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addParameters(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (parametersBuilder_ == null) { + public Builder setActionParameters(com.google.protobuf.Struct value) { + if (actionParametersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureParametersIsMutable(); - parameters_.add(value); - onChanged(); + actionParameters_ = value; } else { - parametersBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Optional. A list of input parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParametersIsMutable(); - parameters_.add(index, value); - onChanged(); - } else { - parametersBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. A list of input parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParameters( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.add(builderForValue.build()); - onChanged(); - } else { - parametersBuilder_.addMessage(builderForValue.build()); + actionParametersBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** * * *
-     * Optional. A list of input parameters for the invocation.
+     * Optional. A list of input parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.add(index, builderForValue.build()); - onChanged(); + public Builder setActionParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (actionParametersBuilder_ == null) { + actionParameters_ = builderForValue.build(); } else { - parametersBuilder_.addMessage(index, builderForValue.build()); + actionParametersBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** * * *
-     * Optional. A list of input parameters for the invocation.
+     * Optional. A list of input parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addAllParameters( - java.lang.Iterable - values) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_); - onChanged(); + public Builder mergeActionParameters(com.google.protobuf.Struct value) { + if (actionParametersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && actionParameters_ != null + && actionParameters_ != com.google.protobuf.Struct.getDefaultInstance()) { + getActionParametersBuilder().mergeFrom(value); + } else { + actionParameters_ = value; + } } else { - parametersBuilder_.addAllMessages(values); + actionParametersBuilder_.mergeFrom(value); } - return this; - } - /** - * - * - *
-     * Optional. A list of input parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearParameters() { - if (parametersBuilder_ == null) { - parameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + if (actionParameters_ != null) { + bitField0_ |= 0x00000002; onChanged(); - } else { - parametersBuilder_.clear(); } return this; } @@ -997,139 +800,85 @@ public Builder clearParameters() { * * *
-     * Optional. A list of input parameters for the invocation.
+     * Optional. A list of input parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder removeParameters(int index) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.remove(index); - onChanged(); - } else { - parametersBuilder_.remove(index); + public Builder clearActionParameters() { + bitField0_ = (bitField0_ & ~0x00000002); + actionParameters_ = null; + if (actionParametersBuilder_ != null) { + actionParametersBuilder_.dispose(); + actionParametersBuilder_ = null; } + onChanged(); return this; } /** * * *
-     * Optional. A list of input parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder getParametersBuilder( - int index) { - return getParametersFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Optional. A list of input parameters for the invocation.
+     * Optional. A list of input parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getParametersOrBuilder( - int index) { - if (parametersBuilder_ == null) { - return parameters_.get(index); - } else { - return parametersBuilder_.getMessageOrBuilder(index); - } + public com.google.protobuf.Struct.Builder getActionParametersBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getActionParametersFieldBuilder().getBuilder(); } /** * * *
-     * Optional. A list of input parameters for the invocation.
+     * Optional. A list of input parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getParametersOrBuilderList() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilderList(); + public com.google.protobuf.StructOrBuilder getActionParametersOrBuilder() { + if (actionParametersBuilder_ != null) { + return actionParametersBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(parameters_); + return actionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : actionParameters_; } } /** * * *
-     * Optional. A list of input parameters for the invocation.
+     * Optional. A list of input parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder addParametersBuilder() { - return getParametersFieldBuilder() - .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. A list of input parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder addParametersBuilder( - int index) { - return getParametersFieldBuilder() - .addBuilder( - index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. A list of input parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getParametersBuilderList() { - return getParametersFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> - getParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder>( - parameters_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - parameters_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getActionParametersFieldBuilder() { + if (actionParametersBuilder_ == null) { + actionParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getActionParameters(), getParentForChildren(), isClean()); + actionParameters_ = null; } - return parametersBuilder_; + return actionParametersBuilder_; } @java.lang.Override diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInputOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInputOrBuilder.java index 06e4b187197e..bc2c61ea7a07 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInputOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInputOrBuilder.java @@ -57,61 +57,37 @@ public interface PlaybookInputOrBuilder * * *
-   * Optional. A list of input parameters for the invocation.
+   * Optional. A list of input parameters for the action.
    * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; * - */ - java.util.List getParametersList(); - /** * - * - *
-   * Optional. A list of input parameters for the invocation.
-   * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * @return Whether the actionParameters field is set. */ - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getParameters(int index); + boolean hasActionParameters(); /** * * *
-   * Optional. A list of input parameters for the invocation.
+   * Optional. A list of input parameters for the action.
    * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; * - */ - int getParametersCount(); - /** * - * - *
-   * Optional. A list of input parameters for the invocation.
-   * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * @return The actionParameters. */ - java.util.List - getParametersOrBuilderList(); + com.google.protobuf.Struct getActionParameters(); /** * * *
-   * Optional. A list of input parameters for the invocation.
+   * Optional. A list of input parameters for the action.
    * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getParametersOrBuilder(int index); + com.google.protobuf.StructOrBuilder getActionParametersOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOrBuilder.java index 422e9eab1edc..0ada0445f8eb 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOrBuilder.java @@ -239,58 +239,36 @@ com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition getOutputParameterDef * * *
-   * Ordered list of step by step execution instructions to accomplish
-   * target goal.
+   * Instruction to accomplish target goal.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; - */ - java.util.List getStepsList(); - /** - * - * - *
-   * Ordered list of step by step execution instructions to accomplish
-   * target goal.
-   * 
+ * .google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction = 17; * - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + * @return Whether the instruction field is set. */ - com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getSteps(int index); + boolean hasInstruction(); /** * * *
-   * Ordered list of step by step execution instructions to accomplish
-   * target goal.
+   * Instruction to accomplish target goal.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; - */ - int getStepsCount(); - /** - * - * - *
-   * Ordered list of step by step execution instructions to accomplish
-   * target goal.
-   * 
+ * .google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction = 17; * - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + * @return The instruction. */ - java.util.List - getStepsOrBuilderList(); + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction getInstruction(); /** * * *
-   * Ordered list of step by step execution instructions to accomplish
-   * target goal.
+   * Instruction to accomplish target goal.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + * .google.cloud.dialogflow.cx.v3beta1.Playbook.Instruction instruction = 17; */ - com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder getStepsOrBuilder(int index); + com.google.cloud.dialogflow.cx.v3beta1.Playbook.InstructionOrBuilder getInstructionOrBuilder(); /** * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOutput.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOutput.java index 6f14f6adc80b..cbcdd73f233f 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOutput.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOutput.java @@ -40,7 +40,6 @@ private PlaybookOutput(com.google.protobuf.GeneratedMessageV3.Builder builder private PlaybookOutput() { executionSummary_ = ""; - parameters_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -64,6 +63,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.Builder.class); } + private int bitField0_; public static final int EXECUTION_SUMMARY_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -115,87 +115,57 @@ public com.google.protobuf.ByteString getExecutionSummaryBytes() { } } - public static final int PARAMETERS_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private java.util.List parameters_; + public static final int ACTION_PARAMETERS_FIELD_NUMBER = 4; + private com.google.protobuf.Struct actionParameters_; /** * * *
-   * Optional. A list of output parameters for the invocation.
+   * Optional. A Struct object of output parameters for the action.
    * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; * - */ - @java.lang.Override - public java.util.List - getParametersList() { - return parameters_; - } - /** * - * - *
-   * Optional. A list of output parameters for the invocation.
-   * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * @return Whether the actionParameters field is set. */ @java.lang.Override - public java.util.List - getParametersOrBuilderList() { - return parameters_; + public boolean hasActionParameters() { + return ((bitField0_ & 0x00000001) != 0); } /** * * *
-   * Optional. A list of output parameters for the invocation.
+   * Optional. A Struct object of output parameters for the action.
    * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; * - */ - @java.lang.Override - public int getParametersCount() { - return parameters_.size(); - } - /** * - * - *
-   * Optional. A list of output parameters for the invocation.
-   * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * @return The actionParameters. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getParameters(int index) { - return parameters_.get(index); + public com.google.protobuf.Struct getActionParameters() { + return actionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : actionParameters_; } /** * * *
-   * Optional. A list of output parameters for the invocation.
+   * Optional. A Struct object of output parameters for the action.
    * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getParametersOrBuilder( - int index) { - return parameters_.get(index); + public com.google.protobuf.StructOrBuilder getActionParametersOrBuilder() { + return actionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : actionParameters_; } private byte memoizedIsInitialized = -1; @@ -215,8 +185,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionSummary_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, executionSummary_); } - for (int i = 0; i < parameters_.size(); i++) { - output.writeMessage(3, parameters_.get(i)); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getActionParameters()); } getUnknownFields().writeTo(output); } @@ -230,8 +200,8 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionSummary_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, executionSummary_); } - for (int i = 0; i < parameters_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, parameters_.get(i)); + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getActionParameters()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -250,7 +220,10 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput) obj; if (!getExecutionSummary().equals(other.getExecutionSummary())) return false; - if (!getParametersList().equals(other.getParametersList())) return false; + if (hasActionParameters() != other.hasActionParameters()) return false; + if (hasActionParameters()) { + if (!getActionParameters().equals(other.getActionParameters())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -264,9 +237,9 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + EXECUTION_SUMMARY_FIELD_NUMBER; hash = (53 * hash) + getExecutionSummary().hashCode(); - if (getParametersCount() > 0) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParametersList().hashCode(); + if (hasActionParameters()) { + hash = (37 * hash) + ACTION_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getActionParameters().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; @@ -398,10 +371,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getActionParametersFieldBuilder(); + } } @java.lang.Override @@ -409,13 +391,11 @@ public Builder clear() { super.clear(); bitField0_ = 0; executionSummary_ = ""; - if (parametersBuilder_ == null) { - parameters_ = java.util.Collections.emptyList(); - } else { - parameters_ = null; - parametersBuilder_.clear(); + actionParameters_ = null; + if (actionParametersBuilder_ != null) { + actionParametersBuilder_.dispose(); + actionParametersBuilder_ = null; } - bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -443,7 +423,6 @@ public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput build() { public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput buildPartial() { com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput result = new com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput(this); - buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -451,24 +430,18 @@ public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput buildPartial() { return result; } - private void buildPartialRepeatedFields( - com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput result) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - parameters_ = java.util.Collections.unmodifiableList(parameters_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.parameters_ = parameters_; - } else { - result.parameters_ = parametersBuilder_.build(); - } - } - private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.executionSummary_ = executionSummary_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.actionParameters_ = + actionParametersBuilder_ == null ? actionParameters_ : actionParametersBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -522,32 +495,8 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput o bitField0_ |= 0x00000001; onChanged(); } - if (parametersBuilder_ == null) { - if (!other.parameters_.isEmpty()) { - if (parameters_.isEmpty()) { - parameters_ = other.parameters_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureParametersIsMutable(); - parameters_.addAll(other.parameters_); - } - onChanged(); - } - } else { - if (!other.parameters_.isEmpty()) { - if (parametersBuilder_.isEmpty()) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - parameters_ = other.parameters_; - bitField0_ = (bitField0_ & ~0x00000002); - parametersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getParametersFieldBuilder() - : null; - } else { - parametersBuilder_.addAllMessages(other.parameters_); - } - } + if (other.hasActionParameters()) { + mergeActionParameters(other.getActionParameters()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -581,20 +530,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 - case 26: + case 34: { - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter m = - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.parser(), - extensionRegistry); - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.add(m); - } else { - parametersBuilder_.addMessage(m); - } + input.readMessage( + getActionParametersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; break; - } // case 26 + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -720,260 +662,121 @@ public Builder setExecutionSummaryBytes(com.google.protobuf.ByteString value) { return this; } - private java.util.List parameters_ = - java.util.Collections.emptyList(); - - private void ensureParametersIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - parameters_ = - new java.util.ArrayList( - parameters_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> - parametersBuilder_; - + private com.google.protobuf.Struct actionParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + actionParametersBuilder_; /** * * *
-     * Optional. A list of output parameters for the invocation.
+     * Optional. A Struct object of output parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; * - */ - public java.util.List - getParametersList() { - if (parametersBuilder_ == null) { - return java.util.Collections.unmodifiableList(parameters_); - } else { - return parametersBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Optional. A list of output parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getParametersCount() { - if (parametersBuilder_ == null) { - return parameters_.size(); - } else { - return parametersBuilder_.getCount(); - } - } - /** * - * - *
-     * Optional. A list of output parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * @return Whether the actionParameters field is set. */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getParameters(int index) { - if (parametersBuilder_ == null) { - return parameters_.get(index); - } else { - return parametersBuilder_.getMessage(index); - } + public boolean hasActionParameters() { + return ((bitField0_ & 0x00000002) != 0); } /** * * *
-     * Optional. A list of output parameters for the invocation.
+     * Optional. A Struct object of output parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; * - */ - public Builder setParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParametersIsMutable(); - parameters_.set(index, value); - onChanged(); - } else { - parametersBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. A list of output parameters for the invocation.
-     * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * @return The actionParameters. */ - public Builder setParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.set(index, builderForValue.build()); - onChanged(); + public com.google.protobuf.Struct getActionParameters() { + if (actionParametersBuilder_ == null) { + return actionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : actionParameters_; } else { - parametersBuilder_.setMessage(index, builderForValue.build()); + return actionParametersBuilder_.getMessage(); } - return this; } /** * * *
-     * Optional. A list of output parameters for the invocation.
+     * Optional. A Struct object of output parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addParameters(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (parametersBuilder_ == null) { + public Builder setActionParameters(com.google.protobuf.Struct value) { + if (actionParametersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureParametersIsMutable(); - parameters_.add(value); - onChanged(); + actionParameters_ = value; } else { - parametersBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Optional. A list of output parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParametersIsMutable(); - parameters_.add(index, value); - onChanged(); - } else { - parametersBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. A list of output parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParameters( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.add(builderForValue.build()); - onChanged(); - } else { - parametersBuilder_.addMessage(builderForValue.build()); + actionParametersBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** * * *
-     * Optional. A list of output parameters for the invocation.
+     * Optional. A Struct object of output parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.add(index, builderForValue.build()); - onChanged(); + public Builder setActionParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (actionParametersBuilder_ == null) { + actionParameters_ = builderForValue.build(); } else { - parametersBuilder_.addMessage(index, builderForValue.build()); + actionParametersBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** * * *
-     * Optional. A list of output parameters for the invocation.
+     * Optional. A Struct object of output parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addAllParameters( - java.lang.Iterable - values) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_); - onChanged(); + public Builder mergeActionParameters(com.google.protobuf.Struct value) { + if (actionParametersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && actionParameters_ != null + && actionParameters_ != com.google.protobuf.Struct.getDefaultInstance()) { + getActionParametersBuilder().mergeFrom(value); + } else { + actionParameters_ = value; + } } else { - parametersBuilder_.addAllMessages(values); + actionParametersBuilder_.mergeFrom(value); } - return this; - } - /** - * - * - *
-     * Optional. A list of output parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearParameters() { - if (parametersBuilder_ == null) { - parameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + if (actionParameters_ != null) { + bitField0_ |= 0x00000002; onChanged(); - } else { - parametersBuilder_.clear(); } return this; } @@ -981,139 +784,85 @@ public Builder clearParameters() { * * *
-     * Optional. A list of output parameters for the invocation.
+     * Optional. A Struct object of output parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder removeParameters(int index) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.remove(index); - onChanged(); - } else { - parametersBuilder_.remove(index); + public Builder clearActionParameters() { + bitField0_ = (bitField0_ & ~0x00000002); + actionParameters_ = null; + if (actionParametersBuilder_ != null) { + actionParametersBuilder_.dispose(); + actionParametersBuilder_ = null; } + onChanged(); return this; } /** * * *
-     * Optional. A list of output parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder getParametersBuilder( - int index) { - return getParametersFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Optional. A list of output parameters for the invocation.
+     * Optional. A Struct object of output parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getParametersOrBuilder( - int index) { - if (parametersBuilder_ == null) { - return parameters_.get(index); - } else { - return parametersBuilder_.getMessageOrBuilder(index); - } + public com.google.protobuf.Struct.Builder getActionParametersBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getActionParametersFieldBuilder().getBuilder(); } /** * * *
-     * Optional. A list of output parameters for the invocation.
+     * Optional. A Struct object of output parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getParametersOrBuilderList() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilderList(); + public com.google.protobuf.StructOrBuilder getActionParametersOrBuilder() { + if (actionParametersBuilder_ != null) { + return actionParametersBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(parameters_); + return actionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : actionParameters_; } } /** * * *
-     * Optional. A list of output parameters for the invocation.
+     * Optional. A Struct object of output parameters for the action.
      * 
* * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder addParametersBuilder() { - return getParametersFieldBuilder() - .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. A list of output parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder addParametersBuilder( - int index) { - return getParametersFieldBuilder() - .addBuilder( - index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. A list of output parameters for the invocation.
-     * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getParametersBuilderList() { - return getParametersFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> - getParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder>( - parameters_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - parameters_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getActionParametersFieldBuilder() { + if (actionParametersBuilder_ == null) { + actionParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getActionParameters(), getParentForChildren(), isClean()); + actionParameters_ = null; } - return parametersBuilder_; + return actionParametersBuilder_; } @java.lang.Override diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOutputOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOutputOrBuilder.java index 3610b210e4a7..cc57006a288d 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOutputOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOutputOrBuilder.java @@ -53,61 +53,37 @@ public interface PlaybookOutputOrBuilder * * *
-   * Optional. A list of output parameters for the invocation.
+   * Optional. A Struct object of output parameters for the action.
    * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; * - */ - java.util.List getParametersList(); - /** * - * - *
-   * Optional. A list of output parameters for the invocation.
-   * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * @return Whether the actionParameters field is set. */ - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getParameters(int index); + boolean hasActionParameters(); /** * * *
-   * Optional. A list of output parameters for the invocation.
+   * Optional. A Struct object of output parameters for the action.
    * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; * - */ - int getParametersCount(); - /** * - * - *
-   * Optional. A list of output parameters for the invocation.
-   * 
- * - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * @return The actionParameters. */ - java.util.List - getParametersOrBuilderList(); + com.google.protobuf.Struct getActionParameters(); /** * * *
-   * Optional. A list of output parameters for the invocation.
+   * Optional. A Struct object of output parameters for the action.
    * 
* - * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Struct action_parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getParametersOrBuilder(int index); + com.google.protobuf.StructOrBuilder getActionParametersOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookProto.java index 7f8c0f70ce6f..19a76a7c0c22 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookProto.java @@ -60,6 +60,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Step_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Step_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Instruction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Instruction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookVersionRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -122,116 +126,118 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "PlaybookRequest\022C\n\010playbook\030\001 \001(\0132,.goog" + "le.cloud.dialogflow.cx.v3beta1.PlaybookB" + "\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.google.proto" - + "buf.FieldMask\"\331\007\n\010Playbook\022\014\n\004name\030\001 \001(\t" + + "buf.FieldMask\"\267\010\n\010Playbook\022\014\n\004name\030\001 \001(\t" + "\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022\021\n\004goal\030\003 \001(" + "\tB\003\340A\002\022a\n\033input_parameter_definitions\030\005 " + "\003(\01327.google.cloud.dialogflow.cx.v3beta1" + ".ParameterDefinitionB\003\340A\001\022b\n\034output_para" + "meter_definitions\030\006 \003(\01327.google.cloud.d" + "ialogflow.cx.v3beta1.ParameterDefinition" - + "B\003\340A\001\022@\n\005steps\030\004 \003(\01321.google.cloud.dial" - + "ogflow.cx.v3beta1.Playbook.Step\022\030\n\013token" - + "_count\030\010 \001(\003B\003\340A\003\0224\n\013create_time\030\t \001(\0132\032" - + ".google.protobuf.TimestampB\003\340A\003\0224\n\013updat" - + "e_time\030\n \001(\0132\032.google.protobuf.Timestamp" - + "B\003\340A\003\022H\n\024referenced_playbooks\030\013 \003(\tB*\340A\003" - + "\372A$\n\"dialogflow.googleapis.com/Playbook\022" - + "@\n\020referenced_flows\030\014 \003(\tB&\340A\003\372A \n\036dialo" - + "gflow.googleapis.com/Flow\022@\n\020referenced_" - + "tools\030\r \003(\tB&\340A\001\372A \n\036dialogflow.googleap" - + "is.com/Tool\022U\n\022llm_model_settings\030\016 \001(\0132" - + "4.google.cloud.dialogflow.cx.v3beta1.Llm" - + "ModelSettingsB\003\340A\001\032g\n\004Step\022\016\n\004text\030\001 \001(\t" - + "H\000\022@\n\005steps\030\002 \003(\01321.google.cloud.dialogf" - + "low.cx.v3beta1.Playbook.StepB\r\n\013instruct" - + "ion:t\352Aq\n\"dialogflow.googleapis.com/Play" - + "book\022Kprojects/{project}/locations/{loca" - + "tion}/agents/{agent}/playbooks/{playbook" - + "}\"\265\001\n\034CreatePlaybookVersionRequest\022A\n\006pa" - + "rent\030\001 \001(\tB1\340A\002\372A+\022)dialogflow.googleapi" - + "s.com/PlaybookVersion\022R\n\020playbook_versio" - + "n\030\002 \001(\01323.google.cloud.dialogflow.cx.v3b" - + "eta1.PlaybookVersionB\003\340A\002\"\255\003\n\017PlaybookVe" - + "rsion\022\014\n\004name\030\001 \001(\t\022\030\n\013description\030\002 \001(\t" - + "B\003\340A\001\022C\n\010playbook\030\003 \001(\0132,.google.cloud.d" - + "ialogflow.cx.v3beta1.PlaybookB\003\340A\003\022B\n\010ex" - + "amples\030\004 \003(\0132+.google.cloud.dialogflow.c" - + "x.v3beta1.ExampleB\003\340A\003\0224\n\013update_time\030\005 " - + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003:\262\001\352" - + "A\256\001\n)dialogflow.googleapis.com/PlaybookV" - + "ersion\022^projects/{project}/locations/{lo" - + "cation}/agents/{agent}/playbooks/{playbo" - + "ok}/versions/{version}*\020playbookVersions" - + "2\017playbookVersion\"\\\n\031GetPlaybookVersionR" - + "equest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)dialogflow" - + ".googleapis.com/PlaybookVersion\"\221\001\n\033List" - + "PlaybookVersionsRequest\022A\n\006parent\030\001 \001(\tB" - + "1\340A\002\372A+\022)dialogflow.googleapis.com/Playb" - + "ookVersion\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npa" - + "ge_token\030\003 \001(\tB\003\340A\001\"\207\001\n\034ListPlaybookVers" - + "ionsResponse\022N\n\021playbook_versions\030\001 \003(\0132" - + "3.google.cloud.dialogflow.cx.v3beta1.Pla" - + "ybookVersion\022\027\n\017next_page_token\030\002 \001(\t\"_\n" - + "\034DeletePlaybookVersionRequest\022?\n\004name\030\001 " - + "\001(\tB1\340A\002\372A+\n)dialogflow.googleapis.com/P" - + "laybookVersion2\305\020\n\tPlaybooks\022\332\001\n\016CreateP" - + "laybook\0229.google.cloud.dialogflow.cx.v3b" - + "eta1.CreatePlaybookRequest\032,.google.clou" - + "d.dialogflow.cx.v3beta1.Playbook\"_\332A\017par" - + "ent,playbook\202\323\344\223\002G\";/v3beta1/{parent=pro" - + "jects/*/locations/*/agents/*}/playbooks:" - + "\010playbook\022\257\001\n\016DeletePlaybook\0229.google.cl" - + "oud.dialogflow.cx.v3beta1.DeletePlaybook" - + "Request\032\026.google.protobuf.Empty\"J\332A\004name" - + "\202\323\344\223\002=*;/v3beta1/{name=projects/*/locati" - + "ons/*/agents/*/playbooks/*}\022\322\001\n\rListPlay" - + "books\0228.google.cloud.dialogflow.cx.v3bet" - + "a1.ListPlaybooksRequest\0329.google.cloud.d" - + "ialogflow.cx.v3beta1.ListPlaybooksRespon" - + "se\"L\332A\006parent\202\323\344\223\002=\022;/v3beta1/{parent=pr" - + "ojects/*/locations/*/agents/*}/playbooks" - + "\022\277\001\n\013GetPlaybook\0226.google.cloud.dialogfl" - + "ow.cx.v3beta1.GetPlaybookRequest\032,.googl" - + "e.cloud.dialogflow.cx.v3beta1.Playbook\"J" - + "\332A\004name\202\323\344\223\002=\022;/v3beta1/{name=projects/*" - + "/locations/*/agents/*/playbooks/*}\022\350\001\n\016U" - + "pdatePlaybook\0229.google.cloud.dialogflow." - + "cx.v3beta1.UpdatePlaybookRequest\032,.googl" - + "e.cloud.dialogflow.cx.v3beta1.Playbook\"m" - + "\332A\024playbook,update_mask\202\323\344\223\002P2D/v3beta1/" - + "{playbook.name=projects/*/locations/*/ag" - + "ents/*/playbooks/*}:\010playbook\022\212\002\n\025Create" - + "PlaybookVersion\022@.google.cloud.dialogflo" - + "w.cx.v3beta1.CreatePlaybookVersionReques" - + "t\0323.google.cloud.dialogflow.cx.v3beta1.P" - + "laybookVersion\"z\332A\027parent,playbook_versi" - + "on\202\323\344\223\002Z\"F/v3beta1/{parent=projects/*/lo" - + "cations/*/agents/*/playbooks/*}/versions" - + ":\020playbook_version\022\337\001\n\022GetPlaybookVersio" - + "n\022=.google.cloud.dialogflow.cx.v3beta1.G" - + "etPlaybookVersionRequest\0323.google.cloud." - + "dialogflow.cx.v3beta1.PlaybookVersion\"U\332" - + "A\004name\202\323\344\223\002H\022F/v3beta1/{name=projects/*/" - + "locations/*/agents/*/playbooks/*/version" - + "s/*}\022\362\001\n\024ListPlaybookVersions\022?.google.c" - + "loud.dialogflow.cx.v3beta1.ListPlaybookV" - + "ersionsRequest\032@.google.cloud.dialogflow" - + ".cx.v3beta1.ListPlaybookVersionsResponse" - + "\"W\332A\006parent\202\323\344\223\002H\022F/v3beta1/{parent=proj" - + "ects/*/locations/*/agents/*/playbooks/*}" - + "/versions\022\310\001\n\025DeletePlaybookVersion\022@.go" - + "ogle.cloud.dialogflow.cx.v3beta1.DeleteP" - + "laybookVersionRequest\032\026.google.protobuf." - + "Empty\"U\332A\004name\202\323\344\223\002H*F/v3beta1/{name=pro" + + "B\003\340A\001\022M\n\013instruction\030\021 \001(\01328.google.clou" + + "d.dialogflow.cx.v3beta1.Playbook.Instruc" + + "tion\022\030\n\013token_count\030\010 \001(\003B\003\340A\003\0224\n\013create" + + "_time\030\t \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\003\0224\n\013update_time\030\n \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\003\022H\n\024referenced_playboo" + + "ks\030\013 \003(\tB*\340A\003\372A$\n\"dialogflow.googleapis." + + "com/Playbook\022@\n\020referenced_flows\030\014 \003(\tB&" + + "\340A\003\372A \n\036dialogflow.googleapis.com/Flow\022@" + + "\n\020referenced_tools\030\r \003(\tB&\340A\001\372A \n\036dialog" + + "flow.googleapis.com/Tool\022U\n\022llm_model_se" + + "ttings\030\016 \001(\01324.google.cloud.dialogflow.c" + + "x.v3beta1.LlmModelSettingsB\003\340A\001\032g\n\004Step\022" + + "\016\n\004text\030\001 \001(\tH\000\022@\n\005steps\030\002 \003(\01321.google." + + "cloud.dialogflow.cx.v3beta1.Playbook.Ste" + + "pB\r\n\013instruction\032O\n\013Instruction\022@\n\005steps" + + "\030\002 \003(\01321.google.cloud.dialogflow.cx.v3be" + + "ta1.Playbook.Step:t\352Aq\n\"dialogflow.googl" + + "eapis.com/Playbook\022Kprojects/{project}/l" + + "ocations/{location}/agents/{agent}/playb" + + "ooks/{playbook}\"\265\001\n\034CreatePlaybookVersio" + + "nRequest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)dialog" + + "flow.googleapis.com/PlaybookVersion\022R\n\020p" + + "laybook_version\030\002 \001(\01323.google.cloud.dia" + + "logflow.cx.v3beta1.PlaybookVersionB\003\340A\002\"" + + "\255\003\n\017PlaybookVersion\022\014\n\004name\030\001 \001(\t\022\030\n\013des" + + "cription\030\002 \001(\tB\003\340A\001\022C\n\010playbook\030\003 \001(\0132,." + + "google.cloud.dialogflow.cx.v3beta1.Playb" + + "ookB\003\340A\003\022B\n\010examples\030\004 \003(\0132+.google.clou" + + "d.dialogflow.cx.v3beta1.ExampleB\003\340A\003\0224\n\013" + + "update_time\030\005 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003:\262\001\352A\256\001\n)dialogflow.googleapis" + + ".com/PlaybookVersion\022^projects/{project}" + + "/locations/{location}/agents/{agent}/pla" + + "ybooks/{playbook}/versions/{version}*\020pl" + + "aybookVersions2\017playbookVersion\"\\\n\031GetPl" + + "aybookVersionRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372" + + "A+\n)dialogflow.googleapis.com/PlaybookVe" + + "rsion\"\221\001\n\033ListPlaybookVersionsRequest\022A\n" + + "\006parent\030\001 \001(\tB1\340A\002\372A+\022)dialogflow.google" + + "apis.com/PlaybookVersion\022\026\n\tpage_size\030\002 " + + "\001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"\207\001\n\034Li" + + "stPlaybookVersionsResponse\022N\n\021playbook_v" + + "ersions\030\001 \003(\01323.google.cloud.dialogflow." + + "cx.v3beta1.PlaybookVersion\022\027\n\017next_page_" + + "token\030\002 \001(\t\"_\n\034DeletePlaybookVersionRequ" + + "est\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)dialogflow.go" + + "ogleapis.com/PlaybookVersion2\305\020\n\tPlayboo" + + "ks\022\332\001\n\016CreatePlaybook\0229.google.cloud.dia" + + "logflow.cx.v3beta1.CreatePlaybookRequest" + + "\032,.google.cloud.dialogflow.cx.v3beta1.Pl" + + "aybook\"_\332A\017parent,playbook\202\323\344\223\002G\";/v3bet" + + "a1/{parent=projects/*/locations/*/agents" + + "/*}/playbooks:\010playbook\022\257\001\n\016DeletePlaybo" + + "ok\0229.google.cloud.dialogflow.cx.v3beta1." + + "DeletePlaybookRequest\032\026.google.protobuf." + + "Empty\"J\332A\004name\202\323\344\223\002=*;/v3beta1/{name=pro" + "jects/*/locations/*/agents/*/playbooks/*" - + "/versions/*}\032x\312A\031dialogflow.googleapis.c" - + "om\322AYhttps://www.googleapis.com/auth/clo" - + "ud-platform,https://www.googleapis.com/a" - + "uth/dialogflowB\236\001\n&com.google.cloud.dial" - + "ogflow.cx.v3beta1B\rPlaybookProtoP\001Z6clou" - + "d.google.com/go/dialogflow/cx/apiv3beta1" - + "/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialog" - + "flow.Cx.V3Beta1b\006proto3" + + "}\022\322\001\n\rListPlaybooks\0228.google.cloud.dialo" + + "gflow.cx.v3beta1.ListPlaybooksRequest\0329." + + "google.cloud.dialogflow.cx.v3beta1.ListP" + + "laybooksResponse\"L\332A\006parent\202\323\344\223\002=\022;/v3be" + + "ta1/{parent=projects/*/locations/*/agent" + + "s/*}/playbooks\022\277\001\n\013GetPlaybook\0226.google." + + "cloud.dialogflow.cx.v3beta1.GetPlaybookR" + + "equest\032,.google.cloud.dialogflow.cx.v3be" + + "ta1.Playbook\"J\332A\004name\202\323\344\223\002=\022;/v3beta1/{n" + + "ame=projects/*/locations/*/agents/*/play" + + "books/*}\022\350\001\n\016UpdatePlaybook\0229.google.clo" + + "ud.dialogflow.cx.v3beta1.UpdatePlaybookR" + + "equest\032,.google.cloud.dialogflow.cx.v3be" + + "ta1.Playbook\"m\332A\024playbook,update_mask\202\323\344" + + "\223\002P2D/v3beta1/{playbook.name=projects/*/" + + "locations/*/agents/*/playbooks/*}:\010playb" + + "ook\022\212\002\n\025CreatePlaybookVersion\022@.google.c" + + "loud.dialogflow.cx.v3beta1.CreatePlayboo" + + "kVersionRequest\0323.google.cloud.dialogflo" + + "w.cx.v3beta1.PlaybookVersion\"z\332A\027parent," + + "playbook_version\202\323\344\223\002Z\"F/v3beta1/{parent" + + "=projects/*/locations/*/agents/*/playboo" + + "ks/*}/versions:\020playbook_version\022\337\001\n\022Get" + + "PlaybookVersion\022=.google.cloud.dialogflo" + + "w.cx.v3beta1.GetPlaybookVersionRequest\0323" + + ".google.cloud.dialogflow.cx.v3beta1.Play" + + "bookVersion\"U\332A\004name\202\323\344\223\002H\022F/v3beta1/{na" + + "me=projects/*/locations/*/agents/*/playb" + + "ooks/*/versions/*}\022\362\001\n\024ListPlaybookVersi" + + "ons\022?.google.cloud.dialogflow.cx.v3beta1" + + ".ListPlaybookVersionsRequest\032@.google.cl" + + "oud.dialogflow.cx.v3beta1.ListPlaybookVe" + + "rsionsResponse\"W\332A\006parent\202\323\344\223\002H\022F/v3beta" + + "1/{parent=projects/*/locations/*/agents/" + + "*/playbooks/*}/versions\022\310\001\n\025DeletePlaybo" + + "okVersion\022@.google.cloud.dialogflow.cx.v" + + "3beta1.DeletePlaybookVersionRequest\032\026.go" + + "ogle.protobuf.Empty\"U\332A\004name\202\323\344\223\002H*F/v3b" + + "eta1/{name=projects/*/locations/*/agents" + + "/*/playbooks/*/versions/*}\032x\312A\031dialogflo" + + "w.googleapis.com\322AYhttps://www.googleapi" + + "s.com/auth/cloud-platform,https://www.go" + + "ogleapis.com/auth/dialogflowB\236\001\n&com.goo" + + "gle.cloud.dialogflow.cx.v3beta1B\rPlayboo" + + "kProtoP\001Z6cloud.google.com/go/dialogflow" + + "/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Googl" + + "e.Cloud.Dialogflow.Cx.V3Beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -307,7 +313,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Goal", "InputParameterDefinitions", "OutputParameterDefinitions", - "Steps", + "Instruction", "TokenCount", "CreateTime", "UpdateTime", @@ -326,6 +332,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Text", "Steps", "Instruction", }); + internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Instruction_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Instruction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Instruction_descriptor, + new java.lang.String[] { + "Steps", + }); internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookVersionRequest_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookVersionRequest_fieldAccessorTable = diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessage.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessage.java index 5888048f0e15..759574bee806 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessage.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessage.java @@ -8526,6 +8526,7 @@ public enum MessageCase MIXED_AUDIO(13), TELEPHONY_TRANSFER_CALL(18), KNOWLEDGE_INFO_CARD(20), + TOOL_CALL(22), MESSAGE_NOT_SET(0); private final int value; @@ -8564,6 +8565,8 @@ public static MessageCase forNumber(int value) { return TELEPHONY_TRANSFER_CALL; case 20: return KNOWLEDGE_INFO_CARD; + case 22: + return TOOL_CALL; case 0: return MESSAGE_NOT_SET; default: @@ -9207,6 +9210,60 @@ public boolean hasKnowledgeInfoCard() { .getDefaultInstance(); } + public static final int TOOL_CALL_FIELD_NUMBER = 22; + /** + * + * + *
+   * Returns the definition of a tool call that should be executed by the
+   * client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; + * + * @return Whether the toolCall field is set. + */ + @java.lang.Override + public boolean hasToolCall() { + return messageCase_ == 22; + } + /** + * + * + *
+   * Returns the definition of a tool call that should be executed by the
+   * client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; + * + * @return The toolCall. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCall getToolCall() { + if (messageCase_ == 22) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolCall) message_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolCall.getDefaultInstance(); + } + /** + * + * + *
+   * Returns the definition of a tool call that should be executed by the
+   * client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallOrBuilder getToolCallOrBuilder() { + if (messageCase_ == 22) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolCall) message_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolCall.getDefaultInstance(); + } + public static final int CHANNEL_FIELD_NUMBER = 19; @SuppressWarnings("serial") @@ -9321,6 +9378,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 20, (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) message_); } + if (messageCase_ == 22) { + output.writeMessage(22, (com.google.cloud.dialogflow.cx.v3beta1.ToolCall) message_); + } getUnknownFields().writeTo(output); } @@ -9389,6 +9449,11 @@ public int getSerializedSize() { 20, (com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) message_); } + if (messageCase_ == 22) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 22, (com.google.cloud.dialogflow.cx.v3beta1.ToolCall) message_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -9438,6 +9503,9 @@ public boolean equals(final java.lang.Object obj) { case 20: if (!getKnowledgeInfoCard().equals(other.getKnowledgeInfoCard())) return false; break; + case 22: + if (!getToolCall().equals(other.getToolCall())) return false; + break; case 0: default: } @@ -9495,6 +9563,10 @@ public int hashCode() { hash = (37 * hash) + KNOWLEDGE_INFO_CARD_FIELD_NUMBER; hash = (53 * hash) + getKnowledgeInfoCard().hashCode(); break; + case 22: + hash = (37 * hash) + TOOL_CALL_FIELD_NUMBER; + hash = (53 * hash) + getToolCall().hashCode(); + break; case 0: default: } @@ -9684,6 +9756,9 @@ public Builder clear() { if (knowledgeInfoCardBuilder_ != null) { knowledgeInfoCardBuilder_.clear(); } + if (toolCallBuilder_ != null) { + toolCallBuilder_.clear(); + } channel_ = ""; messageCase_ = 0; message_ = null; @@ -9724,7 +9799,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage buildPartial() { private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.channel_ = channel_; } } @@ -9762,6 +9837,9 @@ private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3beta1.ResponseM if (messageCase_ == 20 && knowledgeInfoCardBuilder_ != null) { result.message_ = knowledgeInfoCardBuilder_.build(); } + if (messageCase_ == 22 && toolCallBuilder_ != null) { + result.message_ = toolCallBuilder_.build(); + } } @java.lang.Override @@ -9812,7 +9890,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage return this; if (!other.getChannel().isEmpty()) { channel_ = other.channel_; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); } switch (other.getMessageCase()) { @@ -9866,6 +9944,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage mergeKnowledgeInfoCard(other.getKnowledgeInfoCard()); break; } + case TOOL_CALL: + { + mergeToolCall(other.getToolCall()); + break; + } case MESSAGE_NOT_SET: { break; @@ -9957,7 +10040,7 @@ public Builder mergeFrom( case 154: { channel_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 154 case 162: @@ -9967,6 +10050,12 @@ public Builder mergeFrom( messageCase_ = 20; break; } // case 162 + case 178: + { + input.readMessage(getToolCallFieldBuilder().getBuilder(), extensionRegistry); + messageCase_ = 22; + break; + } // case 178 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -12475,6 +12564,224 @@ public Builder clearKnowledgeInfoCard() { return knowledgeInfoCardBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ToolCall, + com.google.cloud.dialogflow.cx.v3beta1.ToolCall.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallOrBuilder> + toolCallBuilder_; + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; + * + * @return Whether the toolCall field is set. + */ + @java.lang.Override + public boolean hasToolCall() { + return messageCase_ == 22; + } + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; + * + * @return The toolCall. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCall getToolCall() { + if (toolCallBuilder_ == null) { + if (messageCase_ == 22) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolCall) message_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolCall.getDefaultInstance(); + } else { + if (messageCase_ == 22) { + return toolCallBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolCall.getDefaultInstance(); + } + } + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; + */ + public Builder setToolCall(com.google.cloud.dialogflow.cx.v3beta1.ToolCall value) { + if (toolCallBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + toolCallBuilder_.setMessage(value); + } + messageCase_ = 22; + return this; + } + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; + */ + public Builder setToolCall( + com.google.cloud.dialogflow.cx.v3beta1.ToolCall.Builder builderForValue) { + if (toolCallBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + toolCallBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 22; + return this; + } + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; + */ + public Builder mergeToolCall(com.google.cloud.dialogflow.cx.v3beta1.ToolCall value) { + if (toolCallBuilder_ == null) { + if (messageCase_ == 22 + && message_ != com.google.cloud.dialogflow.cx.v3beta1.ToolCall.getDefaultInstance()) { + message_ = + com.google.cloud.dialogflow.cx.v3beta1.ToolCall.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.ToolCall) message_) + .mergeFrom(value) + .buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 22) { + toolCallBuilder_.mergeFrom(value); + } else { + toolCallBuilder_.setMessage(value); + } + } + messageCase_ = 22; + return this; + } + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; + */ + public Builder clearToolCall() { + if (toolCallBuilder_ == null) { + if (messageCase_ == 22) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 22) { + messageCase_ = 0; + message_ = null; + } + toolCallBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; + */ + public com.google.cloud.dialogflow.cx.v3beta1.ToolCall.Builder getToolCallBuilder() { + return getToolCallFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallOrBuilder getToolCallOrBuilder() { + if ((messageCase_ == 22) && (toolCallBuilder_ != null)) { + return toolCallBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 22) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolCall) message_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolCall.getDefaultInstance(); + } + } + /** + * + * + *
+     * Returns the definition of a tool call that should be executed by the
+     * client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ToolCall, + com.google.cloud.dialogflow.cx.v3beta1.ToolCall.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallOrBuilder> + getToolCallFieldBuilder() { + if (toolCallBuilder_ == null) { + if (!(messageCase_ == 22)) { + message_ = com.google.cloud.dialogflow.cx.v3beta1.ToolCall.getDefaultInstance(); + } + toolCallBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ToolCall, + com.google.cloud.dialogflow.cx.v3beta1.ToolCall.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.ToolCall) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 22; + onChanged(); + return toolCallBuilder_; + } + private java.lang.Object channel_ = ""; /** * @@ -12546,7 +12853,7 @@ public Builder setChannel(java.lang.String value) { throw new NullPointerException(); } channel_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -12566,7 +12873,7 @@ public Builder setChannel(java.lang.String value) { */ public Builder clearChannel() { channel_ = getDefaultInstance().getChannel(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } @@ -12591,7 +12898,7 @@ public Builder setChannelBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); channel_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageOrBuilder.java index 549436a1e2a4..abe33a4137a9 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageOrBuilder.java @@ -473,6 +473,44 @@ public interface ResponseMessageOrBuilder com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCardOrBuilder getKnowledgeInfoCardOrBuilder(); + /** + * + * + *
+   * Returns the definition of a tool call that should be executed by the
+   * client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; + * + * @return Whether the toolCall field is set. + */ + boolean hasToolCall(); + /** + * + * + *
+   * Returns the definition of a tool call that should be executed by the
+   * client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; + * + * @return The toolCall. + */ + com.google.cloud.dialogflow.cx.v3beta1.ToolCall getToolCall(); + /** + * + * + *
+   * Returns the definition of a tool call that should be executed by the
+   * client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; + */ + com.google.cloud.dialogflow.cx.v3beta1.ToolCallOrBuilder getToolCallOrBuilder(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageProto.java index 600f8e7136da..20c4643c7be8 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ResponseMessageProto.java @@ -84,60 +84,64 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n9google/cloud/dialogflow/cx/v3beta1/res" + "ponse_message.proto\022\"google.cloud.dialog" + "flow.cx.v3beta1\032\037google/api/field_behavi" - + "or.proto\032\034google/protobuf/struct.proto\"\344" - + "\014\n\017ResponseMessage\022H\n\004text\030\001 \001(\01328.googl" - + "e.cloud.dialogflow.cx.v3beta1.ResponseMe" - + "ssage.TextH\000\022*\n\007payload\030\002 \001(\0132\027.google.p" - + "rotobuf.StructH\000\022g\n\024conversation_success" - + "\030\t \001(\0132G.google.cloud.dialogflow.cx.v3be" - + "ta1.ResponseMessage.ConversationSuccessH" - + "\000\022`\n\021output_audio_text\030\010 \001(\0132C.google.cl" - + "oud.dialogflow.cx.v3beta1.ResponseMessag" - + "e.OutputAudioTextH\000\022b\n\022live_agent_handof" - + "f\030\n \001(\0132D.google.cloud.dialogflow.cx.v3b" - + "eta1.ResponseMessage.LiveAgentHandoffH\000\022" - + "b\n\017end_interaction\030\013 \001(\0132B.google.cloud." - + "dialogflow.cx.v3beta1.ResponseMessage.En" - + "dInteractionB\003\340A\003H\000\022S\n\nplay_audio\030\014 \001(\0132" - + "=.google.cloud.dialogflow.cx.v3beta1.Res" - + "ponseMessage.PlayAudioH\000\022Z\n\013mixed_audio\030" - + "\r \001(\0132>.google.cloud.dialogflow.cx.v3bet" - + "a1.ResponseMessage.MixedAudioB\003\340A\003H\000\022l\n\027" - + "telephony_transfer_call\030\022 \001(\0132I.google.c" - + "loud.dialogflow.cx.v3beta1.ResponseMessa" - + "ge.TelephonyTransferCallH\000\022d\n\023knowledge_" - + "info_card\030\024 \001(\0132E.google.cloud.dialogflo" - + "w.cx.v3beta1.ResponseMessage.KnowledgeIn" - + "foCardH\000\022\017\n\007channel\030\023 \001(\t\032C\n\004Text\022\021\n\004tex" - + "t\030\001 \003(\tB\003\340A\002\022(\n\033allow_playback_interrupt" - + "ion\030\002 \001(\010B\003\340A\003\032=\n\020LiveAgentHandoff\022)\n\010me" - + "tadata\030\001 \001(\0132\027.google.protobuf.Struct\032@\n" - + "\023ConversationSuccess\022)\n\010metadata\030\001 \001(\0132\027" - + ".google.protobuf.Struct\032e\n\017OutputAudioTe" - + "xt\022\016\n\004text\030\001 \001(\tH\000\022\016\n\004ssml\030\002 \001(\tH\000\022(\n\033al" - + "low_playback_interruption\030\003 \001(\010B\003\340A\003B\010\n\006" - + "source\032\020\n\016EndInteraction\032M\n\tPlayAudio\022\026\n" - + "\taudio_uri\030\001 \001(\tB\003\340A\002\022(\n\033allow_playback_" - + "interruption\030\002 \001(\010B\003\340A\003\032\306\001\n\nMixedAudio\022X" - + "\n\010segments\030\001 \003(\0132F.google.cloud.dialogfl" - + "ow.cx.v3beta1.ResponseMessage.MixedAudio" - + ".Segment\032^\n\007Segment\022\017\n\005audio\030\001 \001(\014H\000\022\r\n\003" - + "uri\030\002 \001(\tH\000\022(\n\033allow_playback_interrupti" - + "on\030\003 \001(\010B\003\340A\003B\t\n\007content\032;\n\025TelephonyTra" - + "nsferCall\022\026\n\014phone_number\030\001 \001(\tH\000B\n\n\010end" - + "point\032\023\n\021KnowledgeInfoCardB\t\n\007messageB\316\001" - + "\n&com.google.cloud.dialogflow.cx.v3beta1" - + "B\024ResponseMessageProtoP\001Z6cloud.google.c" - + "om/go/dialogflow/cx/apiv3beta1/cxpb;cxpb" - + "\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3" - + "Beta1\352\002&Google::Cloud::Dialogflow::CX::V" - + "3beta1b\006proto3" + + "or.proto\0322google/cloud/dialogflow/cx/v3b" + + "eta1/tool_call.proto\032\034google/protobuf/st" + + "ruct.proto\"\247\r\n\017ResponseMessage\022H\n\004text\030\001" + + " \001(\01328.google.cloud.dialogflow.cx.v3beta" + + "1.ResponseMessage.TextH\000\022*\n\007payload\030\002 \001(" + + "\0132\027.google.protobuf.StructH\000\022g\n\024conversa" + + "tion_success\030\t \001(\0132G.google.cloud.dialog" + + "flow.cx.v3beta1.ResponseMessage.Conversa" + + "tionSuccessH\000\022`\n\021output_audio_text\030\010 \001(\013" + + "2C.google.cloud.dialogflow.cx.v3beta1.Re" + + "sponseMessage.OutputAudioTextH\000\022b\n\022live_" + + "agent_handoff\030\n \001(\0132D.google.cloud.dialo" + + "gflow.cx.v3beta1.ResponseMessage.LiveAge" + + "ntHandoffH\000\022b\n\017end_interaction\030\013 \001(\0132B.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Respon" + + "seMessage.EndInteractionB\003\340A\003H\000\022S\n\nplay_" + + "audio\030\014 \001(\0132=.google.cloud.dialogflow.cx" + + ".v3beta1.ResponseMessage.PlayAudioH\000\022Z\n\013" + + "mixed_audio\030\r \001(\0132>.google.cloud.dialogf" + + "low.cx.v3beta1.ResponseMessage.MixedAudi" + + "oB\003\340A\003H\000\022l\n\027telephony_transfer_call\030\022 \001(" + + "\0132I.google.cloud.dialogflow.cx.v3beta1.R" + + "esponseMessage.TelephonyTransferCallH\000\022d" + + "\n\023knowledge_info_card\030\024 \001(\0132E.google.clo" + + "ud.dialogflow.cx.v3beta1.ResponseMessage" + + ".KnowledgeInfoCardH\000\022A\n\ttool_call\030\026 \001(\0132" + + ",.google.cloud.dialogflow.cx.v3beta1.Too" + + "lCallH\000\022\017\n\007channel\030\023 \001(\t\032C\n\004Text\022\021\n\004text" + + "\030\001 \003(\tB\003\340A\002\022(\n\033allow_playback_interrupti" + + "on\030\002 \001(\010B\003\340A\003\032=\n\020LiveAgentHandoff\022)\n\010met" + + "adata\030\001 \001(\0132\027.google.protobuf.Struct\032@\n\023" + + "ConversationSuccess\022)\n\010metadata\030\001 \001(\0132\027." + + "google.protobuf.Struct\032e\n\017OutputAudioTex" + + "t\022\016\n\004text\030\001 \001(\tH\000\022\016\n\004ssml\030\002 \001(\tH\000\022(\n\033all" + + "ow_playback_interruption\030\003 \001(\010B\003\340A\003B\010\n\006s" + + "ource\032\020\n\016EndInteraction\032M\n\tPlayAudio\022\026\n\t" + + "audio_uri\030\001 \001(\tB\003\340A\002\022(\n\033allow_playback_i" + + "nterruption\030\002 \001(\010B\003\340A\003\032\306\001\n\nMixedAudio\022X\n" + + "\010segments\030\001 \003(\0132F.google.cloud.dialogflo" + + "w.cx.v3beta1.ResponseMessage.MixedAudio." + + "Segment\032^\n\007Segment\022\017\n\005audio\030\001 \001(\014H\000\022\r\n\003u" + + "ri\030\002 \001(\tH\000\022(\n\033allow_playback_interruptio" + + "n\030\003 \001(\010B\003\340A\003B\t\n\007content\032;\n\025TelephonyTran" + + "sferCall\022\026\n\014phone_number\030\001 \001(\tH\000B\n\n\010endp" + + "oint\032\023\n\021KnowledgeInfoCardB\t\n\007messageB\316\001\n" + + "&com.google.cloud.dialogflow.cx.v3beta1B" + + "\024ResponseMessageProtoP\001Z6cloud.google.co" + + "m/go/dialogflow/cx/apiv3beta1/cxpb;cxpb\370" + + "\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3B" + + "eta1\352\002&Google::Cloud::Dialogflow::CX::V3" + + "beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), }); internal_static_google_cloud_dialogflow_cx_v3beta1_ResponseMessage_descriptor = @@ -156,6 +160,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MixedAudio", "TelephonyTransferCall", "KnowledgeInfoCard", + "ToolCall", "Channel", "Message", }); @@ -261,6 +266,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettings.java index 537a3d9cac30..5511dd64b845 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettings.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettings.java @@ -746,6 +746,20 @@ public interface AudioExportSettingsOrBuilder */ com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.AudioExportSettings.AudioFormat getAudioFormat(); + + /** + * + * + *
+     * Whether to store TTS audio. By default, TTS audio from the virtual agent
+     * is not exported.
+     * 
+ * + * bool store_tts_audio = 6; + * + * @return The storeTtsAudio. + */ + boolean getStoreTtsAudio(); } /** * @@ -1155,6 +1169,25 @@ public int getAudioFormatValue() { : result; } + public static final int STORE_TTS_AUDIO_FIELD_NUMBER = 6; + private boolean storeTtsAudio_ = false; + /** + * + * + *
+     * Whether to store TTS audio. By default, TTS audio from the virtual agent
+     * is not exported.
+     * 
+ * + * bool store_tts_audio = 6; + * + * @return The storeTtsAudio. + */ + @java.lang.Override + public boolean getStoreTtsAudio() { + return storeTtsAudio_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1184,6 +1217,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(4, audioFormat_); } + if (storeTtsAudio_ != false) { + output.writeBool(6, storeTtsAudio_); + } getUnknownFields().writeTo(output); } @@ -1208,6 +1244,9 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, audioFormat_); } + if (storeTtsAudio_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, storeTtsAudio_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1229,6 +1268,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAudioExportPattern().equals(other.getAudioExportPattern())) return false; if (getEnableAudioRedaction() != other.getEnableAudioRedaction()) return false; if (audioFormat_ != other.audioFormat_) return false; + if (getStoreTtsAudio() != other.getStoreTtsAudio()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1248,6 +1288,8 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableAudioRedaction()); hash = (37 * hash) + AUDIO_FORMAT_FIELD_NUMBER; hash = (53 * hash) + audioFormat_; + hash = (37 * hash) + STORE_TTS_AUDIO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getStoreTtsAudio()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1402,6 +1444,7 @@ public Builder clear() { audioExportPattern_ = ""; enableAudioRedaction_ = false; audioFormat_ = 0; + storeTtsAudio_ = false; return this; } @@ -1455,6 +1498,9 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000008) != 0)) { result.audioFormat_ = audioFormat_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.storeTtsAudio_ = storeTtsAudio_; + } } @java.lang.Override @@ -1526,6 +1572,9 @@ public Builder mergeFrom( if (other.audioFormat_ != 0) { setAudioFormatValue(other.getAudioFormatValue()); } + if (other.getStoreTtsAudio() != false) { + setStoreTtsAudio(other.getStoreTtsAudio()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1576,6 +1625,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 32 + case 48: + { + storeTtsAudio_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 48 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1999,6 +2054,62 @@ public Builder clearAudioFormat() { return this; } + private boolean storeTtsAudio_; + /** + * + * + *
+       * Whether to store TTS audio. By default, TTS audio from the virtual agent
+       * is not exported.
+       * 
+ * + * bool store_tts_audio = 6; + * + * @return The storeTtsAudio. + */ + @java.lang.Override + public boolean getStoreTtsAudio() { + return storeTtsAudio_; + } + /** + * + * + *
+       * Whether to store TTS audio. By default, TTS audio from the virtual agent
+       * is not exported.
+       * 
+ * + * bool store_tts_audio = 6; + * + * @param value The storeTtsAudio to set. + * @return This builder for chaining. + */ + public Builder setStoreTtsAudio(boolean value) { + + storeTtsAudio_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether to store TTS audio. By default, TTS audio from the virtual agent
+       * is not exported.
+       * 
+ * + * bool store_tts_audio = 6; + * + * @return This builder for chaining. + */ + public Builder clearStoreTtsAudio() { + bitField0_ = (bitField0_ & ~0x00000010); + storeTtsAudio_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsProto.java index eb1b4e844780..c0ea012e4370 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsProto.java @@ -100,7 +100,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".cloud.dialogflow.cx.v3beta1.SecuritySet" + "tingsB\003\340A\002\"a\n\035DeleteSecuritySettingsRequ" + "est\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*dialogflow.go" - + "ogleapis.com/SecuritySettings\"\361\014\n\020Securi" + + "ogleapis.com/SecuritySettings\"\212\r\n\020Securi" + "tySettings\022\014\n\004name\030\001 \001(\t\022\031\n\014display_name" + "\030\002 \001(\tB\003\340A\002\022b\n\022redaction_strategy\030\003 \001(\0162" + "F.google.cloud.dialogflow.cx.v3beta1.Sec" @@ -121,77 +121,78 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "a1.SecuritySettings.AudioExportSettings\022" + "m\n\030insights_export_settings\030\r \001(\0132K.goog" + "le.cloud.dialogflow.cx.v3beta1.SecurityS" - + "ettings.InsightsExportSettings\032\235\002\n\023Audio" + + "ettings.InsightsExportSettings\032\266\002\n\023Audio" + "ExportSettings\022\022\n\ngcs_bucket\030\001 \001(\t\022\034\n\024au" + "dio_export_pattern\030\002 \001(\t\022\036\n\026enable_audio" + "_redaction\030\003 \001(\010\022j\n\014audio_format\030\004 \001(\0162T" + ".google.cloud.dialogflow.cx.v3beta1.Secu" + "ritySettings.AudioExportSettings.AudioFo" - + "rmat\"H\n\013AudioFormat\022\034\n\030AUDIO_FORMAT_UNSP" - + "ECIFIED\020\000\022\t\n\005MULAW\020\001\022\007\n\003MP3\020\002\022\007\n\003OGG\020\003\0328" - + "\n\026InsightsExportSettings\022\036\n\026enable_insig" - + "hts_export\030\001 \001(\010\"P\n\021RedactionStrategy\022\"\n" - + "\036REDACTION_STRATEGY_UNSPECIFIED\020\000\022\027\n\023RED" - + "ACT_WITH_SERVICE\020\001\"J\n\016RedactionScope\022\037\n\033" - + "REDACTION_SCOPE_UNSPECIFIED\020\000\022\027\n\023REDACT_" - + "DISK_STORAGE\020\002\"V\n\021RetentionStrategy\022\"\n\036R" - + "ETENTION_STRATEGY_UNSPECIFIED\020\000\022\035\n\031REMOV" - + "E_AFTER_CONVERSATION\020\001\"H\n\rPurgeDataType\022" - + "\037\n\033PURGE_DATA_TYPE_UNSPECIFIED\020\000\022\026\n\022DIAL" - + "OGFLOW_HISTORY\020\001:}\352Az\n*dialogflow.google" - + "apis.com/SecuritySettings\022Lprojects/{pro" - + "ject}/locations/{location}/securitySetti" - + "ngs/{security_settings}B\020\n\016data_retentio" - + "n2\265\n\n\027SecuritySettingsService\022\202\002\n\026Create" - + "SecuritySettings\022A.google.cloud.dialogfl" - + "ow.cx.v3beta1.CreateSecuritySettingsRequ" + + "rmat\022\027\n\017store_tts_audio\030\006 \001(\010\"H\n\013AudioFo" + + "rmat\022\034\n\030AUDIO_FORMAT_UNSPECIFIED\020\000\022\t\n\005MU" + + "LAW\020\001\022\007\n\003MP3\020\002\022\007\n\003OGG\020\003\0328\n\026InsightsExpor" + + "tSettings\022\036\n\026enable_insights_export\030\001 \001(" + + "\010\"P\n\021RedactionStrategy\022\"\n\036REDACTION_STRA" + + "TEGY_UNSPECIFIED\020\000\022\027\n\023REDACT_WITH_SERVIC" + + "E\020\001\"J\n\016RedactionScope\022\037\n\033REDACTION_SCOPE" + + "_UNSPECIFIED\020\000\022\027\n\023REDACT_DISK_STORAGE\020\002\"" + + "V\n\021RetentionStrategy\022\"\n\036RETENTION_STRATE" + + "GY_UNSPECIFIED\020\000\022\035\n\031REMOVE_AFTER_CONVERS" + + "ATION\020\001\"H\n\rPurgeDataType\022\037\n\033PURGE_DATA_T" + + "YPE_UNSPECIFIED\020\000\022\026\n\022DIALOGFLOW_HISTORY\020" + + "\001:}\352Az\n*dialogflow.googleapis.com/Securi" + + "tySettings\022Lprojects/{project}/locations" + + "/{location}/securitySettings/{security_s" + + "ettings}B\020\n\016data_retention2\265\n\n\027SecurityS" + + "ettingsService\022\202\002\n\026CreateSecuritySetting" + + "s\022A.google.cloud.dialogflow.cx.v3beta1.C" + + "reateSecuritySettingsRequest\0324.google.cl" + + "oud.dialogflow.cx.v3beta1.SecuritySettin" + + "gs\"o\332A\030parent,security_settings\202\323\344\223\002N\"9/" + + "v3beta1/{parent=projects/*/locations/*}/" + + "securitySettings:\021security_settings\022\325\001\n\023" + + "GetSecuritySettings\022>.google.cloud.dialo" + + "gflow.cx.v3beta1.GetSecuritySettingsRequ" + "est\0324.google.cloud.dialogflow.cx.v3beta1" - + ".SecuritySettings\"o\332A\030parent,security_se" - + "ttings\202\323\344\223\002N\"9/v3beta1/{parent=projects/" - + "*/locations/*}/securitySettings:\021securit" - + "y_settings\022\325\001\n\023GetSecuritySettings\022>.goo" - + "gle.cloud.dialogflow.cx.v3beta1.GetSecur" - + "itySettingsRequest\0324.google.cloud.dialog" - + "flow.cx.v3beta1.SecuritySettings\"H\332A\004nam" - + "e\202\323\344\223\002;\0229/v3beta1/{name=projects/*/locat" - + "ions/*/securitySettings/*}\022\232\002\n\026UpdateSec" - + "uritySettings\022A.google.cloud.dialogflow." - + "cx.v3beta1.UpdateSecuritySettingsRequest" - + "\0324.google.cloud.dialogflow.cx.v3beta1.Se" - + "curitySettings\"\206\001\332A\035security_settings,up" - + "date_mask\202\323\344\223\002`2K/v3beta1/{security_sett" - + "ings.name=projects/*/locations/*/securit" - + "ySettings/*}:\021security_settings\022\345\001\n\024List" - + "SecuritySettings\022?.google.cloud.dialogfl" - + "ow.cx.v3beta1.ListSecuritySettingsReques" - + "t\032@.google.cloud.dialogflow.cx.v3beta1.L" - + "istSecuritySettingsResponse\"J\332A\006parent\202\323" - + "\344\223\002;\0229/v3beta1/{parent=projects/*/locati" - + "ons/*}/securitySettings\022\275\001\n\026DeleteSecuri" - + "tySettings\022A.google.cloud.dialogflow.cx." - + "v3beta1.DeleteSecuritySettingsRequest\032\026." - + "google.protobuf.Empty\"H\332A\004name\202\323\344\223\002;*9/v" - + "3beta1/{name=projects/*/locations/*/secu" - + "ritySettings/*}\032x\312A\031dialogflow.googleapi" - + "s.com\322AYhttps://www.googleapis.com/auth/" - + "cloud-platform,https://www.googleapis.co" - + "m/auth/dialogflowB\366\004\n&com.google.cloud.d" - + "ialogflow.cx.v3beta1B\025SecuritySettingsPr" - + "otoP\001Z6cloud.google.com/go/dialogflow/cx" - + "/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.C" - + "loud.Dialogflow.Cx.V3Beta1\352\002&Google::Clo" - + "ud::Dialogflow::CX::V3beta1\352A\310\001\n\"dlp.goo" - + "gleapis.com/InspectTemplate\022Uorganizatio" - + "ns/{organization}/locations/{location}/i" - + "nspectTemplates/{inspect_template}\022Kproj" - + "ects/{project}/locations/{location}/insp" - + "ectTemplates/{inspect_template}\352A\327\001\n%dlp" - + ".googleapis.com/DeidentifyTemplate\022[orga" - + "nizations/{organization}/locations/{loca" - + "tion}/deidentifyTemplates/{deidentify_te" - + "mplate}\022Qprojects/{project}/locations/{l" - + "ocation}/deidentifyTemplates/{deidentify" - + "_template}b\006proto3" + + ".SecuritySettings\"H\332A\004name\202\323\344\223\002;\0229/v3bet" + + "a1/{name=projects/*/locations/*/security" + + "Settings/*}\022\232\002\n\026UpdateSecuritySettings\022A" + + ".google.cloud.dialogflow.cx.v3beta1.Upda" + + "teSecuritySettingsRequest\0324.google.cloud" + + ".dialogflow.cx.v3beta1.SecuritySettings\"" + + "\206\001\332A\035security_settings,update_mask\202\323\344\223\002`" + + "2K/v3beta1/{security_settings.name=proje" + + "cts/*/locations/*/securitySettings/*}:\021s" + + "ecurity_settings\022\345\001\n\024ListSecuritySetting" + + "s\022?.google.cloud.dialogflow.cx.v3beta1.L" + + "istSecuritySettingsRequest\032@.google.clou" + + "d.dialogflow.cx.v3beta1.ListSecuritySett" + + "ingsResponse\"J\332A\006parent\202\323\344\223\002;\0229/v3beta1/" + + "{parent=projects/*/locations/*}/security" + + "Settings\022\275\001\n\026DeleteSecuritySettings\022A.go" + + "ogle.cloud.dialogflow.cx.v3beta1.DeleteS" + + "ecuritySettingsRequest\032\026.google.protobuf" + + ".Empty\"H\332A\004name\202\323\344\223\002;*9/v3beta1/{name=pr" + + "ojects/*/locations/*/securitySettings/*}" + + "\032x\312A\031dialogflow.googleapis.com\322AYhttps:/" + + "/www.googleapis.com/auth/cloud-platform," + + "https://www.googleapis.com/auth/dialogfl" + + "owB\366\004\n&com.google.cloud.dialogflow.cx.v3" + + "beta1B\025SecuritySettingsProtoP\001Z6cloud.go" + + "ogle.com/go/dialogflow/cx/apiv3beta1/cxp" + + "b;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow" + + ".Cx.V3Beta1\352\002&Google::Cloud::Dialogflow:" + + ":CX::V3beta1\352A\310\001\n\"dlp.googleapis.com/Ins" + + "pectTemplate\022Uorganizations/{organizatio" + + "n}/locations/{location}/inspectTemplates" + + "/{inspect_template}\022Kprojects/{project}/" + + "locations/{location}/inspectTemplates/{i" + + "nspect_template}\352A\327\001\n%dlp.googleapis.com" + + "/DeidentifyTemplate\022[organizations/{orga" + + "nization}/locations/{location}/deidentif" + + "yTemplates/{deidentify_template}\022Qprojec" + + "ts/{project}/locations/{location}/deiden" + + "tifyTemplates/{deidentify_template}b\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -279,7 +280,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_SecuritySettings_AudioExportSettings_descriptor, new java.lang.String[] { - "GcsBucket", "AudioExportPattern", "EnableAudioRedaction", "AudioFormat", + "GcsBucket", + "AudioExportPattern", + "EnableAudioRedaction", + "AudioFormat", + "StoreTtsAudio", }); internal_static_google_cloud_dialogflow_cx_v3beta1_SecuritySettings_InsightsExportSettings_descriptor = internal_static_google_cloud_dialogflow_cx_v3beta1_SecuritySettings_descriptor diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java index 8d708e9387db..805c9e896cd3 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java @@ -362,106 +362,107 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".v3beta1.InputAudioConfigB\003\340A\002\022\r\n\005audio\030" + "\002 \001(\014\"\033\n\nEventInput\022\r\n\005event\030\001 \001(\t\"1\n\tDt" + "mfInput\022\016\n\006digits\030\001 \001(\t\022\024\n\014finish_digit\030" - + "\002 \001(\t\"\373\002\n\005Match\022:\n\006intent\030\001 \001(\0132*.google" + + "\002 \001(\t\"\211\003\n\005Match\022:\n\006intent\030\001 \001(\0132*.google" + ".cloud.dialogflow.cx.v3beta1.Intent\022\r\n\005e" + "vent\030\006 \001(\t\022+\n\nparameters\030\002 \001(\0132\027.google." + "protobuf.Struct\022\026\n\016resolved_input\030\003 \001(\t\022" + "G\n\nmatch_type\030\004 \001(\01623.google.cloud.dialo" + "gflow.cx.v3beta1.Match.MatchType\022\022\n\nconf" - + "idence\030\005 \001(\002\"\204\001\n\tMatchType\022\032\n\026MATCH_TYPE" + + "idence\030\005 \001(\002\"\222\001\n\tMatchType\022\032\n\026MATCH_TYPE" + "_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001\022\021\n\rDIRECT_INT" + "ENT\020\002\022\025\n\021PARAMETER_FILLING\020\003\022\014\n\010NO_MATCH" - + "\020\004\022\014\n\010NO_INPUT\020\005\022\t\n\005EVENT\020\006\"\210\002\n\022MatchInt" - + "entRequest\022:\n\007session\030\001 \001(\tB)\340A\002\372A#\n!dia" - + "logflow.googleapis.com/Session\022I\n\014query_" - + "params\030\002 \001(\01323.google.cloud.dialogflow.c" - + "x.v3beta1.QueryParameters\022H\n\013query_input" - + "\030\003 \001(\0132..google.cloud.dialogflow.cx.v3be" - + "ta1.QueryInputB\003\340A\002\022!\n\031persist_parameter" - + "_changes\030\005 \001(\010\"\232\002\n\023MatchIntentResponse\022\016" - + "\n\004text\030\001 \001(\tH\000\022?\n\016trigger_intent\030\002 \001(\tB%" - + "\372A\"\n dialogflow.googleapis.com/IntentH\000\022" - + "\024\n\ntranscript\030\003 \001(\tH\000\022\027\n\rtrigger_event\030\006" - + " \001(\tH\000\022:\n\007matches\030\004 \003(\0132).google.cloud.d" - + "ialogflow.cx.v3beta1.Match\022>\n\014current_pa" - + "ge\030\005 \001(\0132(.google.cloud.dialogflow.cx.v3" - + "beta1.PageB\007\n\005query\"\372\001\n\024FulfillIntentReq" - + "uest\022T\n\024match_intent_request\030\001 \001(\01326.goo" - + "gle.cloud.dialogflow.cx.v3beta1.MatchInt" - + "entRequest\0228\n\005match\030\002 \001(\0132).google.cloud" - + ".dialogflow.cx.v3beta1.Match\022R\n\023output_a" - + "udio_config\030\003 \001(\01325.google.cloud.dialogf" - + "low.cx.v3beta1.OutputAudioConfig\"\335\001\n\025Ful" - + "fillIntentResponse\022\023\n\013response_id\030\001 \001(\t\022" - + "E\n\014query_result\030\002 \001(\0132/.google.cloud.dia" - + "logflow.cx.v3beta1.QueryResult\022\024\n\014output" - + "_audio\030\003 \001(\014\022R\n\023output_audio_config\030\004 \001(" - + "\01325.google.cloud.dialogflow.cx.v3beta1.O" - + "utputAudioConfig\";\n\027SentimentAnalysisRes" - + "ult\022\r\n\005score\030\001 \001(\002\022\021\n\tmagnitude\030\002 \001(\0022\343\016" - + "\n\010Sessions\022\272\002\n\014DetectIntent\0227.google.clo" - + "ud.dialogflow.cx.v3beta1.DetectIntentReq" - + "uest\0328.google.cloud.dialogflow.cx.v3beta" - + "1.DetectIntentResponse\"\266\001\202\323\344\223\002\257\001\"J/v3bet" - + "a1/{session=projects/*/locations/*/agent" - + "s/*/sessions/*}:detectIntent:\001*Z^\"Y/v3be" - + "ta1/{session=projects/*/locations/*/agen" - + "ts/*/environments/*/sessions/*}:detectIn" - + "tent:\001*\022\351\002\n\033ServerStreamingDetectIntent\022" - + "7.google.cloud.dialogflow.cx.v3beta1.Det" - + "ectIntentRequest\0328.google.cloud.dialogfl" - + "ow.cx.v3beta1.DetectIntentResponse\"\324\001\202\323\344" - + "\223\002\315\001\"Y/v3beta1/{session=projects/*/locat" - + "ions/*/agents/*/sessions/*}:serverStream" - + "ingDetectIntent:\001*Zm\"h/v3beta1/{session=" - + "projects/*/locations/*/agents/*/environm" - + "ents/*/sessions/*}:serverStreamingDetect" - + "Intent:\001*0\001\022\242\001\n\025StreamingDetectIntent\022@." + + "\020\004\022\014\n\010NO_INPUT\020\005\022\t\n\005EVENT\020\006\022\014\n\010PLAYBOOK\020" + + "\t\"\210\002\n\022MatchIntentRequest\022:\n\007session\030\001 \001(" + + "\tB)\340A\002\372A#\n!dialogflow.googleapis.com/Ses" + + "sion\022I\n\014query_params\030\002 \001(\01323.google.clou" + + "d.dialogflow.cx.v3beta1.QueryParameters\022" + + "H\n\013query_input\030\003 \001(\0132..google.cloud.dial" + + "ogflow.cx.v3beta1.QueryInputB\003\340A\002\022!\n\031per" + + "sist_parameter_changes\030\005 \001(\010\"\232\002\n\023MatchIn" + + "tentResponse\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_" + + "intent\030\002 \001(\tB%\372A\"\n dialogflow.googleapis" + + ".com/IntentH\000\022\024\n\ntranscript\030\003 \001(\tH\000\022\027\n\rt" + + "rigger_event\030\006 \001(\tH\000\022:\n\007matches\030\004 \003(\0132)." + + "google.cloud.dialogflow.cx.v3beta1.Match" + + "\022>\n\014current_page\030\005 \001(\0132(.google.cloud.di" + + "alogflow.cx.v3beta1.PageB\007\n\005query\"\372\001\n\024Fu" + + "lfillIntentRequest\022T\n\024match_intent_reque" + + "st\030\001 \001(\01326.google.cloud.dialogflow.cx.v3" + + "beta1.MatchIntentRequest\0228\n\005match\030\002 \001(\0132" + + ").google.cloud.dialogflow.cx.v3beta1.Mat" + + "ch\022R\n\023output_audio_config\030\003 \001(\01325.google" + + ".cloud.dialogflow.cx.v3beta1.OutputAudio" + + "Config\"\335\001\n\025FulfillIntentResponse\022\023\n\013resp" + + "onse_id\030\001 \001(\t\022E\n\014query_result\030\002 \001(\0132/.go" + + "ogle.cloud.dialogflow.cx.v3beta1.QueryRe" + + "sult\022\024\n\014output_audio\030\003 \001(\014\022R\n\023output_aud" + + "io_config\030\004 \001(\01325.google.cloud.dialogflo" + + "w.cx.v3beta1.OutputAudioConfig\";\n\027Sentim" + + "entAnalysisResult\022\r\n\005score\030\001 \001(\002\022\021\n\tmagn" + + "itude\030\002 \001(\0022\343\016\n\010Sessions\022\272\002\n\014DetectInten" + + "t\0227.google.cloud.dialogflow.cx.v3beta1.D" + + "etectIntentRequest\0328.google.cloud.dialog" + + "flow.cx.v3beta1.DetectIntentResponse\"\266\001\202" + + "\323\344\223\002\257\001\"J/v3beta1/{session=projects/*/loc" + + "ations/*/agents/*/sessions/*}:detectInte" + + "nt:\001*Z^\"Y/v3beta1/{session=projects/*/lo" + + "cations/*/agents/*/environments/*/sessio" + + "ns/*}:detectIntent:\001*\022\351\002\n\033ServerStreamin" + + "gDetectIntent\0227.google.cloud.dialogflow." + + "cx.v3beta1.DetectIntentRequest\0328.google." + + "cloud.dialogflow.cx.v3beta1.DetectIntent" + + "Response\"\324\001\202\323\344\223\002\315\001\"Y/v3beta1/{session=pr" + + "ojects/*/locations/*/agents/*/sessions/*" + + "}:serverStreamingDetectIntent:\001*Zm\"h/v3b" + + "eta1/{session=projects/*/locations/*/age" + + "nts/*/environments/*/sessions/*}:serverS" + + "treamingDetectIntent:\001*0\001\022\242\001\n\025StreamingD" + + "etectIntent\022@.google.cloud.dialogflow.cx" + + ".v3beta1.StreamingDetectIntentRequest\032A." + "google.cloud.dialogflow.cx.v3beta1.Strea" - + "mingDetectIntentRequest\032A.google.cloud.d" - + "ialogflow.cx.v3beta1.StreamingDetectInte" - + "ntResponse\"\000(\0010\001\022\265\002\n\013MatchIntent\0226.googl" - + "e.cloud.dialogflow.cx.v3beta1.MatchInten" - + "tRequest\0327.google.cloud.dialogflow.cx.v3" - + "beta1.MatchIntentResponse\"\264\001\202\323\344\223\002\255\001\"I/v3" - + "beta1/{session=projects/*/locations/*/ag" - + "ents/*/sessions/*}:matchIntent:\001*Z]\"X/v3" - + "beta1/{session=projects/*/locations/*/ag" - + "ents/*/environments/*/sessions/*}:matchI" - + "ntent:\001*\022\351\002\n\rFulfillIntent\0228.google.clou" - + "d.dialogflow.cx.v3beta1.FulfillIntentReq" - + "uest\0329.google.cloud.dialogflow.cx.v3beta" - + "1.FulfillIntentResponse\"\342\001\202\323\344\223\002\333\001\"`/v3be" - + "ta1/{match_intent_request.session=projec" - + "ts/*/locations/*/agents/*/sessions/*}:fu" - + "lfillIntent:\001*Zt\"o/v3beta1/{match_intent" - + "_request.session=projects/*/locations/*/" - + "agents/*/environments/*/sessions/*}:fulf" - + "illIntent:\001*\022\352\001\n\024SubmitAnswerFeedback\022?." - + "google.cloud.dialogflow.cx.v3beta1.Submi" - + "tAnswerFeedbackRequest\0322.google.cloud.di" - + "alogflow.cx.v3beta1.AnswerFeedback\"]\202\323\344\223" - + "\002W\"R/v3beta1/{session=projects/*/locatio" - + "ns/*/agents/*/sessions/*}:submitAnswerFe" - + "edback:\001*\032x\312A\031dialogflow.googleapis.com\322" - + "AYhttps://www.googleapis.com/auth/cloud-" - + "platform,https://www.googleapis.com/auth" - + "/dialogflowB\347\004\n&com.google.cloud.dialogf" - + "low.cx.v3beta1B\014SessionProtoP\001Z6cloud.go" - + "ogle.com/go/dialogflow/cx/apiv3beta1/cxp" - + "b;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow" - + ".Cx.V3Beta1\352\002&Google::Cloud::Dialogflow:" - + ":CX::V3beta1\352A\324\001\n!dialogflow.googleapis." - + "com/Session\022Iprojects/{project}/location" - + "s/{location}/agents/{agent}/sessions/{se" - + "ssion}\022dprojects/{project}/locations/{lo" - + "cation}/agents/{agent}/environments/{env" - + "ironment}/sessions/{session}\352A\305\001\n(discov" - + "eryengine.googleapis.com/DataStore\022?proj" - + "ects/{project}/locations/{location}/data" - + "Stores/{data_store}\022Xprojects/{project}/" - + "locations/{location}/collections/{collec" - + "tion}/dataStores/{data_store}b\006proto3" + + "mingDetectIntentResponse\"\000(\0010\001\022\265\002\n\013Match" + + "Intent\0226.google.cloud.dialogflow.cx.v3be" + + "ta1.MatchIntentRequest\0327.google.cloud.di" + + "alogflow.cx.v3beta1.MatchIntentResponse\"" + + "\264\001\202\323\344\223\002\255\001\"I/v3beta1/{session=projects/*/" + + "locations/*/agents/*/sessions/*}:matchIn" + + "tent:\001*Z]\"X/v3beta1/{session=projects/*/" + + "locations/*/agents/*/environments/*/sess" + + "ions/*}:matchIntent:\001*\022\351\002\n\rFulfillIntent" + + "\0228.google.cloud.dialogflow.cx.v3beta1.Fu" + + "lfillIntentRequest\0329.google.cloud.dialog" + + "flow.cx.v3beta1.FulfillIntentResponse\"\342\001" + + "\202\323\344\223\002\333\001\"`/v3beta1/{match_intent_request." + + "session=projects/*/locations/*/agents/*/" + + "sessions/*}:fulfillIntent:\001*Zt\"o/v3beta1" + + "/{match_intent_request.session=projects/" + + "*/locations/*/agents/*/environments/*/se" + + "ssions/*}:fulfillIntent:\001*\022\352\001\n\024SubmitAns" + + "werFeedback\022?.google.cloud.dialogflow.cx" + + ".v3beta1.SubmitAnswerFeedbackRequest\0322.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Answer" + + "Feedback\"]\202\323\344\223\002W\"R/v3beta1/{session=proj" + + "ects/*/locations/*/agents/*/sessions/*}:" + + "submitAnswerFeedback:\001*\032x\312A\031dialogflow.g" + + "oogleapis.com\322AYhttps://www.googleapis.c" + + "om/auth/cloud-platform,https://www.googl" + + "eapis.com/auth/dialogflowB\347\004\n&com.google" + + ".cloud.dialogflow.cx.v3beta1B\014SessionPro" + + "toP\001Z6cloud.google.com/go/dialogflow/cx/" + + "apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cl" + + "oud.Dialogflow.Cx.V3Beta1\352\002&Google::Clou" + + "d::Dialogflow::CX::V3beta1\352A\324\001\n!dialogfl" + + "ow.googleapis.com/Session\022Iprojects/{pro" + + "ject}/locations/{location}/agents/{agent" + + "}/sessions/{session}\022dprojects/{project}" + + "/locations/{location}/agents/{agent}/env" + + "ironments/{environment}/sessions/{sessio" + + "n}\352A\305\001\n(discoveryengine.googleapis.com/D" + + "ataStore\022?projects/{project}/locations/{" + + "location}/dataStores/{data_store}\022Xproje" + + "cts/{project}/locations/{location}/colle" + + "ctions/{collection}/dataStores/{data_sto" + + "re}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Tool.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Tool.java index ffc50988bc09..9df714297482 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Tool.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Tool.java @@ -45,8 +45,6 @@ private Tool() { name_ = ""; displayName_ = ""; description_ = ""; - actions_ = com.google.protobuf.LazyStringArrayList.emptyList(); - schemas_ = com.google.protobuf.LazyStringArrayList.emptyList(); toolType_ = 0; } @@ -12435,158 +12433,6 @@ public com.google.protobuf.ByteString getDescriptionBytes() { } } - public static final int ACTIONS_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList actions_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * - * - *
-   * The list of derived action names for the tool.
-   * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @return A list containing the actions. - */ - @java.lang.Deprecated - public com.google.protobuf.ProtocolStringList getActionsList() { - return actions_; - } - /** - * - * - *
-   * The list of derived action names for the tool.
-   * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @return The count of actions. - */ - @java.lang.Deprecated - public int getActionsCount() { - return actions_.size(); - } - /** - * - * - *
-   * The list of derived action names for the tool.
-   * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @param index The index of the element to return. - * @return The actions at the given index. - */ - @java.lang.Deprecated - public java.lang.String getActions(int index) { - return actions_.get(index); - } - /** - * - * - *
-   * The list of derived action names for the tool.
-   * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @param index The index of the value to return. - * @return The bytes of the actions at the given index. - */ - @java.lang.Deprecated - public com.google.protobuf.ByteString getActionsBytes(int index) { - return actions_.getByteString(index); - } - - public static final int SCHEMAS_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList schemas_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * - * - *
-   * The list of derived type schemas for the tool.
-   * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @return A list containing the schemas. - */ - @java.lang.Deprecated - public com.google.protobuf.ProtocolStringList getSchemasList() { - return schemas_; - } - /** - * - * - *
-   * The list of derived type schemas for the tool.
-   * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @return The count of schemas. - */ - @java.lang.Deprecated - public int getSchemasCount() { - return schemas_.size(); - } - /** - * - * - *
-   * The list of derived type schemas for the tool.
-   * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @param index The index of the element to return. - * @return The schemas at the given index. - */ - @java.lang.Deprecated - public java.lang.String getSchemas(int index) { - return schemas_.get(index); - } - /** - * - * - *
-   * The list of derived type schemas for the tool.
-   * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @param index The index of the value to return. - * @return The bytes of the schemas at the given index. - */ - @java.lang.Deprecated - public com.google.protobuf.ByteString getSchemasBytes(int index) { - return schemas_.getByteString(index); - } - public static final int OPEN_API_SPEC_FIELD_NUMBER = 4; /** * @@ -12863,12 +12709,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 4, (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_); } - for (int i = 0; i < actions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, actions_.getRaw(i)); - } - for (int i = 0; i < schemas_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, schemas_.getRaw(i)); - } if (specificationCase_ == 8) { output.writeMessage( 8, (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_); @@ -12908,22 +12748,6 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 4, (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_); } - { - int dataSize = 0; - for (int i = 0; i < actions_.size(); i++) { - dataSize += computeStringSizeNoTag(actions_.getRaw(i)); - } - size += dataSize; - size += 1 * getActionsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < schemas_.size(); i++) { - dataSize += computeStringSizeNoTag(schemas_.getRaw(i)); - } - size += dataSize; - size += 1 * getSchemasList().size(); - } if (specificationCase_ == 8) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -12962,8 +12786,6 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; if (!getDescription().equals(other.getDescription())) return false; - if (!getActionsList().equals(other.getActionsList())) return false; - if (!getSchemasList().equals(other.getSchemasList())) return false; if (toolType_ != other.toolType_) return false; if (!getSpecificationCase().equals(other.getSpecificationCase())) return false; switch (specificationCase_) { @@ -12999,14 +12821,6 @@ public int hashCode() { hash = (53 * hash) + getDisplayName().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); - if (getActionsCount() > 0) { - hash = (37 * hash) + ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getActionsList().hashCode(); - } - if (getSchemasCount() > 0) { - hash = (37 * hash) + SCHEMAS_FIELD_NUMBER; - hash = (53 * hash) + getSchemasList().hashCode(); - } hash = (37 * hash) + TOOL_TYPE_FIELD_NUMBER; hash = (53 * hash) + toolType_; switch (specificationCase_) { @@ -13174,8 +12988,6 @@ public Builder clear() { name_ = ""; displayName_ = ""; description_ = ""; - actions_ = com.google.protobuf.LazyStringArrayList.emptyList(); - schemas_ = com.google.protobuf.LazyStringArrayList.emptyList(); if (openApiSpecBuilder_ != null) { openApiSpecBuilder_.clear(); } @@ -13237,15 +13049,7 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Tool result) { if (((from_bitField0_ & 0x00000004) != 0)) { result.description_ = description_; } - if (((from_bitField0_ & 0x00000008) != 0)) { - actions_.makeImmutable(); - result.actions_ = actions_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - schemas_.makeImmutable(); - result.schemas_ = schemas_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.toolType_ = toolType_; } } @@ -13327,26 +13131,6 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Tool other) { bitField0_ |= 0x00000004; onChanged(); } - if (!other.actions_.isEmpty()) { - if (actions_.isEmpty()) { - actions_ = other.actions_; - bitField0_ |= 0x00000008; - } else { - ensureActionsIsMutable(); - actions_.addAll(other.actions_); - } - onChanged(); - } - if (!other.schemas_.isEmpty()) { - if (schemas_.isEmpty()) { - schemas_ = other.schemas_; - bitField0_ |= 0x00000010; - } else { - ensureSchemasIsMutable(); - schemas_.addAll(other.schemas_); - } - onChanged(); - } if (other.toolType_ != 0) { setToolTypeValue(other.getToolTypeValue()); } @@ -13426,20 +13210,6 @@ public Builder mergeFrom( specificationCase_ = 4; break; } // case 34 - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureActionsIsMutable(); - actions_.add(s); - break; - } // case 50 - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureSchemasIsMutable(); - schemas_.add(s); - break; - } // case 58 case 66: { input.readMessage(getDataStoreSpecFieldBuilder().getBuilder(), extensionRegistry); @@ -13455,7 +13225,7 @@ public Builder mergeFrom( case 96: { toolType_ = input.readEnum(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000080; break; } // case 96 case 106: @@ -13825,408 +13595,6 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.LazyStringArrayList actions_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureActionsIsMutable() { - if (!actions_.isModifiable()) { - actions_ = new com.google.protobuf.LazyStringArrayList(actions_); - } - bitField0_ |= 0x00000008; - } - /** - * - * - *
-     * The list of derived action names for the tool.
-     * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @return A list containing the actions. - */ - @java.lang.Deprecated - public com.google.protobuf.ProtocolStringList getActionsList() { - actions_.makeImmutable(); - return actions_; - } - /** - * - * - *
-     * The list of derived action names for the tool.
-     * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @return The count of actions. - */ - @java.lang.Deprecated - public int getActionsCount() { - return actions_.size(); - } - /** - * - * - *
-     * The list of derived action names for the tool.
-     * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @param index The index of the element to return. - * @return The actions at the given index. - */ - @java.lang.Deprecated - public java.lang.String getActions(int index) { - return actions_.get(index); - } - /** - * - * - *
-     * The list of derived action names for the tool.
-     * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @param index The index of the value to return. - * @return The bytes of the actions at the given index. - */ - @java.lang.Deprecated - public com.google.protobuf.ByteString getActionsBytes(int index) { - return actions_.getByteString(index); - } - /** - * - * - *
-     * The list of derived action names for the tool.
-     * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @param index The index to set the value at. - * @param value The actions to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setActions(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.set(index, value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * The list of derived action names for the tool.
-     * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @param value The actions to add. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder addActions(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * The list of derived action names for the tool.
-     * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @param values The actions to add. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder addAllActions(java.lang.Iterable values) { - ensureActionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, actions_); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * The list of derived action names for the tool.
-     * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearActions() { - actions_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - ; - onChanged(); - return this; - } - /** - * - * - *
-     * The list of derived action names for the tool.
-     * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @param value The bytes of the actions to add. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder addActionsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureActionsIsMutable(); - actions_.add(value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList schemas_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureSchemasIsMutable() { - if (!schemas_.isModifiable()) { - schemas_ = new com.google.protobuf.LazyStringArrayList(schemas_); - } - bitField0_ |= 0x00000010; - } - /** - * - * - *
-     * The list of derived type schemas for the tool.
-     * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @return A list containing the schemas. - */ - @java.lang.Deprecated - public com.google.protobuf.ProtocolStringList getSchemasList() { - schemas_.makeImmutable(); - return schemas_; - } - /** - * - * - *
-     * The list of derived type schemas for the tool.
-     * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @return The count of schemas. - */ - @java.lang.Deprecated - public int getSchemasCount() { - return schemas_.size(); - } - /** - * - * - *
-     * The list of derived type schemas for the tool.
-     * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @param index The index of the element to return. - * @return The schemas at the given index. - */ - @java.lang.Deprecated - public java.lang.String getSchemas(int index) { - return schemas_.get(index); - } - /** - * - * - *
-     * The list of derived type schemas for the tool.
-     * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @param index The index of the value to return. - * @return The bytes of the schemas at the given index. - */ - @java.lang.Deprecated - public com.google.protobuf.ByteString getSchemasBytes(int index) { - return schemas_.getByteString(index); - } - /** - * - * - *
-     * The list of derived type schemas for the tool.
-     * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @param index The index to set the value at. - * @param value The schemas to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setSchemas(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSchemasIsMutable(); - schemas_.set(index, value); - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * The list of derived type schemas for the tool.
-     * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @param value The schemas to add. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder addSchemas(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSchemasIsMutable(); - schemas_.add(value); - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * The list of derived type schemas for the tool.
-     * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @param values The schemas to add. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder addAllSchemas(java.lang.Iterable values) { - ensureSchemasIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, schemas_); - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * The list of derived type schemas for the tool.
-     * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearSchemas() { - schemas_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - ; - onChanged(); - return this; - } - /** - * - * - *
-     * The list of derived type schemas for the tool.
-     * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @param value The bytes of the schemas to add. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder addSchemasBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureSchemasIsMutable(); - schemas_.add(value); - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool, com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.Builder, @@ -15117,7 +14485,7 @@ public int getToolTypeValue() { */ public Builder setToolTypeValue(int value) { toolType_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -15160,7 +14528,7 @@ public Builder setToolType(com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000080; toolType_ = value.getNumber(); onChanged(); return this; @@ -15179,7 +14547,7 @@ public Builder setToolType(com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType * @return This builder for chaining. */ public Builder clearToolType() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000080); toolType_ = 0; onChanged(); return this; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCall.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCall.java new file mode 100644 index 000000000000..1c0521ed448e --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCall.java @@ -0,0 +1,1127 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool_call.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Represents a call of a specific tool's action with the specified inputs.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ToolCall} + */ +public final class ToolCall extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ToolCall) + ToolCallOrBuilder { + private static final long serialVersionUID = 0L; + // Use ToolCall.newBuilder() to construct. + private ToolCall(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ToolCall() { + tool_ = ""; + action_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ToolCall(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCall_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCall_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ToolCall.class, + com.google.cloud.dialogflow.cx.v3beta1.ToolCall.Builder.class); + } + + private int bitField0_; + public static final int TOOL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object tool_ = ""; + /** + * + * + *
+   * The [tool][Tool] associated with this call.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + @java.lang.Override + public java.lang.String getTool() { + java.lang.Object ref = tool_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tool_ = s; + return s; + } + } + /** + * + * + *
+   * The [tool][Tool] associated with this call.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getToolBytes() { + java.lang.Object ref = tool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object action_ = ""; + /** + * + * + *
+   * The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The action. + */ + @java.lang.Override + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for action. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_PARAMETERS_FIELD_NUMBER = 3; + private com.google.protobuf.Struct inputParameters_; + /** + * + * + *
+   * The action's input parameters.
+   * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputParameters field is set. + */ + @java.lang.Override + public boolean hasInputParameters() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The action's input parameters.
+   * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getInputParameters() { + return inputParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputParameters_; + } + /** + * + * + *
+   * The action's input parameters.
+   * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getInputParametersOrBuilder() { + return inputParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputParameters_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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.GeneratedMessageV3.isStringEmpty(tool_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, action_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getInputParameters()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tool_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, action_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInputParameters()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.dialogflow.cx.v3beta1.ToolCall)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ToolCall other = + (com.google.cloud.dialogflow.cx.v3beta1.ToolCall) obj; + + if (!getTool().equals(other.getTool())) return false; + if (!getAction().equals(other.getAction())) return false; + if (hasInputParameters() != other.hasInputParameters()) return false; + if (hasInputParameters()) { + if (!getInputParameters().equals(other.getInputParameters())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOOL_FIELD_NUMBER; + hash = (53 * hash) + getTool().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + if (hasInputParameters()) { + hash = (37 * hash) + INPUT_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getInputParameters().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCall parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCall parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCall parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCall parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCall parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCall parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCall parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCall parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCall parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCall parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCall parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCall parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.dialogflow.cx.v3beta1.ToolCall prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a call of a specific tool's action with the specified inputs.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ToolCall} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ToolCall) + com.google.cloud.dialogflow.cx.v3beta1.ToolCallOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCall_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCall_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ToolCall.class, + com.google.cloud.dialogflow.cx.v3beta1.ToolCall.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ToolCall.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tool_ = ""; + action_ = ""; + inputParameters_ = null; + if (inputParametersBuilder_ != null) { + inputParametersBuilder_.dispose(); + inputParametersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCall_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCall getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCall.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCall build() { + com.google.cloud.dialogflow.cx.v3beta1.ToolCall result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCall buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ToolCall result = + new com.google.cloud.dialogflow.cx.v3beta1.ToolCall(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ToolCall result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tool_ = tool_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.action_ = action_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.inputParameters_ = + inputParametersBuilder_ == null ? inputParameters_ : inputParametersBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ToolCall) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ToolCall) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ToolCall other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ToolCall.getDefaultInstance()) + return this; + if (!other.getTool().isEmpty()) { + tool_ = other.tool_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAction().isEmpty()) { + action_ = other.action_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasInputParameters()) { + mergeInputParameters(other.getInputParameters()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + tool_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + action_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getInputParametersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object tool_ = ""; + /** + * + * + *
+     * The [tool][Tool] associated with this call.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + public java.lang.String getTool() { + java.lang.Object ref = tool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The [tool][Tool] associated with this call.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + public com.google.protobuf.ByteString getToolBytes() { + java.lang.Object ref = tool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The [tool][Tool] associated with this call.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The tool to set. + * @return This builder for chaining. + */ + public Builder setTool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tool_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The [tool][Tool] associated with this call.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTool() { + tool_ = getDefaultInstance().getTool(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The [tool][Tool] associated with this call.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for tool to set. + * @return This builder for chaining. + */ + public Builder setToolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tool_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object action_ = ""; + /** + * + * + *
+     * The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The action. + */ + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for action. + */ + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + action_ = getDefaultInstance().getAction(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for action to set. + * @return This builder for chaining. + */ + public Builder setActionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + action_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Struct inputParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + inputParametersBuilder_; + /** + * + * + *
+     * The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputParameters field is set. + */ + public boolean hasInputParameters() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputParameters. + */ + public com.google.protobuf.Struct getInputParameters() { + if (inputParametersBuilder_ == null) { + return inputParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputParameters_; + } else { + return inputParametersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputParameters(com.google.protobuf.Struct value) { + if (inputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputParameters_ = value; + } else { + inputParametersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (inputParametersBuilder_ == null) { + inputParameters_ = builderForValue.build(); + } else { + inputParametersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInputParameters(com.google.protobuf.Struct value) { + if (inputParametersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && inputParameters_ != null + && inputParameters_ != com.google.protobuf.Struct.getDefaultInstance()) { + getInputParametersBuilder().mergeFrom(value); + } else { + inputParameters_ = value; + } + } else { + inputParametersBuilder_.mergeFrom(value); + } + if (inputParameters_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInputParameters() { + bitField0_ = (bitField0_ & ~0x00000004); + inputParameters_ = null; + if (inputParametersBuilder_ != null) { + inputParametersBuilder_.dispose(); + inputParametersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getInputParametersBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getInputParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getInputParametersOrBuilder() { + if (inputParametersBuilder_ != null) { + return inputParametersBuilder_.getMessageOrBuilder(); + } else { + return inputParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputParameters_; + } + } + /** + * + * + *
+     * The action's input parameters.
+     * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getInputParametersFieldBuilder() { + if (inputParametersBuilder_ == null) { + inputParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getInputParameters(), getParentForChildren(), isClean()); + inputParameters_ = null; + } + return inputParametersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ToolCall) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ToolCall) + private static final com.google.cloud.dialogflow.cx.v3beta1.ToolCall DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ToolCall(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCall getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ToolCall parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.dialogflow.cx.v3beta1.ToolCall getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallOrBuilder.java new file mode 100644 index 000000000000..b389a27df49f --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool_call.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ToolCallOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ToolCall) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The [tool][Tool] associated with this call.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + java.lang.String getTool(); + /** + * + * + *
+   * The [tool][Tool] associated with this call.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + com.google.protobuf.ByteString getToolBytes(); + + /** + * + * + *
+   * The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The action. + */ + java.lang.String getAction(); + /** + * + * + *
+   * The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for action. + */ + com.google.protobuf.ByteString getActionBytes(); + + /** + * + * + *
+   * The action's input parameters.
+   * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputParameters field is set. + */ + boolean hasInputParameters(); + /** + * + * + *
+   * The action's input parameters.
+   * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputParameters. + */ + com.google.protobuf.Struct getInputParameters(); + /** + * + * + *
+   * The action's input parameters.
+   * 
+ * + * .google.protobuf.Struct input_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getInputParametersOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallProto.java index 17e299a8a692..e1f21d53076e 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallProto.java @@ -28,6 +28,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCall_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCall_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -50,19 +54,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".v3beta1\032\034google/api/annotations.proto\032\027" + "google/api/client.proto\032\037google/api/fiel" + "d_behavior.proto\032\031google/api/resource.pr" - + "oto\032\034google/protobuf/struct.proto\"\205\002\n\016To" - + "olCallResult\0224\n\004tool\030\001 \001(\tB&\340A\002\372A \n\036dial" - + "ogflow.googleapis.com/Tool\022\023\n\006action\030\002 \001" - + "(\tB\003\340A\002\022I\n\005error\030\003 \001(\01328.google.cloud.di" - + "alogflow.cx.v3beta1.ToolCallResult.Error" - + "H\000\0224\n\021output_parameters\030\004 \001(\0132\027.google.p" - + "rotobuf.StructH\000\032\035\n\005Error\022\024\n\007message\030\001 \001" - + "(\tB\003\340A\001B\010\n\006resultB\307\001\n&com.google.cloud.d" - + "ialogflow.cx.v3beta1B\rToolCallProtoP\001Z6c" - + "loud.google.com/go/dialogflow/cx/apiv3be" - + "ta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dia" - + "logflow.Cx.V3Beta1\352\002&Google::Cloud::Dial" - + "ogflow::CX::V3beta1b\006proto3" + + "oto\032\034google/protobuf/struct.proto\"\215\001\n\010To" + + "olCall\0224\n\004tool\030\001 \001(\tB&\340A\002\372A \n\036dialogflow" + + ".googleapis.com/Tool\022\023\n\006action\030\002 \001(\tB\003\340A" + + "\002\0226\n\020input_parameters\030\003 \001(\0132\027.google.pro" + + "tobuf.StructB\003\340A\001\"\205\002\n\016ToolCallResult\0224\n\004" + + "tool\030\001 \001(\tB&\340A\002\372A \n\036dialogflow.googleapi" + + "s.com/Tool\022\023\n\006action\030\002 \001(\tB\003\340A\002\022I\n\005error" + + "\030\003 \001(\01328.google.cloud.dialogflow.cx.v3be" + + "ta1.ToolCallResult.ErrorH\000\0224\n\021output_par" + + "ameters\030\004 \001(\0132\027.google.protobuf.StructH\000" + + "\032\035\n\005Error\022\024\n\007message\030\001 \001(\tB\003\340A\001B\010\n\006resul" + + "tB\307\001\n&com.google.cloud.dialogflow.cx.v3b" + + "eta1B\rToolCallProtoP\001Z6cloud.google.com/" + + "go/dialogflow/cx/apiv3beta1/cxpb;cxpb\370\001\001" + + "\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Bet" + + "a1\352\002&Google::Cloud::Dialogflow::CX::V3be" + + "ta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -74,8 +82,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), }); - internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCall_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCall_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCall_descriptor, + new java.lang.String[] { + "Tool", "Action", "InputParameters", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_descriptor = + getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_descriptor, diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolOrBuilder.java index 49f964a9b07f..48102c43ac91 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolOrBuilder.java @@ -103,132 +103,6 @@ public interface ToolOrBuilder */ com.google.protobuf.ByteString getDescriptionBytes(); - /** - * - * - *
-   * The list of derived action names for the tool.
-   * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @return A list containing the actions. - */ - @java.lang.Deprecated - java.util.List getActionsList(); - /** - * - * - *
-   * The list of derived action names for the tool.
-   * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @return The count of actions. - */ - @java.lang.Deprecated - int getActionsCount(); - /** - * - * - *
-   * The list of derived action names for the tool.
-   * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @param index The index of the element to return. - * @return The actions at the given index. - */ - @java.lang.Deprecated - java.lang.String getActions(int index); - /** - * - * - *
-   * The list of derived action names for the tool.
-   * 
- * - * repeated string actions = 6 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 - * @param index The index of the value to return. - * @return The bytes of the actions at the given index. - */ - @java.lang.Deprecated - com.google.protobuf.ByteString getActionsBytes(int index); - - /** - * - * - *
-   * The list of derived type schemas for the tool.
-   * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @return A list containing the schemas. - */ - @java.lang.Deprecated - java.util.List getSchemasList(); - /** - * - * - *
-   * The list of derived type schemas for the tool.
-   * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @return The count of schemas. - */ - @java.lang.Deprecated - int getSchemasCount(); - /** - * - * - *
-   * The list of derived type schemas for the tool.
-   * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @param index The index of the element to return. - * @return The schemas at the given index. - */ - @java.lang.Deprecated - java.lang.String getSchemas(int index); - /** - * - * - *
-   * The list of derived type schemas for the tool.
-   * 
- * - * repeated string schemas = 7 [deprecated = true]; - * - * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 - * @param index The index of the value to return. - * @return The bytes of the schemas at the given index. - */ - @java.lang.Deprecated - com.google.protobuf.ByteString getSchemasBytes(int index); - /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolProto.java index abc8650c4e33..24224544a7fb 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolProto.java @@ -160,104 +160,103 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "beta1.ToolB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.g" + "oogle.protobuf.FieldMask\"X\n\021DeleteToolRe" + "quest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036dialogflow." - + "googleapis.com/Tool\022\r\n\005force\030\002 \001(\010\"\306\022\n\004T" + + "googleapis.com/Tool\022\r\n\005force\030\002 \001(\010\"\234\022\n\004T" + "ool\022\014\n\004name\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB" - + "\003\340A\002\022\030\n\013description\030\003 \001(\tB\003\340A\002\022\023\n\007action" - + "s\030\006 \003(\tB\002\030\001\022\023\n\007schemas\030\007 \003(\tB\002\030\001\022M\n\ropen" - + "_api_spec\030\004 \001(\01324.google.cloud.dialogflo" - + "w.cx.v3beta1.Tool.OpenApiToolH\000\022Q\n\017data_" - + "store_spec\030\010 \001(\01326.google.cloud.dialogfl" - + "ow.cx.v3beta1.Tool.DataStoreToolH\000\022P\n\016ex" - + "tension_spec\030\013 \001(\01326.google.cloud.dialog" - + "flow.cx.v3beta1.Tool.ExtensionToolH\000\022N\n\r" - + "function_spec\030\r \001(\01325.google.cloud.dialo" - + "gflow.cx.v3beta1.Tool.FunctionToolH\000\022I\n\t" - + "tool_type\030\014 \001(\01621.google.cloud.dialogflo" - + "w.cx.v3beta1.Tool.ToolTypeB\003\340A\003\032\326\001\n\013Open" - + "ApiTool\022\032\n\013text_schema\030\001 \001(\tB\003\340A\002H\000\022T\n\016a" - + "uthentication\030\002 \001(\01327.google.cloud.dialo" - + "gflow.cx.v3beta1.Tool.AuthenticationB\003\340A" - + "\001\022K\n\ntls_config\030\003 \001(\01322.google.cloud.dia" - + "logflow.cx.v3beta1.Tool.TLSConfigB\003\340A\001B\010" - + "\n\006schema\032\344\001\n\rDataStoreTool\022\\\n\026data_store" - + "_connections\030\001 \003(\01327.google.cloud.dialog" - + "flow.cx.v3beta1.DataStoreConnectionB\003\340A\002" - + "\022c\n\017fallback_prompt\030\003 \001(\0132E.google.cloud" - + ".dialogflow.cx.v3beta1.Tool.DataStoreToo" - + "l.FallbackPromptB\003\340A\002\032\020\n\016FallbackPrompt\032" - + "\"\n\rExtensionTool\022\021\n\004name\030\001 \001(\tB\003\340A\002\032w\n\014F" - + "unctionTool\0222\n\014input_schema\030\001 \001(\0132\027.goog" - + "le.protobuf.StructB\003\340A\001\0223\n\routput_schema" - + "\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\001\032\203\007\n" - + "\016Authentication\022^\n\016api_key_config\030\001 \001(\0132" - + "D.google.cloud.dialogflow.cx.v3beta1.Too" - + "l.Authentication.ApiKeyConfigH\000\022[\n\014oauth" - + "_config\030\002 \001(\0132C.google.cloud.dialogflow." - + "cx.v3beta1.Tool.Authentication.OAuthConf" - + "igH\000\022s\n\031service_agent_auth_config\030\003 \001(\0132" - + "N.google.cloud.dialogflow.cx.v3beta1.Too" - + "l.Authentication.ServiceAgentAuthConfigH" - + "\000\032\243\001\n\014ApiKeyConfig\022\025\n\010key_name\030\001 \001(\tB\003\340A" - + "\002\022\024\n\007api_key\030\002 \001(\tB\003\340A\002\022f\n\020request_locat" - + "ion\030\003 \001(\0162G.google.cloud.dialogflow.cx.v" - + "3beta1.Tool.Authentication.RequestLocati" - + "onB\003\340A\002\032\234\002\n\013OAuthConfig\022q\n\020oauth_grant_t" - + "ype\030\001 \001(\0162R.google.cloud.dialogflow.cx.v" - + "3beta1.Tool.Authentication.OAuthConfig.O" - + "authGrantTypeB\003\340A\002\022\026\n\tclient_id\030\002 \001(\tB\003\340" - + "A\002\022\032\n\rclient_secret\030\003 \001(\tB\003\340A\002\022\033\n\016token_" - + "endpoint\030\004 \001(\tB\003\340A\002\"I\n\016OauthGrantType\022 \n" - + "\034OAUTH_GRANT_TYPE_UNSPECIFIED\020\000\022\025\n\021CLIEN" - + "T_CREDENTIAL\020\001\032\030\n\026ServiceAgentAuthConfig" - + "\"Q\n\017RequestLocation\022 \n\034REQUEST_LOCATION_" - + "UNSPECIFIED\020\000\022\n\n\006HEADER\020\001\022\020\n\014QUERY_STRIN" - + "G\020\002B\r\n\013auth_config\032\225\001\n\tTLSConfig\022P\n\010ca_c" - + "erts\030\001 \003(\01329.google.cloud.dialogflow.cx." - + "v3beta1.Tool.TLSConfig.CACertB\003\340A\002\0326\n\006CA" - + "Cert\022\031\n\014display_name\030\001 \001(\tB\003\340A\002\022\021\n\004cert\030" - + "\002 \001(\014B\003\340A\002\"L\n\010ToolType\022\031\n\025TOOL_TYPE_UNSP" - + "ECIFIED\020\000\022\023\n\017CUSTOMIZED_TOOL\020\001\022\020\n\014BUILTI" - + "N_TOOL\020\002:h\352Ae\n\036dialogflow.googleapis.com" - + "/Tool\022Cprojects/{project}/locations/{loc" - + "ation}/agents/{agent}/tools/{tool}B\017\n\rsp" - + "ecification\"\025\n\023ExportToolsMetadata2\221\n\n\005T" - + "ools\022\302\001\n\nCreateTool\0225.google.cloud.dialo" - + "gflow.cx.v3beta1.CreateToolRequest\032(.goo" - + "gle.cloud.dialogflow.cx.v3beta1.Tool\"S\332A" - + "\013parent,tool\202\323\344\223\002?\"7/v3beta1/{parent=pro" - + "jects/*/locations/*/agents/*}/tools:\004too" - + "l\022\302\001\n\tListTools\0224.google.cloud.dialogflo" - + "w.cx.v3beta1.ListToolsRequest\0325.google.c" - + "loud.dialogflow.cx.v3beta1.ListToolsResp" - + "onse\"H\332A\006parent\202\323\344\223\0029\0227/v3beta1/{parent=" - + "projects/*/locations/*/agents/*}/tools\022\334" - + "\001\n\013ExportTools\0226.google.cloud.dialogflow" - + ".cx.v3beta1.ExportToolsRequest\032\035.google." - + "longrunning.Operation\"v\312A*\n\023ExportToolsR" - + "esponse\022\023ExportToolsMetadata\202\323\344\223\002C\">/v3b" - + "eta1/{parent=projects/*/locations/*/agen" - + "ts/*}/tools:export:\001*\022\257\001\n\007GetTool\0222.goog" - + "le.cloud.dialogflow.cx.v3beta1.GetToolRe" - + "quest\032(.google.cloud.dialogflow.cx.v3bet" - + "a1.Tool\"F\332A\004name\202\323\344\223\0029\0227/v3beta1/{name=p" - + "rojects/*/locations/*/agents/*/tools/*}\022" - + "\314\001\n\nUpdateTool\0225.google.cloud.dialogflow" - + ".cx.v3beta1.UpdateToolRequest\032(.google.c" - + "loud.dialogflow.cx.v3beta1.Tool\"]\332A\020tool" - + ",update_mask\202\323\344\223\002D2/v3bet" + + "a1/{parent=projects/*/locations/*/agents" + + "/*}/tools:export:\001*\022\257\001\n\007GetTool\0222.google" + + ".cloud.dialogflow.cx.v3beta1.GetToolRequ" + + "est\032(.google.cloud.dialogflow.cx.v3beta1" + + ".Tool\"F\332A\004name\202\323\344\223\0029\0227/v3beta1/{name=pro" + + "jects/*/locations/*/agents/*/tools/*}\022\314\001" + + "\n\nUpdateTool\0225.google.cloud.dialogflow.c" + + "x.v3beta1.UpdateToolRequest\032(.google.clo" + + "ud.dialogflow.cx.v3beta1.Tool\"]\332A\020tool,u" + + "pdate_mask\202\323\344\223\002D2 builder) { private ToolUse() { tool_ = ""; action_ = ""; - inputParameters_ = java.util.Collections.emptyList(); - outputParameters_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -66,6 +64,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.dialogflow.cx.v3beta1.ToolUse.Builder.class); } + private int bitField0_; public static final int TOOL_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -176,155 +175,116 @@ public com.google.protobuf.ByteString getActionBytes() { } } - public static final int INPUT_PARAMETERS_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private java.util.List inputParameters_; + public static final int INPUT_ACTION_PARAMETERS_FIELD_NUMBER = 5; + private com.google.protobuf.Struct inputActionParameters_; /** * * *
-   * A list of input parameters for the action.
+   * Optional. A list of input parameters for the action.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; - */ - @java.lang.Override - public java.util.List - getInputParametersList() { - return inputParameters_; - } - /** - * - * - *
-   * A list of input parameters for the action.
-   * 
+ * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * @return Whether the inputActionParameters field is set. */ @java.lang.Override - public java.util.List - getInputParametersOrBuilderList() { - return inputParameters_; + public boolean hasInputActionParameters() { + return ((bitField0_ & 0x00000001) != 0); } /** * * *
-   * A list of input parameters for the action.
+   * Optional. A list of input parameters for the action.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; - */ - @java.lang.Override - public int getInputParametersCount() { - return inputParameters_.size(); - } - /** - * - * - *
-   * A list of input parameters for the action.
-   * 
+ * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * @return The inputActionParameters. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getInputParameters(int index) { - return inputParameters_.get(index); + public com.google.protobuf.Struct getInputActionParameters() { + return inputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputActionParameters_; } /** * * *
-   * A list of input parameters for the action.
+   * Optional. A list of input parameters for the action.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder - getInputParametersOrBuilder(int index) { - return inputParameters_.get(index); + public com.google.protobuf.StructOrBuilder getInputActionParametersOrBuilder() { + return inputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputActionParameters_; } - public static final int OUTPUT_PARAMETERS_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private java.util.List outputParameters_; + public static final int OUTPUT_ACTION_PARAMETERS_FIELD_NUMBER = 6; + private com.google.protobuf.Struct outputActionParameters_; /** * * *
-   * A list of output parameters generated by the action.
+   * Optional. A list of output parameters generated by the action.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * - */ - @java.lang.Override - public java.util.List - getOutputParametersList() { - return outputParameters_; - } - /** - * - * - *
-   * A list of output parameters generated by the action.
-   * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; - * + * @return Whether the outputActionParameters field is set. */ @java.lang.Override - public java.util.List - getOutputParametersOrBuilderList() { - return outputParameters_; + public boolean hasOutputActionParameters() { + return ((bitField0_ & 0x00000002) != 0); } /** * * *
-   * A list of output parameters generated by the action.
+   * Optional. A list of output parameters generated by the action.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * - */ - @java.lang.Override - public int getOutputParametersCount() { - return outputParameters_.size(); - } - /** - * - * - *
-   * A list of output parameters generated by the action.
-   * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; - * + * @return The outputActionParameters. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getOutputParameters(int index) { - return outputParameters_.get(index); + public com.google.protobuf.Struct getOutputActionParameters() { + return outputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputActionParameters_; } /** * * *
-   * A list of output parameters generated by the action.
+   * Optional. A list of output parameters generated by the action.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder - getOutputParametersOrBuilder(int index) { - return outputParameters_.get(index); + public com.google.protobuf.StructOrBuilder getOutputActionParametersOrBuilder() { + return outputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputActionParameters_; } private byte memoizedIsInitialized = -1; @@ -347,11 +307,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, action_); } - for (int i = 0; i < inputParameters_.size(); i++) { - output.writeMessage(3, inputParameters_.get(i)); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getInputActionParameters()); } - for (int i = 0; i < outputParameters_.size(); i++) { - output.writeMessage(4, outputParameters_.get(i)); + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getOutputActionParameters()); } getUnknownFields().writeTo(output); } @@ -368,11 +328,13 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, action_); } - for (int i = 0; i < inputParameters_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, inputParameters_.get(i)); + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, getInputActionParameters()); } - for (int i = 0; i < outputParameters_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, outputParameters_.get(i)); + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getOutputActionParameters()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -392,8 +354,14 @@ public boolean equals(final java.lang.Object obj) { if (!getTool().equals(other.getTool())) return false; if (!getAction().equals(other.getAction())) return false; - if (!getInputParametersList().equals(other.getInputParametersList())) return false; - if (!getOutputParametersList().equals(other.getOutputParametersList())) return false; + if (hasInputActionParameters() != other.hasInputActionParameters()) return false; + if (hasInputActionParameters()) { + if (!getInputActionParameters().equals(other.getInputActionParameters())) return false; + } + if (hasOutputActionParameters() != other.hasOutputActionParameters()) return false; + if (hasOutputActionParameters()) { + if (!getOutputActionParameters().equals(other.getOutputActionParameters())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -409,13 +377,13 @@ public int hashCode() { hash = (53 * hash) + getTool().hashCode(); hash = (37 * hash) + ACTION_FIELD_NUMBER; hash = (53 * hash) + getAction().hashCode(); - if (getInputParametersCount() > 0) { - hash = (37 * hash) + INPUT_PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getInputParametersList().hashCode(); + if (hasInputActionParameters()) { + hash = (37 * hash) + INPUT_ACTION_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getInputActionParameters().hashCode(); } - if (getOutputParametersCount() > 0) { - hash = (37 * hash) + OUTPUT_PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getOutputParametersList().hashCode(); + if (hasOutputActionParameters()) { + hash = (37 * hash) + OUTPUT_ACTION_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getOutputActionParameters().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; @@ -546,10 +514,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dialogflow.cx.v3beta1.ToolUse.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputActionParametersFieldBuilder(); + getOutputActionParametersFieldBuilder(); + } } @java.lang.Override @@ -558,20 +536,16 @@ public Builder clear() { bitField0_ = 0; tool_ = ""; action_ = ""; - if (inputParametersBuilder_ == null) { - inputParameters_ = java.util.Collections.emptyList(); - } else { - inputParameters_ = null; - inputParametersBuilder_.clear(); + inputActionParameters_ = null; + if (inputActionParametersBuilder_ != null) { + inputActionParametersBuilder_.dispose(); + inputActionParametersBuilder_ = null; } - bitField0_ = (bitField0_ & ~0x00000004); - if (outputParametersBuilder_ == null) { - outputParameters_ = java.util.Collections.emptyList(); - } else { - outputParameters_ = null; - outputParametersBuilder_.clear(); + outputActionParameters_ = null; + if (outputActionParametersBuilder_ != null) { + outputActionParametersBuilder_.dispose(); + outputActionParametersBuilder_ = null; } - bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -599,7 +573,6 @@ public com.google.cloud.dialogflow.cx.v3beta1.ToolUse build() { public com.google.cloud.dialogflow.cx.v3beta1.ToolUse buildPartial() { com.google.cloud.dialogflow.cx.v3beta1.ToolUse result = new com.google.cloud.dialogflow.cx.v3beta1.ToolUse(this); - buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -607,27 +580,6 @@ public com.google.cloud.dialogflow.cx.v3beta1.ToolUse buildPartial() { return result; } - private void buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3beta1.ToolUse result) { - if (inputParametersBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - inputParameters_ = java.util.Collections.unmodifiableList(inputParameters_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.inputParameters_ = inputParameters_; - } else { - result.inputParameters_ = inputParametersBuilder_.build(); - } - if (outputParametersBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - outputParameters_ = java.util.Collections.unmodifiableList(outputParameters_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.outputParameters_ = outputParameters_; - } else { - result.outputParameters_ = outputParametersBuilder_.build(); - } - } - private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ToolUse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -636,6 +588,22 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ToolUse result if (((from_bitField0_ & 0x00000002) != 0)) { result.action_ = action_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.inputActionParameters_ = + inputActionParametersBuilder_ == null + ? inputActionParameters_ + : inputActionParametersBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.outputActionParameters_ = + outputActionParametersBuilder_ == null + ? outputActionParameters_ + : outputActionParametersBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -693,59 +661,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ToolUse other) { bitField0_ |= 0x00000002; onChanged(); } - if (inputParametersBuilder_ == null) { - if (!other.inputParameters_.isEmpty()) { - if (inputParameters_.isEmpty()) { - inputParameters_ = other.inputParameters_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureInputParametersIsMutable(); - inputParameters_.addAll(other.inputParameters_); - } - onChanged(); - } - } else { - if (!other.inputParameters_.isEmpty()) { - if (inputParametersBuilder_.isEmpty()) { - inputParametersBuilder_.dispose(); - inputParametersBuilder_ = null; - inputParameters_ = other.inputParameters_; - bitField0_ = (bitField0_ & ~0x00000004); - inputParametersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getInputParametersFieldBuilder() - : null; - } else { - inputParametersBuilder_.addAllMessages(other.inputParameters_); - } - } + if (other.hasInputActionParameters()) { + mergeInputActionParameters(other.getInputActionParameters()); } - if (outputParametersBuilder_ == null) { - if (!other.outputParameters_.isEmpty()) { - if (outputParameters_.isEmpty()) { - outputParameters_ = other.outputParameters_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureOutputParametersIsMutable(); - outputParameters_.addAll(other.outputParameters_); - } - onChanged(); - } - } else { - if (!other.outputParameters_.isEmpty()) { - if (outputParametersBuilder_.isEmpty()) { - outputParametersBuilder_.dispose(); - outputParametersBuilder_ = null; - outputParameters_ = other.outputParameters_; - bitField0_ = (bitField0_ & ~0x00000008); - outputParametersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getOutputParametersFieldBuilder() - : null; - } else { - outputParametersBuilder_.addAllMessages(other.outputParameters_); - } - } + if (other.hasOutputActionParameters()) { + mergeOutputActionParameters(other.getOutputActionParameters()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -785,34 +705,20 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 - case 26: + case 42: { - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter m = - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.parser(), - extensionRegistry); - if (inputParametersBuilder_ == null) { - ensureInputParametersIsMutable(); - inputParameters_.add(m); - } else { - inputParametersBuilder_.addMessage(m); - } + input.readMessage( + getInputActionParametersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; break; - } // case 26 - case 34: + } // case 42 + case 50: { - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter m = - input.readMessage( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.parser(), - extensionRegistry); - if (outputParametersBuilder_ == null) { - ensureOutputParametersIsMutable(); - outputParameters_.add(m); - } else { - outputParametersBuilder_.addMessage(m); - } + input.readMessage( + getOutputActionParametersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; break; - } // case 34 + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1064,230 +970,121 @@ public Builder setActionBytes(com.google.protobuf.ByteString value) { return this; } - private java.util.List - inputParameters_ = java.util.Collections.emptyList(); - - private void ensureInputParametersIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - inputParameters_ = - new java.util.ArrayList( - inputParameters_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> - inputParametersBuilder_; - - /** - * - * - *
-     * A list of input parameters for the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; - * - */ - public java.util.List - getInputParametersList() { - if (inputParametersBuilder_ == null) { - return java.util.Collections.unmodifiableList(inputParameters_); - } else { - return inputParametersBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * A list of input parameters for the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; - * - */ - public int getInputParametersCount() { - if (inputParametersBuilder_ == null) { - return inputParameters_.size(); - } else { - return inputParametersBuilder_.getCount(); - } - } + private com.google.protobuf.Struct inputActionParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + inputActionParametersBuilder_; /** * * *
-     * A list of input parameters for the action.
+     * Optional. A list of input parameters for the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getInputParameters(int index) { - if (inputParametersBuilder_ == null) { - return inputParameters_.get(index); - } else { - return inputParametersBuilder_.getMessage(index); - } - } - /** * - * - *
-     * A list of input parameters for the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; - * + * @return Whether the inputActionParameters field is set. */ - public Builder setInputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (inputParametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputParametersIsMutable(); - inputParameters_.set(index, value); - onChanged(); - } else { - inputParametersBuilder_.setMessage(index, value); - } - return this; + public boolean hasInputActionParameters() { + return ((bitField0_ & 0x00000004) != 0); } /** * * *
-     * A list of input parameters for the action.
+     * Optional. A list of input parameters for the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * - */ - public Builder setInputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (inputParametersBuilder_ == null) { - ensureInputParametersIsMutable(); - inputParameters_.set(index, builderForValue.build()); - onChanged(); - } else { - inputParametersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of input parameters for the action.
-     * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; - * + * @return The inputActionParameters. */ - public Builder addInputParameters( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (inputParametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputParametersIsMutable(); - inputParameters_.add(value); - onChanged(); + public com.google.protobuf.Struct getInputActionParameters() { + if (inputActionParametersBuilder_ == null) { + return inputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputActionParameters_; } else { - inputParametersBuilder_.addMessage(value); + return inputActionParametersBuilder_.getMessage(); } - return this; } /** * * *
-     * A list of input parameters for the action.
+     * Optional. A list of input parameters for the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addInputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (inputParametersBuilder_ == null) { + public Builder setInputActionParameters(com.google.protobuf.Struct value) { + if (inputActionParametersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureInputParametersIsMutable(); - inputParameters_.add(index, value); - onChanged(); + inputActionParameters_ = value; } else { - inputParametersBuilder_.addMessage(index, value); + inputActionParametersBuilder_.setMessage(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } /** * * *
-     * A list of input parameters for the action.
+     * Optional. A list of input parameters for the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addInputParameters( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (inputParametersBuilder_ == null) { - ensureInputParametersIsMutable(); - inputParameters_.add(builderForValue.build()); - onChanged(); + public Builder setInputActionParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (inputActionParametersBuilder_ == null) { + inputActionParameters_ = builderForValue.build(); } else { - inputParametersBuilder_.addMessage(builderForValue.build()); + inputActionParametersBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; + onChanged(); return this; } /** * * *
-     * A list of input parameters for the action.
+     * Optional. A list of input parameters for the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addInputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (inputParametersBuilder_ == null) { - ensureInputParametersIsMutable(); - inputParameters_.add(index, builderForValue.build()); - onChanged(); + public Builder mergeInputActionParameters(com.google.protobuf.Struct value) { + if (inputActionParametersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && inputActionParameters_ != null + && inputActionParameters_ != com.google.protobuf.Struct.getDefaultInstance()) { + getInputActionParametersBuilder().mergeFrom(value); + } else { + inputActionParameters_ = value; + } } else { - inputParametersBuilder_.addMessage(index, builderForValue.build()); + inputActionParametersBuilder_.mergeFrom(value); } - return this; - } - /** - * - * - *
-     * A list of input parameters for the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; - * - */ - public Builder addAllInputParameters( - java.lang.Iterable - values) { - if (inputParametersBuilder_ == null) { - ensureInputParametersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputParameters_); + if (inputActionParameters_ != null) { + bitField0_ |= 0x00000004; onChanged(); - } else { - inputParametersBuilder_.addAllMessages(values); } return this; } @@ -1295,402 +1092,202 @@ public Builder addAllInputParameters( * * *
-     * A list of input parameters for the action.
+     * Optional. A list of input parameters for the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; - * - */ - public Builder clearInputParameters() { - if (inputParametersBuilder_ == null) { - inputParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - inputParametersBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * A list of input parameters for the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder removeInputParameters(int index) { - if (inputParametersBuilder_ == null) { - ensureInputParametersIsMutable(); - inputParameters_.remove(index); - onChanged(); - } else { - inputParametersBuilder_.remove(index); + public Builder clearInputActionParameters() { + bitField0_ = (bitField0_ & ~0x00000004); + inputActionParameters_ = null; + if (inputActionParametersBuilder_ != null) { + inputActionParametersBuilder_.dispose(); + inputActionParametersBuilder_ = null; } + onChanged(); return this; } /** * * *
-     * A list of input parameters for the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder getInputParametersBuilder( - int index) { - return getInputParametersFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * A list of input parameters for the action.
+     * Optional. A list of input parameters for the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder - getInputParametersOrBuilder(int index) { - if (inputParametersBuilder_ == null) { - return inputParameters_.get(index); - } else { - return inputParametersBuilder_.getMessageOrBuilder(index); - } + public com.google.protobuf.Struct.Builder getInputActionParametersBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getInputActionParametersFieldBuilder().getBuilder(); } /** * * *
-     * A list of input parameters for the action.
+     * Optional. A list of input parameters for the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getInputParametersOrBuilderList() { - if (inputParametersBuilder_ != null) { - return inputParametersBuilder_.getMessageOrBuilderList(); + public com.google.protobuf.StructOrBuilder getInputActionParametersOrBuilder() { + if (inputActionParametersBuilder_ != null) { + return inputActionParametersBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(inputParameters_); + return inputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputActionParameters_; } } /** * * *
-     * A list of input parameters for the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder - addInputParametersBuilder() { - return getInputParametersFieldBuilder() - .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); - } - /** - * - * - *
-     * A list of input parameters for the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder addInputParametersBuilder( - int index) { - return getInputParametersFieldBuilder() - .addBuilder( - index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); - } - /** - * - * - *
-     * A list of input parameters for the action.
+     * Optional. A list of input parameters for the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getInputParametersBuilderList() { - return getInputParametersFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> - getInputParametersFieldBuilder() { - if (inputParametersBuilder_ == null) { - inputParametersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder>( - inputParameters_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - inputParameters_ = null; - } - return inputParametersBuilder_; - } - - private java.util.List - outputParameters_ = java.util.Collections.emptyList(); - - private void ensureOutputParametersIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - outputParameters_ = - new java.util.ArrayList( - outputParameters_); - bitField0_ |= 0x00000008; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getInputActionParametersFieldBuilder() { + if (inputActionParametersBuilder_ == null) { + inputActionParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getInputActionParameters(), getParentForChildren(), isClean()); + inputActionParameters_ = null; } + return inputActionParametersBuilder_; } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> - outputParametersBuilder_; - - /** - * - * - *
-     * A list of output parameters generated by the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; - * - */ - public java.util.List - getOutputParametersList() { - if (outputParametersBuilder_ == null) { - return java.util.Collections.unmodifiableList(outputParameters_); - } else { - return outputParametersBuilder_.getMessageList(); - } - } + private com.google.protobuf.Struct outputActionParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + outputActionParametersBuilder_; /** * * *
-     * A list of output parameters generated by the action.
+     * Optional. A list of output parameters generated by the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * - */ - public int getOutputParametersCount() { - if (outputParametersBuilder_ == null) { - return outputParameters_.size(); - } else { - return outputParametersBuilder_.getCount(); - } - } - /** - * - * - *
-     * A list of output parameters generated by the action.
-     * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; - * + * @return Whether the outputActionParameters field is set. */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getOutputParameters(int index) { - if (outputParametersBuilder_ == null) { - return outputParameters_.get(index); - } else { - return outputParametersBuilder_.getMessage(index); - } + public boolean hasOutputActionParameters() { + return ((bitField0_ & 0x00000008) != 0); } /** * * *
-     * A list of output parameters generated by the action.
+     * Optional. A list of output parameters generated by the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * - */ - public Builder setOutputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (outputParametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputParametersIsMutable(); - outputParameters_.set(index, value); - onChanged(); - } else { - outputParametersBuilder_.setMessage(index, value); - } - return this; - } - /** * - * - *
-     * A list of output parameters generated by the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; - * + * @return The outputActionParameters. */ - public Builder setOutputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (outputParametersBuilder_ == null) { - ensureOutputParametersIsMutable(); - outputParameters_.set(index, builderForValue.build()); - onChanged(); + public com.google.protobuf.Struct getOutputActionParameters() { + if (outputActionParametersBuilder_ == null) { + return outputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputActionParameters_; } else { - outputParametersBuilder_.setMessage(index, builderForValue.build()); + return outputActionParametersBuilder_.getMessage(); } - return this; } /** * * *
-     * A list of output parameters generated by the action.
+     * Optional. A list of output parameters generated by the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; - * - */ - public Builder addOutputParameters( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (outputParametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputParametersIsMutable(); - outputParameters_.add(value); - onChanged(); - } else { - outputParametersBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * A list of output parameters generated by the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addOutputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { - if (outputParametersBuilder_ == null) { + public Builder setOutputActionParameters(com.google.protobuf.Struct value) { + if (outputActionParametersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureOutputParametersIsMutable(); - outputParameters_.add(index, value); - onChanged(); - } else { - outputParametersBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * A list of output parameters generated by the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; - * - */ - public Builder addOutputParameters( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (outputParametersBuilder_ == null) { - ensureOutputParametersIsMutable(); - outputParameters_.add(builderForValue.build()); - onChanged(); + outputActionParameters_ = value; } else { - outputParametersBuilder_.addMessage(builderForValue.build()); + outputActionParametersBuilder_.setMessage(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } /** * * *
-     * A list of output parameters generated by the action.
+     * Optional. A list of output parameters generated by the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addOutputParameters( - int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { - if (outputParametersBuilder_ == null) { - ensureOutputParametersIsMutable(); - outputParameters_.add(index, builderForValue.build()); - onChanged(); + public Builder setOutputActionParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (outputActionParametersBuilder_ == null) { + outputActionParameters_ = builderForValue.build(); } else { - outputParametersBuilder_.addMessage(index, builderForValue.build()); + outputActionParametersBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000008; + onChanged(); return this; } /** * * *
-     * A list of output parameters generated by the action.
+     * Optional. A list of output parameters generated by the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addAllOutputParameters( - java.lang.Iterable - values) { - if (outputParametersBuilder_ == null) { - ensureOutputParametersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputParameters_); - onChanged(); + public Builder mergeOutputActionParameters(com.google.protobuf.Struct value) { + if (outputActionParametersBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && outputActionParameters_ != null + && outputActionParameters_ != com.google.protobuf.Struct.getDefaultInstance()) { + getOutputActionParametersBuilder().mergeFrom(value); + } else { + outputActionParameters_ = value; + } } else { - outputParametersBuilder_.addAllMessages(values); + outputActionParametersBuilder_.mergeFrom(value); } - return this; - } - /** - * - * - *
-     * A list of output parameters generated by the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; - * - */ - public Builder clearOutputParameters() { - if (outputParametersBuilder_ == null) { - outputParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + if (outputActionParameters_ != null) { + bitField0_ |= 0x00000008; onChanged(); - } else { - outputParametersBuilder_.clear(); } return this; } @@ -1698,136 +1295,85 @@ public Builder clearOutputParameters() { * * *
-     * A list of output parameters generated by the action.
+     * Optional. A list of output parameters generated by the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder removeOutputParameters(int index) { - if (outputParametersBuilder_ == null) { - ensureOutputParametersIsMutable(); - outputParameters_.remove(index); - onChanged(); - } else { - outputParametersBuilder_.remove(index); + public Builder clearOutputActionParameters() { + bitField0_ = (bitField0_ & ~0x00000008); + outputActionParameters_ = null; + if (outputActionParametersBuilder_ != null) { + outputActionParametersBuilder_.dispose(); + outputActionParametersBuilder_ = null; } + onChanged(); return this; } /** * * *
-     * A list of output parameters generated by the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder - getOutputParametersBuilder(int index) { - return getOutputParametersFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * A list of output parameters generated by the action.
+     * Optional. A list of output parameters generated by the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder - getOutputParametersOrBuilder(int index) { - if (outputParametersBuilder_ == null) { - return outputParameters_.get(index); - } else { - return outputParametersBuilder_.getMessageOrBuilder(index); - } + public com.google.protobuf.Struct.Builder getOutputActionParametersBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getOutputActionParametersFieldBuilder().getBuilder(); } /** * * *
-     * A list of output parameters generated by the action.
+     * Optional. A list of output parameters generated by the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getOutputParametersOrBuilderList() { - if (outputParametersBuilder_ != null) { - return outputParametersBuilder_.getMessageOrBuilderList(); + public com.google.protobuf.StructOrBuilder getOutputActionParametersOrBuilder() { + if (outputActionParametersBuilder_ != null) { + return outputActionParametersBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(outputParameters_); + return outputActionParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputActionParameters_; } } /** * * *
-     * A list of output parameters generated by the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder - addOutputParametersBuilder() { - return getOutputParametersFieldBuilder() - .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); - } - /** - * - * - *
-     * A list of output parameters generated by the action.
+     * Optional. A list of output parameters generated by the action.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; - * - */ - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder - addOutputParametersBuilder(int index) { - return getOutputParametersFieldBuilder() - .addBuilder( - index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); - } - /** - * - * - *
-     * A list of output parameters generated by the action.
-     * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getOutputParametersBuilderList() { - return getOutputParametersFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> - getOutputParametersFieldBuilder() { - if (outputParametersBuilder_ == null) { - outputParametersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder>( - outputParameters_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - outputParameters_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getOutputActionParametersFieldBuilder() { + if (outputActionParametersBuilder_ == null) { + outputActionParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getOutputActionParameters(), getParentForChildren(), isClean()); + outputActionParameters_ = null; } - return outputParametersBuilder_; + return outputActionParametersBuilder_; } @java.lang.Override diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolUseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolUseOrBuilder.java index d5b5440b04f7..20f856f2769e 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolUseOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolUseOrBuilder.java @@ -86,110 +86,81 @@ public interface ToolUseOrBuilder * * *
-   * A list of input parameters for the action.
+   * Optional. A list of input parameters for the action.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; - */ - java.util.List getInputParametersList(); - /** - * - * - *
-   * A list of input parameters for the action.
-   * 
+ * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * @return Whether the inputActionParameters field is set. */ - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getInputParameters(int index); + boolean hasInputActionParameters(); /** * * *
-   * A list of input parameters for the action.
+   * Optional. A list of input parameters for the action.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; - */ - int getInputParametersCount(); - /** - * - * - *
-   * A list of input parameters for the action.
-   * 
+ * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * @return The inputActionParameters. */ - java.util.List - getInputParametersOrBuilderList(); + com.google.protobuf.Struct getInputActionParameters(); /** * * *
-   * A list of input parameters for the action.
+   * Optional. A list of input parameters for the action.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + * .google.protobuf.Struct input_action_parameters = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getInputParametersOrBuilder( - int index); + com.google.protobuf.StructOrBuilder getInputActionParametersOrBuilder(); /** * * *
-   * A list of output parameters generated by the action.
+   * Optional. A list of output parameters generated by the action.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * - */ - java.util.List getOutputParametersList(); - /** * - * - *
-   * A list of output parameters generated by the action.
-   * 
- * - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; - * + * @return Whether the outputActionParameters field is set. */ - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getOutputParameters(int index); + boolean hasOutputActionParameters(); /** * * *
-   * A list of output parameters generated by the action.
+   * Optional. A list of output parameters generated by the action.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * - */ - int getOutputParametersCount(); - /** - * - * - *
-   * A list of output parameters generated by the action.
-   * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; - * + * @return The outputActionParameters. */ - java.util.List - getOutputParametersOrBuilderList(); + com.google.protobuf.Struct getOutputActionParameters(); /** * * *
-   * A list of output parameters generated by the action.
+   * Optional. A list of output parameters generated by the action.
    * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + * .google.protobuf.Struct output_action_parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getOutputParametersOrBuilder( - int index); + com.google.protobuf.StructOrBuilder getOutputActionParametersOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto index d38b16075c64..18806c4109e6 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto @@ -77,6 +77,12 @@ message AdvancedSettings { // The digit that terminates a DTMF digit sequence. string finish_digit = 3; + + // Interdigit timeout setting for matching dtmf input to regex. + google.protobuf.Duration interdigit_timeout_duration = 6; + + // Endpoint timeout setting for matching dtmf input to regex. + google.protobuf.Duration endpointing_timeout_duration = 7; } // Define behaviors on logging. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto index a8e7a1dc1d22..55f8c350a285 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto @@ -314,30 +314,29 @@ message Agent { // Speech recognition related settings. SpeechToTextSettings speech_to_text_settings = 13; - // Immutable. Name of the start flow in this agent. A start flow will be - // automatically created when the agent is created, and can only be deleted by - // deleting the agent. Format: `projects//locations//agents//flows/`. - string start_flow = 16 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } - ]; - - // Optional. Name of the start playbook in this agent. A start playbook will - // be automatically created when the agent is created, and can only be deleted - // by deleting the agent. - // Format: `projects//locations//agents//playbooks/`. Currently only the - // default playbook with id - // "00000000-0000-0000-0000-000000000000" is allowed. - // - // Only one of `start_flow` or `start_playbook` should be set, but not both. - string start_playbook = 39 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { + // The resource to start the conversations with for the agent. + oneof session_entry_resource { + // Name of the start flow in this agent. A start flow will be automatically + // created when the agent is created, and can only be deleted by deleting + // the agent. + // Format: `projects//locations//agents//flows/`. Currently only the default start + // flow with id "00000000-0000-0000-0000-000000000000" is allowed. + string start_flow = 16 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + }]; + + // Name of the start playbook in this agent. A start playbook will be + // automatically created when the agent is created, and can only be deleted + // by deleting the agent. + // Format: `projects//locations//agents//playbooks/`. Currently only the + // default playbook with id + // "00000000-0000-0000-0000-000000000000" is allowed. + string start_playbook = 39 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Playbook" - } - ]; + }]; + } // Name of the // [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/example.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/example.proto index aa37939ac204..b36539e44179 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/example.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/example.proto @@ -243,8 +243,8 @@ message PlaybookInput { string preceding_conversation_summary = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A list of input parameters for the invocation. - repeated ActionParameter parameters = 2 + // Optional. A list of input parameters for the action. + google.protobuf.Struct action_parameters = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -253,8 +253,8 @@ message PlaybookOutput { // Optional. Summary string of the execution result of the child playbook. string execution_summary = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A list of output parameters for the invocation. - repeated ActionParameter parameters = 3 + // Optional. A Struct object of output parameters for the action. + google.protobuf.Struct action_parameters = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -307,20 +307,13 @@ message ToolUse { // Optional. Name of the action to be called during the tool use. string action = 2 [(google.api.field_behavior) = OPTIONAL]; - // A list of input parameters for the action. - repeated ActionParameter input_parameters = 3; - - // A list of output parameters generated by the action. - repeated ActionParameter output_parameters = 4; -} - -// Parameter associated with action. -message ActionParameter { - // Required. Name of the parameter. - string name = 1 [(google.api.field_behavior) = REQUIRED]; + // Optional. A list of input parameters for the action. + google.protobuf.Struct input_action_parameters = 5 + [(google.api.field_behavior) = OPTIONAL]; - // Required. Value of the parameter. - google.protobuf.Value value = 2 [(google.api.field_behavior) = REQUIRED]; + // Optional. A list of output parameters generated by the action. + google.protobuf.Struct output_action_parameters = 6 + [(google.api.field_behavior) = OPTIONAL]; } // Stores metadata of the invocation of a child playbook. @@ -357,11 +350,13 @@ message FlowInvocation { (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } ]; - // A list of input parameters for the flow invocation. - repeated ActionParameter input_parameters = 2; + // Optional. A list of input parameters for the flow. + google.protobuf.Struct input_action_parameters = 5 + [(google.api.field_behavior) = OPTIONAL]; - // A list of output parameters generated by the flow invocation. - repeated ActionParameter output_parameters = 3; + // Optional. A list of output parameters generated by the flow invocation. + google.protobuf.Struct output_action_parameters = 6 + [(google.api.field_behavior) = OPTIONAL]; // Required. Flow invocation's output state. OutputState flow_state = 4 [(google.api.field_behavior) = REQUIRED]; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/playbook.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/playbook.proto index 22951cb9e54d..8fa20b534746 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/playbook.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/playbook.proto @@ -235,6 +235,13 @@ message Playbook { repeated Step steps = 2; } + // Message of the Instruction of the playbook. + message Instruction { + // Ordered list of step by step execution instructions to accomplish + // target goal. + repeated Step steps = 2; + } + // The unique identifier of the playbook. // Format: `projects//locations//agents//playbooks/`. @@ -255,9 +262,8 @@ message Playbook { repeated google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(google.api.field_behavior) = OPTIONAL]; - // Ordered list of step by step execution instructions to accomplish - // target goal. - repeated Step steps = 4; + // Instruction to accomplish target goal. + Instruction instruction = 17; // Output only. Estimated number of tokes current playbook takes when sent to // the LLM. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto index 32d75c348a8e..5410b972d30a 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/response_message.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.dialogflow.cx.v3beta1; import "google/api/field_behavior.proto"; +import "google/cloud/dialogflow/cx/v3beta1/tool_call.proto"; import "google/protobuf/struct.proto"; option cc_enable_arenas = true; @@ -235,6 +236,10 @@ message ResponseMessage { // Represents info card for knowledge answers, to be better rendered in // Dialogflow Messenger. KnowledgeInfoCard knowledge_info_card = 20; + + // Returns the definition of a tool call that should be executed by the + // client. + google.cloud.dialogflow.cx.v3beta1.ToolCall tool_call = 22; } // The channel which the response is associated with. Clients can specify the diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto index 4d7de79b88cd..2a2b4f3921c1 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/security_settings.proto @@ -276,6 +276,10 @@ message SecuritySettings { // File format for exported audio file. Currently only in telephony // recordings. AudioFormat audio_format = 4; + + // Whether to store TTS audio. By default, TTS audio from the virtual agent + // is not exported. + bool store_tts_audio = 6; } // Settings for exporting conversations to diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto index 828e4cf65c73..ec2f13709f06 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto @@ -1141,6 +1141,10 @@ message Match { // The query directly triggered an event. EVENT = 6; + + // The query was handled by a + // [`Playbook`][google.cloud.dialogflow.cx.v3beta1.Playbook]. + PLAYBOOK = 9; } // The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that matched the diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/tool.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/tool.proto index b6b86f031c8f..0f16ab483772 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/tool.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/tool.proto @@ -455,12 +455,6 @@ message Tool { // Required. High level description of the Tool and its usage. string description = 3 [(google.api.field_behavior) = REQUIRED]; - // The list of derived action names for the tool. - repeated string actions = 6 [deprecated = true]; - - // The list of derived type schemas for the tool. - repeated string schemas = 7 [deprecated = true]; - // Specification of the Tool. oneof specification { // OpenAPI specification of the Tool. diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/tool_call.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/tool_call.proto index 6779f2bdf30c..7d88c269ce28 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/tool_call.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/tool_call.proto @@ -31,6 +31,22 @@ option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; option objc_class_prefix = "DF"; option ruby_package = "Google::Cloud::Dialogflow::CX::V3beta1"; +// Represents a call of a specific tool's action with the specified inputs. +message ToolCall { + // The [tool][Tool] associated with this call. + // Format: `projects//locations//agents//tools/`. + string tool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + // The name of the tool's action associated with this call. + string action = 2 [(google.api.field_behavior) = REQUIRED]; + // The action's input parameters. + google.protobuf.Struct input_parameters = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + // The result of calling a tool's action that has been executed by the client. message ToolCallResult { // The [tool][Tool] associated with this call. diff --git a/java-redis-cluster/README.md b/java-redis-cluster/README.md index f5af4280243a..168fa5074c28 100644 --- a/java-redis-cluster/README.md +++ b/java-redis-cluster/README.md @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-redis-cluster.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-redis-cluster/0.16.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-redis-cluster/0.17.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClient.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClient.java index 1d44df144aaf..56fce92012fa 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClient.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClient.java @@ -208,6 +208,25 @@ * * * + *

GetClusterCertificateAuthority + *

Gets the details of certificate authority information for Redis cluster. + * + *

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

+ *
    + *
  • getClusterCertificateAuthority(GetClusterCertificateAuthorityRequest request) + *

+ *

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

+ *
    + *
  • getClusterCertificateAuthority(CertificateAuthorityName name) + *

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

+ *
    + *
  • getClusterCertificateAuthorityCallable() + *

+ * + * + * *

ListLocations *

Lists information about the supported locations for this service. * @@ -1199,6 +1218,128 @@ public final UnaryCallable createClusterCallabl return stub.createClusterCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of certificate authority information for Redis cluster. + * + *

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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   CertificateAuthorityName name =
+   *       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   CertificateAuthority response = cloudRedisClusterClient.getClusterCertificateAuthority(name);
+   * }
+   * }
+ * + * @param name Required. Redis cluster certificate authority resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` + * where `location_id` refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CertificateAuthority getClusterCertificateAuthority(CertificateAuthorityName name) { + GetClusterCertificateAuthorityRequest request = + GetClusterCertificateAuthorityRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getClusterCertificateAuthority(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of certificate authority information for Redis cluster. + * + *

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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   String name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   CertificateAuthority response = cloudRedisClusterClient.getClusterCertificateAuthority(name);
+   * }
+   * }
+ * + * @param name Required. Redis cluster certificate authority resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` + * where `location_id` refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CertificateAuthority getClusterCertificateAuthority(String name) { + GetClusterCertificateAuthorityRequest request = + GetClusterCertificateAuthorityRequest.newBuilder().setName(name).build(); + return getClusterCertificateAuthority(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of certificate authority information for Redis cluster. + * + *

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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   GetClusterCertificateAuthorityRequest request =
+   *       GetClusterCertificateAuthorityRequest.newBuilder()
+   *           .setName(
+   *               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .build();
+   *   CertificateAuthority response =
+   *       cloudRedisClusterClient.getClusterCertificateAuthority(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 CertificateAuthority getClusterCertificateAuthority( + GetClusterCertificateAuthorityRequest request) { + return getClusterCertificateAuthorityCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of certificate authority information for Redis cluster. + * + *

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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   GetClusterCertificateAuthorityRequest request =
+   *       GetClusterCertificateAuthorityRequest.newBuilder()
+   *           .setName(
+   *               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudRedisClusterClient.getClusterCertificateAuthorityCallable().futureCall(request);
+   *   // Do something.
+   *   CertificateAuthority response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getClusterCertificateAuthorityCallable() { + return stub.getClusterCertificateAuthorityCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterSettings.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterSettings.java index 9e08cf487120..e276eb56f725 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterSettings.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterSettings.java @@ -127,6 +127,13 @@ public UnaryCallSettings createClusterSettings( return ((CloudRedisClusterStubSettings) getStubSettings()).createClusterOperationSettings(); } + /** Returns the object with the settings used for calls to getClusterCertificateAuthority. */ + public UnaryCallSettings + getClusterCertificateAuthoritySettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()) + .getClusterCertificateAuthoritySettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -295,6 +302,12 @@ public UnaryCallSettings.Builder createClusterS return getStubSettingsBuilder().createClusterOperationSettings(); } + /** Returns the builder for the settings used for calls to getClusterCertificateAuthority. */ + public UnaryCallSettings.Builder + getClusterCertificateAuthoritySettings() { + return getStubSettingsBuilder().getClusterCertificateAuthoritySettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/gapic_metadata.json b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/gapic_metadata.json index 58d43a0ef8e8..1655578413e0 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/gapic_metadata.json +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/gapic_metadata.json @@ -19,6 +19,9 @@ "GetCluster": { "methods": ["getCluster", "getCluster", "getCluster", "getClusterCallable"] }, + "GetClusterCertificateAuthority": { + "methods": ["getClusterCertificateAuthority", "getClusterCertificateAuthority", "getClusterCertificateAuthority", "getClusterCertificateAuthorityCallable"] + }, "GetLocation": { "methods": ["getLocation", "getLocationCallable"] }, diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStub.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStub.java index 50ac4561ffaa..e8fcf28751a9 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStub.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStub.java @@ -26,9 +26,11 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.CertificateAuthority; import com.google.cloud.redis.cluster.v1.Cluster; import com.google.cloud.redis.cluster.v1.CreateClusterRequest; import com.google.cloud.redis.cluster.v1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest; import com.google.cloud.redis.cluster.v1.GetClusterRequest; import com.google.cloud.redis.cluster.v1.ListClustersRequest; import com.google.cloud.redis.cluster.v1.ListClustersResponse; @@ -92,6 +94,12 @@ public UnaryCallable createClusterCallable() { throw new UnsupportedOperationException("Not implemented: createClusterCallable()"); } + public UnaryCallable + getClusterCertificateAuthorityCallable() { + throw new UnsupportedOperationException( + "Not implemented: getClusterCertificateAuthorityCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStubSettings.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStubSettings.java index 3a88a783b8c4..74ed5d7a6cf2 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStubSettings.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStubSettings.java @@ -52,9 +52,11 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.CertificateAuthority; import com.google.cloud.redis.cluster.v1.Cluster; import com.google.cloud.redis.cluster.v1.CreateClusterRequest; import com.google.cloud.redis.cluster.v1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest; import com.google.cloud.redis.cluster.v1.GetClusterRequest; import com.google.cloud.redis.cluster.v1.ListClustersRequest; import com.google.cloud.redis.cluster.v1.ListClustersResponse; @@ -128,6 +130,8 @@ public class CloudRedisClusterStubSettings extends StubSettings createClusterSettings; private final OperationCallSettings createClusterOperationSettings; + private final UnaryCallSettings + getClusterCertificateAuthoritySettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -282,6 +286,12 @@ public UnaryCallSettings createClusterSettings( return createClusterOperationSettings; } + /** Returns the object with the settings used for calls to getClusterCertificateAuthority. */ + public UnaryCallSettings + getClusterCertificateAuthoritySettings() { + return getClusterCertificateAuthoritySettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -411,6 +421,8 @@ protected CloudRedisClusterStubSettings(Builder settingsBuilder) throws IOExcept deleteClusterOperationSettings = settingsBuilder.deleteClusterOperationSettings().build(); createClusterSettings = settingsBuilder.createClusterSettings().build(); createClusterOperationSettings = settingsBuilder.createClusterOperationSettings().build(); + getClusterCertificateAuthoritySettings = + settingsBuilder.getClusterCertificateAuthoritySettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -431,6 +443,9 @@ public static class Builder extends StubSettings.Builder createClusterSettings; private final OperationCallSettings.Builder createClusterOperationSettings; + private final UnaryCallSettings.Builder< + GetClusterCertificateAuthorityRequest, CertificateAuthority> + getClusterCertificateAuthoritySettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -480,6 +495,7 @@ protected Builder(ClientContext clientContext) { deleteClusterOperationSettings = OperationCallSettings.newBuilder(); createClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createClusterOperationSettings = OperationCallSettings.newBuilder(); + getClusterCertificateAuthoritySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -490,6 +506,7 @@ protected Builder(ClientContext clientContext) { updateClusterSettings, deleteClusterSettings, createClusterSettings, + getClusterCertificateAuthoritySettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -506,6 +523,8 @@ protected Builder(CloudRedisClusterStubSettings settings) { deleteClusterOperationSettings = settings.deleteClusterOperationSettings.toBuilder(); createClusterSettings = settings.createClusterSettings.toBuilder(); createClusterOperationSettings = settings.createClusterOperationSettings.toBuilder(); + getClusterCertificateAuthoritySettings = + settings.getClusterCertificateAuthoritySettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -516,6 +535,7 @@ protected Builder(CloudRedisClusterStubSettings settings) { updateClusterSettings, deleteClusterSettings, createClusterSettings, + getClusterCertificateAuthoritySettings, listLocationsSettings, getLocationSettings); } @@ -570,6 +590,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .getClusterCertificateAuthoritySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -712,6 +737,12 @@ public UnaryCallSettings.Builder createClusterS return createClusterOperationSettings; } + /** Returns the builder for the settings used for calls to getClusterCertificateAuthority. */ + public UnaryCallSettings.Builder + getClusterCertificateAuthoritySettings() { + return getClusterCertificateAuthoritySettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/GrpcCloudRedisClusterStub.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/GrpcCloudRedisClusterStub.java index e37c580cf92e..47d842159f06 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/GrpcCloudRedisClusterStub.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/GrpcCloudRedisClusterStub.java @@ -31,9 +31,11 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.CertificateAuthority; import com.google.cloud.redis.cluster.v1.Cluster; import com.google.cloud.redis.cluster.v1.CreateClusterRequest; import com.google.cloud.redis.cluster.v1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest; import com.google.cloud.redis.cluster.v1.GetClusterRequest; import com.google.cloud.redis.cluster.v1.ListClustersRequest; import com.google.cloud.redis.cluster.v1.ListClustersResponse; @@ -104,6 +106,18 @@ public class GrpcCloudRedisClusterStub extends CloudRedisClusterStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + getClusterCertificateAuthorityMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.redis.cluster.v1.CloudRedisCluster/GetClusterCertificateAuthority") + .setRequestMarshaller( + ProtoUtils.marshaller(GetClusterCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(CertificateAuthority.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -135,6 +149,8 @@ public class GrpcCloudRedisClusterStub extends CloudRedisClusterStub { private final UnaryCallable createClusterCallable; private final OperationCallable createClusterOperationCallable; + private final UnaryCallable + getClusterCertificateAuthorityCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -234,6 +250,18 @@ protected GrpcCloudRedisClusterStub( return builder.build(); }) .build(); + GrpcCallSettings + getClusterCertificateAuthorityTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getClusterCertificateAuthorityMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -291,6 +319,11 @@ protected GrpcCloudRedisClusterStub( settings.createClusterOperationSettings(), clientContext, operationsStub); + this.getClusterCertificateAuthorityCallable = + callableFactory.createUnaryCallable( + getClusterCertificateAuthorityTransportSettings, + settings.getClusterCertificateAuthoritySettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -354,6 +387,12 @@ public OperationCallable createClusterOperat return createClusterOperationCallable; } + @Override + public UnaryCallable + getClusterCertificateAuthorityCallable() { + return getClusterCertificateAuthorityCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/HttpJsonCloudRedisClusterStub.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/HttpJsonCloudRedisClusterStub.java index 1d22440b535f..8208eaff7e75 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/HttpJsonCloudRedisClusterStub.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/HttpJsonCloudRedisClusterStub.java @@ -39,9 +39,11 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.CertificateAuthority; import com.google.cloud.redis.cluster.v1.Cluster; import com.google.cloud.redis.cluster.v1.CreateClusterRequest; import com.google.cloud.redis.cluster.v1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest; import com.google.cloud.redis.cluster.v1.GetClusterRequest; import com.google.cloud.redis.cluster.v1.ListClustersRequest; import com.google.cloud.redis.cluster.v1.ListClustersResponse; @@ -266,6 +268,43 @@ public class HttpJsonCloudRedisClusterStub extends CloudRedisClusterStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor< + GetClusterCertificateAuthorityRequest, CertificateAuthority> + getClusterCertificateAuthorityMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.redis.cluster.v1.CloudRedisCluster/GetClusterCertificateAuthority") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/certificateAuthority}", + 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(CertificateAuthority.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -346,6 +385,8 @@ public class HttpJsonCloudRedisClusterStub extends CloudRedisClusterStub { private final UnaryCallable createClusterCallable; private final OperationCallable createClusterOperationCallable; + private final UnaryCallable + getClusterCertificateAuthorityCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -476,6 +517,19 @@ protected HttpJsonCloudRedisClusterStub( return builder.build(); }) .build(); + HttpJsonCallSettings + getClusterCertificateAuthorityTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getClusterCertificateAuthorityMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -536,6 +590,11 @@ protected HttpJsonCloudRedisClusterStub( settings.createClusterOperationSettings(), clientContext, httpJsonOperationsStub); + this.getClusterCertificateAuthorityCallable = + callableFactory.createUnaryCallable( + getClusterCertificateAuthorityTransportSettings, + settings.getClusterCertificateAuthoritySettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -558,6 +617,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(updateClusterMethodDescriptor); methodDescriptors.add(deleteClusterMethodDescriptor); methodDescriptors.add(createClusterMethodDescriptor); + methodDescriptors.add(getClusterCertificateAuthorityMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -612,6 +672,12 @@ public OperationCallable createClusterOperat return createClusterOperationCallable; } + @Override + public UnaryCallable + getClusterCertificateAuthorityCallable() { + return getClusterCertificateAuthorityCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClient.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClient.java index 28a62bd6975a..135afd3da29c 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClient.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClient.java @@ -208,6 +208,25 @@ * * * + *

GetClusterCertificateAuthority + *

Gets the details of certificate authority information for Redis cluster. + * + *

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

+ *
    + *
  • getClusterCertificateAuthority(GetClusterCertificateAuthorityRequest request) + *

+ *

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

+ *
    + *
  • getClusterCertificateAuthority(CertificateAuthorityName name) + *

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

+ *
    + *
  • getClusterCertificateAuthorityCallable() + *

+ * + * + * *

ListLocations *

Lists information about the supported locations for this service. * @@ -1200,6 +1219,128 @@ public final UnaryCallable createClusterCallabl return stub.createClusterCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of certificate authority information for Redis cluster. + * + *

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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   CertificateAuthorityName name =
+   *       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   CertificateAuthority response = cloudRedisClusterClient.getClusterCertificateAuthority(name);
+   * }
+   * }
+ * + * @param name Required. Redis cluster certificate authority resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` + * where `location_id` refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CertificateAuthority getClusterCertificateAuthority(CertificateAuthorityName name) { + GetClusterCertificateAuthorityRequest request = + GetClusterCertificateAuthorityRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getClusterCertificateAuthority(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of certificate authority information for Redis cluster. + * + *

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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   String name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   CertificateAuthority response = cloudRedisClusterClient.getClusterCertificateAuthority(name);
+   * }
+   * }
+ * + * @param name Required. Redis cluster certificate authority resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` + * where `location_id` refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CertificateAuthority getClusterCertificateAuthority(String name) { + GetClusterCertificateAuthorityRequest request = + GetClusterCertificateAuthorityRequest.newBuilder().setName(name).build(); + return getClusterCertificateAuthority(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of certificate authority information for Redis cluster. + * + *

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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   GetClusterCertificateAuthorityRequest request =
+   *       GetClusterCertificateAuthorityRequest.newBuilder()
+   *           .setName(
+   *               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .build();
+   *   CertificateAuthority response =
+   *       cloudRedisClusterClient.getClusterCertificateAuthority(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 CertificateAuthority getClusterCertificateAuthority( + GetClusterCertificateAuthorityRequest request) { + return getClusterCertificateAuthorityCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of certificate authority information for Redis cluster. + * + *

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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   GetClusterCertificateAuthorityRequest request =
+   *       GetClusterCertificateAuthorityRequest.newBuilder()
+   *           .setName(
+   *               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudRedisClusterClient.getClusterCertificateAuthorityCallable().futureCall(request);
+   *   // Do something.
+   *   CertificateAuthority response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getClusterCertificateAuthorityCallable() { + return stub.getClusterCertificateAuthorityCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterSettings.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterSettings.java index 6b0ba982d744..8ac84de96bb3 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterSettings.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterSettings.java @@ -128,6 +128,13 @@ public UnaryCallSettings createClusterSettings( return ((CloudRedisClusterStubSettings) getStubSettings()).createClusterOperationSettings(); } + /** Returns the object with the settings used for calls to getClusterCertificateAuthority. */ + public UnaryCallSettings + getClusterCertificateAuthoritySettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()) + .getClusterCertificateAuthoritySettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -296,6 +303,12 @@ public UnaryCallSettings.Builder createClusterS return getStubSettingsBuilder().createClusterOperationSettings(); } + /** Returns the builder for the settings used for calls to getClusterCertificateAuthority. */ + public UnaryCallSettings.Builder + getClusterCertificateAuthoritySettings() { + return getStubSettingsBuilder().getClusterCertificateAuthoritySettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/gapic_metadata.json b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/gapic_metadata.json index 445e44142736..6910347d8402 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/gapic_metadata.json +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/gapic_metadata.json @@ -19,6 +19,9 @@ "GetCluster": { "methods": ["getCluster", "getCluster", "getCluster", "getClusterCallable"] }, + "GetClusterCertificateAuthority": { + "methods": ["getClusterCertificateAuthority", "getClusterCertificateAuthority", "getClusterCertificateAuthority", "getClusterCertificateAuthorityCallable"] + }, "GetLocation": { "methods": ["getLocation", "getLocationCallable"] }, diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStub.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStub.java index b9cacc611c43..7e1c121325b6 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStub.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStub.java @@ -27,9 +27,11 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.CertificateAuthority; import com.google.cloud.redis.cluster.v1beta1.Cluster; import com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest; import com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest; import com.google.cloud.redis.cluster.v1beta1.GetClusterRequest; import com.google.cloud.redis.cluster.v1beta1.ListClustersRequest; import com.google.cloud.redis.cluster.v1beta1.ListClustersResponse; @@ -94,6 +96,12 @@ public UnaryCallable createClusterCallable() { throw new UnsupportedOperationException("Not implemented: createClusterCallable()"); } + public UnaryCallable + getClusterCertificateAuthorityCallable() { + throw new UnsupportedOperationException( + "Not implemented: getClusterCertificateAuthorityCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStubSettings.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStubSettings.java index 4b2434c598f3..d0b8819a60fb 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStubSettings.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStubSettings.java @@ -52,9 +52,11 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.CertificateAuthority; import com.google.cloud.redis.cluster.v1beta1.Cluster; import com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest; import com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest; import com.google.cloud.redis.cluster.v1beta1.GetClusterRequest; import com.google.cloud.redis.cluster.v1beta1.ListClustersRequest; import com.google.cloud.redis.cluster.v1beta1.ListClustersResponse; @@ -129,6 +131,8 @@ public class CloudRedisClusterStubSettings extends StubSettings createClusterSettings; private final OperationCallSettings createClusterOperationSettings; + private final UnaryCallSettings + getClusterCertificateAuthoritySettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -283,6 +287,12 @@ public UnaryCallSettings createClusterSettings( return createClusterOperationSettings; } + /** Returns the object with the settings used for calls to getClusterCertificateAuthority. */ + public UnaryCallSettings + getClusterCertificateAuthoritySettings() { + return getClusterCertificateAuthoritySettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -412,6 +422,8 @@ protected CloudRedisClusterStubSettings(Builder settingsBuilder) throws IOExcept deleteClusterOperationSettings = settingsBuilder.deleteClusterOperationSettings().build(); createClusterSettings = settingsBuilder.createClusterSettings().build(); createClusterOperationSettings = settingsBuilder.createClusterOperationSettings().build(); + getClusterCertificateAuthoritySettings = + settingsBuilder.getClusterCertificateAuthoritySettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -432,6 +444,9 @@ public static class Builder extends StubSettings.Builder createClusterSettings; private final OperationCallSettings.Builder createClusterOperationSettings; + private final UnaryCallSettings.Builder< + GetClusterCertificateAuthorityRequest, CertificateAuthority> + getClusterCertificateAuthoritySettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -481,6 +496,7 @@ protected Builder(ClientContext clientContext) { deleteClusterOperationSettings = OperationCallSettings.newBuilder(); createClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createClusterOperationSettings = OperationCallSettings.newBuilder(); + getClusterCertificateAuthoritySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -491,6 +507,7 @@ protected Builder(ClientContext clientContext) { updateClusterSettings, deleteClusterSettings, createClusterSettings, + getClusterCertificateAuthoritySettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -507,6 +524,8 @@ protected Builder(CloudRedisClusterStubSettings settings) { deleteClusterOperationSettings = settings.deleteClusterOperationSettings.toBuilder(); createClusterSettings = settings.createClusterSettings.toBuilder(); createClusterOperationSettings = settings.createClusterOperationSettings.toBuilder(); + getClusterCertificateAuthoritySettings = + settings.getClusterCertificateAuthoritySettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -517,6 +536,7 @@ protected Builder(CloudRedisClusterStubSettings settings) { updateClusterSettings, deleteClusterSettings, createClusterSettings, + getClusterCertificateAuthoritySettings, listLocationsSettings, getLocationSettings); } @@ -571,6 +591,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .getClusterCertificateAuthoritySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -713,6 +738,12 @@ public UnaryCallSettings.Builder createClusterS return createClusterOperationSettings; } + /** Returns the builder for the settings used for calls to getClusterCertificateAuthority. */ + public UnaryCallSettings.Builder + getClusterCertificateAuthoritySettings() { + return getClusterCertificateAuthoritySettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/GrpcCloudRedisClusterStub.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/GrpcCloudRedisClusterStub.java index 15a02d3587d1..47b6bfef0f57 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/GrpcCloudRedisClusterStub.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/GrpcCloudRedisClusterStub.java @@ -32,9 +32,11 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.CertificateAuthority; import com.google.cloud.redis.cluster.v1beta1.Cluster; import com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest; import com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest; import com.google.cloud.redis.cluster.v1beta1.GetClusterRequest; import com.google.cloud.redis.cluster.v1beta1.ListClustersRequest; import com.google.cloud.redis.cluster.v1beta1.ListClustersResponse; @@ -110,6 +112,18 @@ public class GrpcCloudRedisClusterStub extends CloudRedisClusterStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + getClusterCertificateAuthorityMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.redis.cluster.v1beta1.CloudRedisCluster/GetClusterCertificateAuthority") + .setRequestMarshaller( + ProtoUtils.marshaller(GetClusterCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(CertificateAuthority.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -141,6 +155,8 @@ public class GrpcCloudRedisClusterStub extends CloudRedisClusterStub { private final UnaryCallable createClusterCallable; private final OperationCallable createClusterOperationCallable; + private final UnaryCallable + getClusterCertificateAuthorityCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -240,6 +256,18 @@ protected GrpcCloudRedisClusterStub( return builder.build(); }) .build(); + GrpcCallSettings + getClusterCertificateAuthorityTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getClusterCertificateAuthorityMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -297,6 +325,11 @@ protected GrpcCloudRedisClusterStub( settings.createClusterOperationSettings(), clientContext, operationsStub); + this.getClusterCertificateAuthorityCallable = + callableFactory.createUnaryCallable( + getClusterCertificateAuthorityTransportSettings, + settings.getClusterCertificateAuthoritySettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -360,6 +393,12 @@ public OperationCallable createClusterOperat return createClusterOperationCallable; } + @Override + public UnaryCallable + getClusterCertificateAuthorityCallable() { + return getClusterCertificateAuthorityCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/HttpJsonCloudRedisClusterStub.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/HttpJsonCloudRedisClusterStub.java index f6b166205b3a..c7139f6d0699 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/HttpJsonCloudRedisClusterStub.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/HttpJsonCloudRedisClusterStub.java @@ -40,9 +40,11 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.CertificateAuthority; import com.google.cloud.redis.cluster.v1beta1.Cluster; import com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest; import com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest; import com.google.cloud.redis.cluster.v1beta1.GetClusterRequest; import com.google.cloud.redis.cluster.v1beta1.ListClustersRequest; import com.google.cloud.redis.cluster.v1beta1.ListClustersResponse; @@ -272,6 +274,43 @@ public class HttpJsonCloudRedisClusterStub extends CloudRedisClusterStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor< + GetClusterCertificateAuthorityRequest, CertificateAuthority> + getClusterCertificateAuthorityMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.redis.cluster.v1beta1.CloudRedisCluster/GetClusterCertificateAuthority") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{name=projects/*/locations/*/clusters/*/certificateAuthority}", + 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(CertificateAuthority.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -352,6 +391,8 @@ public class HttpJsonCloudRedisClusterStub extends CloudRedisClusterStub { private final UnaryCallable createClusterCallable; private final OperationCallable createClusterOperationCallable; + private final UnaryCallable + getClusterCertificateAuthorityCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -482,6 +523,19 @@ protected HttpJsonCloudRedisClusterStub( return builder.build(); }) .build(); + HttpJsonCallSettings + getClusterCertificateAuthorityTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getClusterCertificateAuthorityMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -542,6 +596,11 @@ protected HttpJsonCloudRedisClusterStub( settings.createClusterOperationSettings(), clientContext, httpJsonOperationsStub); + this.getClusterCertificateAuthorityCallable = + callableFactory.createUnaryCallable( + getClusterCertificateAuthorityTransportSettings, + settings.getClusterCertificateAuthoritySettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -564,6 +623,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(updateClusterMethodDescriptor); methodDescriptors.add(deleteClusterMethodDescriptor); methodDescriptors.add(createClusterMethodDescriptor); + methodDescriptors.add(getClusterCertificateAuthorityMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -618,6 +678,12 @@ public OperationCallable createClusterOperat return createClusterOperationCallable; } + @Override + public UnaryCallable + getClusterCertificateAuthorityCallable() { + return getClusterCertificateAuthorityCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/resources/META-INF/native-image/com.google.cloud.redis.cluster.v1/reflect-config.json b/java-redis-cluster/google-cloud-redis-cluster/src/main/resources/META-INF/native-image/com.google.cloud.redis.cluster.v1/reflect-config.json index 45190487b10f..b1de9ee5eb87 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/resources/META-INF/native-image/com.google.cloud.redis.cluster.v1/reflect-config.json +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/resources/META-INF/native-image/com.google.cloud.redis.cluster.v1/reflect-config.json @@ -458,6 +458,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.redis.cluster.v1.CertificateAuthority", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.CertificateAuthority$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.CertificateAuthority$ManagedCertificateAuthority", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.CertificateAuthority$ManagedCertificateAuthority$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.CertificateAuthority$ManagedCertificateAuthority$CertChain", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.CertificateAuthority$ManagedCertificateAuthority$CertChain$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.redis.cluster.v1.Cluster", "queryAllDeclaredConstructors": true, @@ -521,6 +575,87 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig$AOFConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig$AOFConfig$AppendFsync", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig$AOFConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig$PersistenceMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig$RDBConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig$RDBConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig$RDBConfig$SnapshotPeriod", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.redis.cluster.v1.CreateClusterRequest", "queryAllDeclaredConstructors": true, @@ -575,6 +710,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.redis.cluster.v1.GetClusterRequest", "queryAllDeclaredConstructors": true, @@ -629,6 +782,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.redis.cluster.v1.NodeType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.redis.cluster.v1.OperationMetadata", "queryAllDeclaredConstructors": true, @@ -710,6 +872,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.redis.cluster.v1.ZoneDistributionConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.ZoneDistributionConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.ZoneDistributionConfig$ZoneDistributionMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.longrunning.CancelOperationRequest", "queryAllDeclaredConstructors": true, diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/resources/META-INF/native-image/com.google.cloud.redis.cluster.v1beta1/reflect-config.json b/java-redis-cluster/google-cloud-redis-cluster/src/main/resources/META-INF/native-image/com.google.cloud.redis.cluster.v1beta1/reflect-config.json index b996c3826e20..c0e531226ee9 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/resources/META-INF/native-image/com.google.cloud.redis.cluster.v1beta1/reflect-config.json +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/resources/META-INF/native-image/com.google.cloud.redis.cluster.v1beta1/reflect-config.json @@ -458,6 +458,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.CertificateAuthority", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.CertificateAuthority$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.CertificateAuthority$ManagedCertificateAuthority", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.CertificateAuthority$ManagedCertificateAuthority$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.CertificateAuthority$ManagedCertificateAuthority$CertChain", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.CertificateAuthority$ManagedCertificateAuthority$CertChain$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.redis.cluster.v1beta1.Cluster", "queryAllDeclaredConstructors": true, @@ -521,6 +575,87 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig$AOFConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig$AOFConfig$AppendFsync", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig$AOFConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig$PersistenceMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig$RDBConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig$RDBConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig$RDBConfig$SnapshotPeriod", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest", "queryAllDeclaredConstructors": true, @@ -575,6 +710,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.redis.cluster.v1beta1.GetClusterRequest", "queryAllDeclaredConstructors": true, @@ -629,6 +782,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.NodeType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.redis.cluster.v1beta1.OperationMetadata", "queryAllDeclaredConstructors": true, @@ -710,6 +872,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig$ZoneDistributionMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.longrunning.CancelOperationRequest", "queryAllDeclaredConstructors": true, diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClientHttpJsonTest.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClientHttpJsonTest.java index 89e1740fe348..1f58ba80189d 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClientHttpJsonTest.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClientHttpJsonTest.java @@ -204,6 +204,12 @@ public void getClusterTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); mockService.addResponse(expectedResponse); @@ -259,6 +265,12 @@ public void getClusterTest2() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); mockService.addResponse(expectedResponse); @@ -314,6 +326,12 @@ public void updateClusterTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -337,6 +355,12 @@ public void updateClusterTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -380,6 +404,12 @@ public void updateClusterExceptionTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateClusterAsync(cluster, updateMask).get(); @@ -494,6 +524,12 @@ public void createClusterTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -558,6 +594,12 @@ public void createClusterTest2() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -606,6 +648,98 @@ public void createClusterExceptionTest2() throws Exception { } } + @Test + public void getClusterCertificateAuthorityTest() throws Exception { + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder() + .setName(CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + CertificateAuthority actualResponse = client.getClusterCertificateAuthority(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 getClusterCertificateAuthorityExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.getClusterCertificateAuthority(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterCertificateAuthorityTest2() throws Exception { + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder() + .setName(CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4382/locations/location-4382/clusters/cluster-4382/certificateAuthority"; + + CertificateAuthority actualResponse = client.getClusterCertificateAuthority(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 getClusterCertificateAuthorityExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4382/locations/location-4382/clusters/cluster-4382/certificateAuthority"; + client.getClusterCertificateAuthority(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-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClientTest.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClientTest.java index 94d3f8c1492a..c0b239858df6 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClientTest.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClientTest.java @@ -199,6 +199,12 @@ public void getClusterTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); mockCloudRedisCluster.addResponse(expectedResponse); @@ -248,6 +254,12 @@ public void getClusterTest2() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); mockCloudRedisCluster.addResponse(expectedResponse); @@ -297,6 +309,12 @@ public void updateClusterTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -441,6 +459,12 @@ public void createClusterTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -504,6 +528,12 @@ public void createClusterTest2() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -551,6 +581,86 @@ public void createClusterExceptionTest2() throws Exception { } } + @Test + public void getClusterCertificateAuthorityTest() throws Exception { + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder() + .setName(CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + mockCloudRedisCluster.addResponse(expectedResponse); + + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + CertificateAuthority actualResponse = client.getClusterCertificateAuthority(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetClusterCertificateAuthorityRequest actualRequest = + ((GetClusterCertificateAuthorityRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getClusterCertificateAuthorityExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.getClusterCertificateAuthority(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterCertificateAuthorityTest2() throws Exception { + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder() + .setName(CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + mockCloudRedisCluster.addResponse(expectedResponse); + + String name = "name3373707"; + + CertificateAuthority actualResponse = client.getClusterCertificateAuthority(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetClusterCertificateAuthorityRequest actualRequest = + ((GetClusterCertificateAuthorityRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getClusterCertificateAuthorityExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + String name = "name3373707"; + client.getClusterCertificateAuthority(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-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockCloudRedisClusterImpl.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockCloudRedisClusterImpl.java index 9546be840ca4..9c5bf3ea3ec7 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockCloudRedisClusterImpl.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockCloudRedisClusterImpl.java @@ -162,4 +162,26 @@ public void createCluster( Exception.class.getName()))); } } + + @Override + public void getClusterCertificateAuthority( + GetClusterCertificateAuthorityRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CertificateAuthority) { + requests.add(request); + responseObserver.onNext(((CertificateAuthority) 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 GetClusterCertificateAuthority, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CertificateAuthority.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClientHttpJsonTest.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClientHttpJsonTest.java index 2172200f4322..8d804f5678f7 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClientHttpJsonTest.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClientHttpJsonTest.java @@ -204,6 +204,12 @@ public void getClusterTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); mockService.addResponse(expectedResponse); @@ -259,6 +265,12 @@ public void getClusterTest2() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); mockService.addResponse(expectedResponse); @@ -314,6 +326,12 @@ public void updateClusterTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -337,6 +355,12 @@ public void updateClusterTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -380,6 +404,12 @@ public void updateClusterExceptionTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateClusterAsync(cluster, updateMask).get(); @@ -494,6 +524,12 @@ public void createClusterTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -558,6 +594,12 @@ public void createClusterTest2() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -606,6 +648,98 @@ public void createClusterExceptionTest2() throws Exception { } } + @Test + public void getClusterCertificateAuthorityTest() throws Exception { + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder() + .setName(CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + CertificateAuthority actualResponse = client.getClusterCertificateAuthority(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 getClusterCertificateAuthorityExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.getClusterCertificateAuthority(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterCertificateAuthorityTest2() throws Exception { + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder() + .setName(CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4382/locations/location-4382/clusters/cluster-4382/certificateAuthority"; + + CertificateAuthority actualResponse = client.getClusterCertificateAuthority(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 getClusterCertificateAuthorityExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4382/locations/location-4382/clusters/cluster-4382/certificateAuthority"; + client.getClusterCertificateAuthority(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-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClientTest.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClientTest.java index 8094ef8e3a99..39e106b5c29c 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClientTest.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClientTest.java @@ -199,6 +199,12 @@ public void getClusterTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); mockCloudRedisCluster.addResponse(expectedResponse); @@ -248,6 +254,12 @@ public void getClusterTest2() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); mockCloudRedisCluster.addResponse(expectedResponse); @@ -297,6 +309,12 @@ public void updateClusterTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -441,6 +459,12 @@ public void createClusterTest() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -504,6 +528,12 @@ public void createClusterTest2() throws Exception { .addAllDiscoveryEndpoints(new ArrayList()) .addAllPscConnections(new ArrayList()) .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .setNodeType(NodeType.forNumber(0)) + .setPersistenceConfig(ClusterPersistenceConfig.newBuilder().build()) + .putAllRedisConfigs(new HashMap()) + .setPreciseSizeGb(1342268405) + .setZoneDistributionConfig(ZoneDistributionConfig.newBuilder().build()) + .setDeletionProtectionEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -551,6 +581,86 @@ public void createClusterExceptionTest2() throws Exception { } } + @Test + public void getClusterCertificateAuthorityTest() throws Exception { + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder() + .setName(CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + mockCloudRedisCluster.addResponse(expectedResponse); + + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + CertificateAuthority actualResponse = client.getClusterCertificateAuthority(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetClusterCertificateAuthorityRequest actualRequest = + ((GetClusterCertificateAuthorityRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getClusterCertificateAuthorityExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.getClusterCertificateAuthority(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterCertificateAuthorityTest2() throws Exception { + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder() + .setName(CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + mockCloudRedisCluster.addResponse(expectedResponse); + + String name = "name3373707"; + + CertificateAuthority actualResponse = client.getClusterCertificateAuthority(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetClusterCertificateAuthorityRequest actualRequest = + ((GetClusterCertificateAuthorityRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getClusterCertificateAuthorityExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + String name = "name3373707"; + client.getClusterCertificateAuthority(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-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockCloudRedisClusterImpl.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockCloudRedisClusterImpl.java index da7655d5d989..a6164b270b84 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockCloudRedisClusterImpl.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockCloudRedisClusterImpl.java @@ -162,4 +162,26 @@ public void createCluster( Exception.class.getName()))); } } + + @Override + public void getClusterCertificateAuthority( + GetClusterCertificateAuthorityRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CertificateAuthority) { + requests.add(request); + responseObserver.onNext(((CertificateAuthority) 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 GetClusterCertificateAuthority, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CertificateAuthority.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-redis-cluster/grpc-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterGrpc.java b/java-redis-cluster/grpc-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterGrpc.java index 70f2473838fb..3c846d293842 100644 --- a/java-redis-cluster/grpc-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterGrpc.java +++ b/java-redis-cluster/grpc-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterGrpc.java @@ -277,6 +277,59 @@ private CloudRedisClusterGrpc() {} return getCreateClusterMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest, + com.google.cloud.redis.cluster.v1.CertificateAuthority> + getGetClusterCertificateAuthorityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetClusterCertificateAuthority", + requestType = com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest.class, + responseType = com.google.cloud.redis.cluster.v1.CertificateAuthority.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest, + com.google.cloud.redis.cluster.v1.CertificateAuthority> + getGetClusterCertificateAuthorityMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest, + com.google.cloud.redis.cluster.v1.CertificateAuthority> + getGetClusterCertificateAuthorityMethod; + if ((getGetClusterCertificateAuthorityMethod = + CloudRedisClusterGrpc.getGetClusterCertificateAuthorityMethod) + == null) { + synchronized (CloudRedisClusterGrpc.class) { + if ((getGetClusterCertificateAuthorityMethod = + CloudRedisClusterGrpc.getGetClusterCertificateAuthorityMethod) + == null) { + CloudRedisClusterGrpc.getGetClusterCertificateAuthorityMethod = + getGetClusterCertificateAuthorityMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetClusterCertificateAuthority")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1 + .GetClusterCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1.CertificateAuthority + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudRedisClusterMethodDescriptorSupplier( + "GetClusterCertificateAuthority")) + .build(); + } + } + } + return getGetClusterCertificateAuthorityMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static CloudRedisClusterStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -427,6 +480,21 @@ default void createCluster( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getCreateClusterMethod(), responseObserver); } + + /** + * + * + *
+     * Gets the details of certificate authority information for Redis cluster.
+     * 
+ */ + default void getClusterCertificateAuthority( + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetClusterCertificateAuthorityMethod(), responseObserver); + } } /** @@ -589,6 +657,23 @@ public void createCluster( request, responseObserver); } + + /** + * + * + *
+     * Gets the details of certificate authority information for Redis cluster.
+     * 
+ */ + public void getClusterCertificateAuthority( + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetClusterCertificateAuthorityMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -706,6 +791,19 @@ public com.google.longrunning.Operation createCluster( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getCreateClusterMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Gets the details of certificate authority information for Redis cluster.
+     * 
+ */ + public com.google.cloud.redis.cluster.v1.CertificateAuthority getClusterCertificateAuthority( + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetClusterCertificateAuthorityMethod(), getCallOptions(), request); + } } /** @@ -824,6 +922,22 @@ protected CloudRedisClusterFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getCreateClusterMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Gets the details of certificate authority information for Redis cluster.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.redis.cluster.v1.CertificateAuthority> + getClusterCertificateAuthority( + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetClusterCertificateAuthorityMethod(), getCallOptions()), + request); + } } private static final int METHODID_LIST_CLUSTERS = 0; @@ -831,6 +945,7 @@ protected CloudRedisClusterFutureStub build( private static final int METHODID_UPDATE_CLUSTER = 2; private static final int METHODID_DELETE_CLUSTER = 3; private static final int METHODID_CREATE_CLUSTER = 4; + private static final int METHODID_GET_CLUSTER_CERTIFICATE_AUTHORITY = 5; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -876,6 +991,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.redis.cluster.v1.CreateClusterRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_CLUSTER_CERTIFICATE_AUTHORITY: + serviceImpl.getClusterCertificateAuthority( + (com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -925,6 +1046,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.redis.cluster.v1.CreateClusterRequest, com.google.longrunning.Operation>(service, METHODID_CREATE_CLUSTER))) + .addMethod( + getGetClusterCertificateAuthorityMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest, + com.google.cloud.redis.cluster.v1.CertificateAuthority>( + service, METHODID_GET_CLUSTER_CERTIFICATE_AUTHORITY))) .build(); } @@ -981,6 +1109,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getUpdateClusterMethod()) .addMethod(getDeleteClusterMethod()) .addMethod(getCreateClusterMethod()) + .addMethod(getGetClusterCertificateAuthorityMethod()) .build(); } } diff --git a/java-redis-cluster/grpc-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterGrpc.java b/java-redis-cluster/grpc-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterGrpc.java index f5027ed27f06..f14e4c3ee4bd 100644 --- a/java-redis-cluster/grpc-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterGrpc.java +++ b/java-redis-cluster/grpc-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterGrpc.java @@ -283,6 +283,61 @@ private CloudRedisClusterGrpc() {} return getCreateClusterMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority> + getGetClusterCertificateAuthorityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetClusterCertificateAuthority", + requestType = + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest.class, + responseType = com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority> + getGetClusterCertificateAuthorityMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority> + getGetClusterCertificateAuthorityMethod; + if ((getGetClusterCertificateAuthorityMethod = + CloudRedisClusterGrpc.getGetClusterCertificateAuthorityMethod) + == null) { + synchronized (CloudRedisClusterGrpc.class) { + if ((getGetClusterCertificateAuthorityMethod = + CloudRedisClusterGrpc.getGetClusterCertificateAuthorityMethod) + == null) { + CloudRedisClusterGrpc.getGetClusterCertificateAuthorityMethod = + getGetClusterCertificateAuthorityMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetClusterCertificateAuthority")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1beta1 + .GetClusterCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudRedisClusterMethodDescriptorSupplier( + "GetClusterCertificateAuthority")) + .build(); + } + } + } + return getGetClusterCertificateAuthorityMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static CloudRedisClusterStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -434,6 +489,21 @@ default void createCluster( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getCreateClusterMethod(), responseObserver); } + + /** + * + * + *
+     * Gets the details of certificate authority information for Redis cluster.
+     * 
+ */ + default void getClusterCertificateAuthority( + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetClusterCertificateAuthorityMethod(), responseObserver); + } } /** @@ -597,6 +667,23 @@ public void createCluster( request, responseObserver); } + + /** + * + * + *
+     * Gets the details of certificate authority information for Redis cluster.
+     * 
+ */ + public void getClusterCertificateAuthority( + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetClusterCertificateAuthorityMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -714,6 +801,20 @@ public com.google.longrunning.Operation createCluster( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getCreateClusterMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Gets the details of certificate authority information for Redis cluster.
+     * 
+ */ + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + getClusterCertificateAuthority( + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetClusterCertificateAuthorityMethod(), getCallOptions(), request); + } } /** @@ -832,6 +933,22 @@ protected CloudRedisClusterFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getCreateClusterMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Gets the details of certificate authority information for Redis cluster.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority> + getClusterCertificateAuthority( + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetClusterCertificateAuthorityMethod(), getCallOptions()), + request); + } } private static final int METHODID_LIST_CLUSTERS = 0; @@ -839,6 +956,7 @@ protected CloudRedisClusterFutureStub build( private static final int METHODID_UPDATE_CLUSTER = 2; private static final int METHODID_DELETE_CLUSTER = 3; private static final int METHODID_CREATE_CLUSTER = 4; + private static final int METHODID_GET_CLUSTER_CERTIFICATE_AUTHORITY = 5; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -885,6 +1003,14 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_CLUSTER_CERTIFICATE_AUTHORITY: + serviceImpl.getClusterCertificateAuthority( + (com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority>) + responseObserver); + break; default: throw new AssertionError(); } @@ -934,6 +1060,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest, com.google.longrunning.Operation>(service, METHODID_CREATE_CLUSTER))) + .addMethod( + getGetClusterCertificateAuthorityMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority>( + service, METHODID_GET_CLUSTER_CERTIFICATE_AUTHORITY))) .build(); } @@ -990,6 +1123,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getUpdateClusterMethod()) .addMethod(getDeleteClusterMethod()) .addMethod(getCreateClusterMethod()) + .addMethod(getGetClusterCertificateAuthorityMethod()) .build(); } } diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CertificateAuthority.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CertificateAuthority.java new file mode 100644 index 000000000000..43e9bde3e334 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CertificateAuthority.java @@ -0,0 +1,3005 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1; + +/** + * + * + *
+ * Redis cluster certificate authority
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.CertificateAuthority} + */ +public final class CertificateAuthority extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.CertificateAuthority) + CertificateAuthorityOrBuilder { + private static final long serialVersionUID = 0L; + // Use CertificateAuthority.newBuilder() to construct. + private CertificateAuthority(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CertificateAuthority() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CertificateAuthority(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.CertificateAuthority.class, + com.google.cloud.redis.cluster.v1.CertificateAuthority.Builder.class); + } + + public interface ManagedCertificateAuthorityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + java.util.List< + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain> + getCaCertsList(); + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain + getCaCerts(int index); + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + int getCaCertsCount(); + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChainOrBuilder> + getCaCertsOrBuilderList(); + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChainOrBuilder + getCaCertsOrBuilder(int index); + } + /** + * Protobuf type {@code + * google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority} + */ + public static final class ManagedCertificateAuthority + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority) + ManagedCertificateAuthorityOrBuilder { + private static final long serialVersionUID = 0L; + // Use ManagedCertificateAuthority.newBuilder() to construct. + private ManagedCertificateAuthority(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ManagedCertificateAuthority() { + caCerts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ManagedCertificateAuthority(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .class, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .Builder.class); + } + + public interface CertChainOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain) + 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); + } + /** + * Protobuf type {@code + * google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain} + */ + public static final class CertChain extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain) + CertChainOrBuilder { + private static final long serialVersionUID = 0L; + // Use CertChain.newBuilder() to construct. + private CertChain(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CertChain() { + certificates_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CertChain(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_CertChain_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_CertChain_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.class, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.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.GeneratedMessageV3.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.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain + other = + (com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain) + 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.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain) + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChainOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_CertChain_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_CertChain_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.class, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.Builder.class); + } + + // Construct using + // com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_CertChain_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + build() { + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + buildPartial() { + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + result = + new com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + certificates_.makeImmutable(); + result.certificates_ = certificates_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain) { + return mergeFrom( + (com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + other) { + if (other + == com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain) + private static final com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain(); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CertChain parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CA_CERTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain> + caCerts_; + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain> + getCaCertsList() { + return caCerts_; + } + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChainOrBuilder> + getCaCertsOrBuilderList() { + return caCerts_; + } + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + @java.lang.Override + public int getCaCertsCount() { + return caCerts_.size(); + } + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + getCaCerts(int index) { + return caCerts_.get(index); + } + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChainOrBuilder + 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.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority other = + (com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority) 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.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority) + com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthorityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .class, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .Builder.class); + } + + // Construct using + // com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + build() { + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + buildPartial() { + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority result = + new com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + 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.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority) { + return mergeFrom( + (com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + other) { + if (other + == com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .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.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCaCertsFieldBuilder() + : 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.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + m = + input.readMessage( + com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain.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.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain> + caCerts_ = java.util.Collections.emptyList(); + + private void ensureCaCertsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + caCerts_ = + new java.util.ArrayList< + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain>(caCerts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.Builder, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChainOrBuilder> + caCertsBuilder_; + + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public java.util.List< + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain> + getCaCertsList() { + if (caCertsBuilder_ == null) { + return java.util.Collections.unmodifiableList(caCerts_); + } else { + return caCertsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public int getCaCertsCount() { + if (caCertsBuilder_ == null) { + return caCerts_.size(); + } else { + return caCertsBuilder_.getCount(); + } + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + getCaCerts(int index) { + if (caCertsBuilder_ == null) { + return caCerts_.get(index); + } else { + return caCertsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public Builder setCaCerts( + int index, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + 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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public Builder setCaCerts( + int index, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public Builder addCaCerts( + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + 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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public Builder addCaCerts( + int index, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + 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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public Builder addCaCerts( + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public Builder addCaCerts( + int index, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public Builder addAllCaCerts( + java.lang.Iterable< + ? extends + com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.CertChain> + 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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain 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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain 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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.Builder + getCaCertsBuilder(int index) { + return getCaCertsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChainOrBuilder + getCaCertsOrBuilder(int index) { + if (caCertsBuilder_ == null) { + return caCerts_.get(index); + } else { + return caCertsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChainOrBuilder> + getCaCertsOrBuilderList() { + if (caCertsBuilder_ != null) { + return caCertsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(caCerts_); + } + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.Builder + addCaCertsBuilder() { + return getCaCertsFieldBuilder() + .addBuilder( + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.getDefaultInstance()); + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.Builder + addCaCertsBuilder(int index) { + return getCaCertsFieldBuilder() + .addBuilder( + index, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.getDefaultInstance()); + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public java.util.List< + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.Builder> + getCaCertsBuilderList() { + return getCaCertsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.Builder, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChainOrBuilder> + getCaCertsFieldBuilder() { + if (caCertsBuilder_ == null) { + caCertsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.Builder, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .CertChainOrBuilder>( + caCerts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + caCerts_ = null; + } + return caCertsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority) + private static final com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority(); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ManagedCertificateAuthority parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + 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(1), + 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 1: + 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 = 1; + /** + * + * .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + * + * @return Whether the managedServerCa field is set. + */ + @java.lang.Override + public boolean hasManagedServerCa() { + return serverCaCase_ == 1; + } + /** + * + * .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + * + * @return The managedServerCa. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + getManagedServerCa() { + if (serverCaCase_ == 1) { + return (com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority) + serverCa_; + } + return com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .getDefaultInstance(); + } + /** + * + * .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthorityOrBuilder + getManagedServerCaOrBuilder() { + if (serverCaCase_ == 1) { + return (com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority) + serverCa_; + } + return com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Identifier. Unique name of the resource in this scope including project,
+   * location and cluster using the form:
+   *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+   * 
+ * + * string name = 2 [(.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,
+   * location and cluster using the form:
+   *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+   * 
+ * + * string name = 2 [(.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 (serverCaCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority) + serverCa_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (serverCaCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority) + serverCa_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, 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.redis.cluster.v1.CertificateAuthority)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.CertificateAuthority other = + (com.google.cloud.redis.cluster.v1.CertificateAuthority) obj; + + if (!getName().equals(other.getName())) return false; + if (!getServerCaCase().equals(other.getServerCaCase())) return false; + switch (serverCaCase_) { + case 1: + 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 1: + 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.redis.cluster.v1.CertificateAuthority parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1.CertificateAuthority prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Redis cluster certificate authority
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.CertificateAuthority} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.CertificateAuthority) + com.google.cloud.redis.cluster.v1.CertificateAuthorityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.CertificateAuthority.class, + com.google.cloud.redis.cluster.v1.CertificateAuthority.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1.CertificateAuthority.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CertificateAuthority getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.CertificateAuthority.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CertificateAuthority build() { + com.google.cloud.redis.cluster.v1.CertificateAuthority result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CertificateAuthority buildPartial() { + com.google.cloud.redis.cluster.v1.CertificateAuthority result = + new com.google.cloud.redis.cluster.v1.CertificateAuthority(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1.CertificateAuthority result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + } + + private void buildPartialOneofs(com.google.cloud.redis.cluster.v1.CertificateAuthority result) { + result.serverCaCase_ = serverCaCase_; + result.serverCa_ = this.serverCa_; + if (serverCaCase_ == 1 && managedServerCaBuilder_ != null) { + result.serverCa_ = managedServerCaBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.CertificateAuthority) { + return mergeFrom((com.google.cloud.redis.cluster.v1.CertificateAuthority) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1.CertificateAuthority other) { + if (other == com.google.cloud.redis.cluster.v1.CertificateAuthority.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: + { + input.readMessage(getManagedServerCaFieldBuilder().getBuilder(), extensionRegistry); + serverCaCase_ = 1; + break; + } // case 10 + case 18: + { + name_ = 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 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.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .Builder, + com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthorityOrBuilder> + managedServerCaBuilder_; + /** + * + * .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + * + * @return Whether the managedServerCa field is set. + */ + @java.lang.Override + public boolean hasManagedServerCa() { + return serverCaCase_ == 1; + } + /** + * + * .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + * + * @return The managedServerCa. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + getManagedServerCa() { + if (managedServerCaBuilder_ == null) { + if (serverCaCase_ == 1) { + return (com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority) + serverCa_; + } + return com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .getDefaultInstance(); + } else { + if (serverCaCase_ == 1) { + return managedServerCaBuilder_.getMessage(); + } + return com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + public Builder setManagedServerCa( + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority value) { + if (managedServerCaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serverCa_ = value; + onChanged(); + } else { + managedServerCaBuilder_.setMessage(value); + } + serverCaCase_ = 1; + return this; + } + /** + * + * .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + public Builder setManagedServerCa( + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.Builder + builderForValue) { + if (managedServerCaBuilder_ == null) { + serverCa_ = builderForValue.build(); + onChanged(); + } else { + managedServerCaBuilder_.setMessage(builderForValue.build()); + } + serverCaCase_ = 1; + return this; + } + /** + * + * .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + public Builder mergeManagedServerCa( + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority value) { + if (managedServerCaBuilder_ == null) { + if (serverCaCase_ == 1 + && serverCa_ + != com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority.getDefaultInstance()) { + serverCa_ = + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .newBuilder( + (com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority) + serverCa_) + .mergeFrom(value) + .buildPartial(); + } else { + serverCa_ = value; + } + onChanged(); + } else { + if (serverCaCase_ == 1) { + managedServerCaBuilder_.mergeFrom(value); + } else { + managedServerCaBuilder_.setMessage(value); + } + } + serverCaCase_ = 1; + return this; + } + /** + * + * .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + public Builder clearManagedServerCa() { + if (managedServerCaBuilder_ == null) { + if (serverCaCase_ == 1) { + serverCaCase_ = 0; + serverCa_ = null; + onChanged(); + } + } else { + if (serverCaCase_ == 1) { + serverCaCase_ = 0; + serverCa_ = null; + } + managedServerCaBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + public com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .Builder + getManagedServerCaBuilder() { + return getManagedServerCaFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthorityOrBuilder + getManagedServerCaOrBuilder() { + if ((serverCaCase_ == 1) && (managedServerCaBuilder_ != null)) { + return managedServerCaBuilder_.getMessageOrBuilder(); + } else { + if (serverCaCase_ == 1) { + return (com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthority) + serverCa_; + } + return com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .Builder, + com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthorityOrBuilder> + getManagedServerCaFieldBuilder() { + if (managedServerCaBuilder_ == null) { + if (!(serverCaCase_ == 1)) { + serverCa_ = + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .getDefaultInstance(); + } + managedServerCaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority, + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + .Builder, + com.google.cloud.redis.cluster.v1.CertificateAuthority + .ManagedCertificateAuthorityOrBuilder>( + (com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority) + serverCa_, + getParentForChildren(), + isClean()); + serverCa_ = null; + } + serverCaCase_ = 1; + onChanged(); + return managedServerCaBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Identifier. Unique name of the resource in this scope including project,
+     * location and cluster using the form:
+     *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+     * 
+ * + * string name = 2 [(.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,
+     * location and cluster using the form:
+     *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+     * 
+ * + * string name = 2 [(.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,
+     * location and cluster using the form:
+     *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+     * 
+ * + * string name = 2 [(.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,
+     * location and cluster using the form:
+     *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+     * 
+ * + * string name = 2 [(.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,
+     * location and cluster using the form:
+     *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+     * 
+ * + * string name = 2 [(.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.CertificateAuthority) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.CertificateAuthority) + private static final com.google.cloud.redis.cluster.v1.CertificateAuthority DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.CertificateAuthority(); + } + + public static com.google.cloud.redis.cluster.v1.CertificateAuthority getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CertificateAuthority parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1.CertificateAuthority getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CertificateAuthorityName.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CertificateAuthorityName.java new file mode 100644 index 000000000000..bd1708101f2b --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CertificateAuthorityName.java @@ -0,0 +1,225 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.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 CertificateAuthorityName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CLUSTER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String cluster; + + @Deprecated + protected CertificateAuthorityName() { + project = null; + location = null; + cluster = null; + } + + private CertificateAuthorityName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + cluster = Preconditions.checkNotNull(builder.getCluster()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CertificateAuthorityName of(String project, String location, String cluster) { + return newBuilder().setProject(project).setLocation(location).setCluster(cluster).build(); + } + + public static String format(String project, String location, String cluster) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCluster(cluster) + .build() + .toString(); + } + + public static CertificateAuthorityName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CLUSTER.validatedMatch( + formattedString, "CertificateAuthorityName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("cluster")); + } + + 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 (CertificateAuthorityName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CLUSTER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (cluster != null) { + fieldMapBuilder.put("cluster", cluster); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CLUSTER.instantiate( + "project", project, "location", location, "cluster", cluster); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + CertificateAuthorityName that = ((CertificateAuthorityName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.cluster, that.cluster); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(cluster); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority. + */ + public static class Builder { + private String project; + private String location; + private String cluster; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCluster(String cluster) { + this.cluster = cluster; + return this; + } + + private Builder(CertificateAuthorityName certificateAuthorityName) { + this.project = certificateAuthorityName.project; + this.location = certificateAuthorityName.location; + this.cluster = certificateAuthorityName.cluster; + } + + public CertificateAuthorityName build() { + return new CertificateAuthorityName(this); + } + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CertificateAuthorityOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CertificateAuthorityOrBuilder.java new file mode 100644 index 000000000000..7627c48abceb --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CertificateAuthorityOrBuilder.java @@ -0,0 +1,82 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1; + +public interface CertificateAuthorityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.CertificateAuthority) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + * + * @return Whether the managedServerCa field is set. + */ + boolean hasManagedServerCa(); + /** + * + * .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + * + * @return The managedServerCa. + */ + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + getManagedServerCa(); + /** + * + * .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + com.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthorityOrBuilder + getManagedServerCaOrBuilder(); + + /** + * + * + *
+   * Identifier. Unique name of the resource in this scope including project,
+   * location and cluster using the form:
+   *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+   * 
+ * + * string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Identifier. Unique name of the resource in this scope including project,
+   * location and cluster using the form:
+   *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+   * 
+ * + * string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + com.google.cloud.redis.cluster.v1.CertificateAuthority.ServerCaCase getServerCaCase(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterProto.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterProto.java index 5b120be991fd..40d4ce32c6dc 100644 --- a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterProto.java +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterProto.java @@ -52,6 +52,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_redis_cluster_v1_DeleteClusterRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_redis_cluster_v1_DeleteClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_GetClusterCertificateAuthorityRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_GetClusterCertificateAuthorityRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_redis_cluster_v1_Cluster_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -64,6 +68,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_UpdateInfo_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_UpdateInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_Cluster_RedisConfigsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_Cluster_RedisConfigsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_redis_cluster_v1_PscConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -80,6 +88,34 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_redis_cluster_v1_OperationMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_redis_cluster_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_CertChain_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_CertChain_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_RDBConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_RDBConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_AOFConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_AOFConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_ZoneDistributionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_ZoneDistributionConfig_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -117,89 +153,155 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "$\340A\002\372A\036\n\034redis.googleapis.com/Cluster\"^\n" + "\024DeleteClusterRequest\0222\n\004name\030\001 \001(\tB$\340A\002" + "\372A\036\n\034redis.googleapis.com/Cluster\022\022\n\nreq" - + "uest_id\030\002 \001(\t\"\257\t\n\007Cluster\022\021\n\004name\030\001 \001(\tB" - + "\003\340A\002\0224\n\013create_time\030\003 \001(\0132\032.google.proto" - + "buf.TimestampB\003\340A\003\022@\n\005state\030\004 \001(\0162,.goog" - + "le.cloud.redis.cluster.v1.Cluster.StateB" - + "\003\340A\003\022\020\n\003uid\030\005 \001(\tB\003\340A\003\022\037\n\rreplica_count\030" - + "\010 \001(\005B\003\340A\001H\000\210\001\001\022Q\n\022authorization_mode\030\013 " - + "\001(\01620.google.cloud.redis.cluster.v1.Auth" - + "orizationModeB\003\340A\001\022Z\n\027transit_encryption" - + "_mode\030\014 \001(\01624.google.cloud.redis.cluster" - + ".v1.TransitEncryptionModeB\003\340A\001\022\031\n\007size_g" - + "b\030\r \001(\005B\003\340A\003H\001\210\001\001\022\035\n\013shard_count\030\016 \001(\005B\003" - + "\340A\002H\002\210\001\001\022B\n\013psc_configs\030\017 \003(\0132(.google.c" - + "loud.redis.cluster.v1.PscConfigB\003\340A\002\022R\n\023" - + "discovery_endpoints\030\020 \003(\01320.google.cloud" - + ".redis.cluster.v1.DiscoveryEndpointB\003\340A\003" - + "\022J\n\017psc_connections\030\021 \003(\0132,.google.cloud" - + ".redis.cluster.v1.PscConnectionB\003\340A\003\022I\n\n" - + "state_info\030\022 \001(\01320.google.cloud.redis.cl" - + "uster.v1.Cluster.StateInfoB\003\340A\003\032\352\001\n\tStat" - + "eInfo\022R\n\013update_info\030\001 \001(\0132;.google.clou" - + "d.redis.cluster.v1.Cluster.StateInfo.Upd" - + "ateInfoH\000\032\200\001\n\nUpdateInfo\022\037\n\022target_shard" - + "_count\030\001 \001(\005H\000\210\001\001\022!\n\024target_replica_coun" - + "t\030\002 \001(\005H\001\210\001\001B\025\n\023_target_shard_countB\027\n\025_" - + "target_replica_countB\006\n\004info\"T\n\005State\022\025\n" - + "\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\n\n\006AC" - + "TIVE\020\002\022\014\n\010UPDATING\020\003\022\014\n\010DELETING\020\004:]\352AZ\n" - + "\034redis.googleapis.com/Cluster\022:projects/" - + "{project}/locations/{location}/clusters/" - + "{cluster}B\020\n\016_replica_countB\n\n\010_size_gbB" - + "\016\n\014_shard_count\"!\n\tPscConfig\022\024\n\007network\030" - + "\002 \001(\tB\003\340A\002\"\177\n\021DiscoveryEndpoint\022\024\n\007addre" - + "ss\030\001 \001(\tB\003\340A\003\022\021\n\004port\030\002 \001(\005B\003\340A\003\022A\n\npsc_" - + "config\030\003 \001(\0132(.google.cloud.redis.cluste" - + "r.v1.PscConfigB\003\340A\003\"\215\001\n\rPscConnection\022\036\n" - + "\021psc_connection_id\030\001 \001(\tB\003\340A\003\022\024\n\007address" - + "\030\002 \001(\tB\003\340A\003\022\034\n\017forwarding_rule\030\003 \001(\tB\003\340A" - + "\003\022\027\n\nproject_id\030\004 \001(\tB\003\340A\003\022\017\n\007network\030\005 " - + "\001(\t\"\200\002\n\021OperationMetadata\0224\n\013create_time" - + "\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" - + "1\n\010end_time\030\002 \001(\0132\032.google.protobuf.Time" - + "stampB\003\340A\003\022\023\n\006target\030\003 \001(\tB\003\340A\003\022\021\n\004verb\030" - + "\004 \001(\tB\003\340A\003\022\033\n\016status_message\030\005 \001(\tB\003\340A\003\022" - + "#\n\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030\n\013" - + "api_version\030\007 \001(\tB\003\340A\003*^\n\021AuthorizationM" - + "ode\022\031\n\025AUTH_MODE_UNSPECIFIED\020\000\022\026\n\022AUTH_M" - + "ODE_IAM_AUTH\020\001\022\026\n\022AUTH_MODE_DISABLED\020\002*\231" - + "\001\n\025TransitEncryptionMode\022\'\n#TRANSIT_ENCR" - + "YPTION_MODE_UNSPECIFIED\020\000\022$\n TRANSIT_ENC" - + "RYPTION_MODE_DISABLED\020\001\0221\n-TRANSIT_ENCRY" - + "PTION_MODE_SERVER_AUTHENTICATION\020\0022\324\010\n\021C" - + "loudRedisCluster\022\266\001\n\014ListClusters\0222.goog" - + "le.cloud.redis.cluster.v1.ListClustersRe" - + "quest\0323.google.cloud.redis.cluster.v1.Li" - + "stClustersResponse\"=\332A\006parent\202\323\344\223\002.\022,/v1" - + "/{parent=projects/*/locations/*}/cluster" - + "s\022\243\001\n\nGetCluster\0220.google.cloud.redis.cl" - + "uster.v1.GetClusterRequest\032&.google.clou" - + "d.redis.cluster.v1.Cluster\";\332A\004name\202\323\344\223\002" - + ".\022,/v1/{name=projects/*/locations/*/clus" - + "ters/*}\022\341\001\n\rUpdateCluster\0223.google.cloud" - + ".redis.cluster.v1.UpdateClusterRequest\032\035" - + ".google.longrunning.Operation\"|\312A\036\n\007Clus" - + "ter\022\023google.protobuf.Any\332A\023cluster,updat" - + "e_mask\202\323\344\223\002?24/v1/{cluster.name=projects" - + "/*/locations/*/clusters/*}:\007cluster\022\317\001\n\r" - + "DeleteCluster\0223.google.cloud.redis.clust" - + "er.v1.DeleteClusterRequest\032\035.google.long" - + "running.Operation\"j\312A,\n\025google.protobuf." - + "Empty\022\023google.protobuf.Any\332A\004name\202\323\344\223\002.*" - + ",/v1/{name=projects/*/locations/*/cluste" - + "rs/*}\022\337\001\n\rCreateCluster\0223.google.cloud.r" - + "edis.cluster.v1.CreateClusterRequest\032\035.g" - + "oogle.longrunning.Operation\"z\312A\036\n\007Cluste" - + "r\022\023google.protobuf.Any\332A\031parent,cluster," - + "cluster_id\202\323\344\223\0027\",/v1/{parent=projects/*" - + "/locations/*}/clusters:\007cluster\032H\312A\024redi" - + "s.googleapis.com\322A.https://www.googleapi" - + "s.com/auth/cloud-platformB\236\001\n!com.google" - + ".cloud.redis.cluster.v1B\026CloudRedisClust" - + "erProtoP\001Z;cloud.google.com/go/redis/clu" - + "ster/apiv1/clusterpb;clusterpb\352\002!Google:" - + ":Cloud::Redis::Cluster::V1b\006proto3" + + "uest_id\030\002 \001(\t\"h\n%GetClusterCertificateAu" + + "thorityRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)re" + + "dis.googleapis.com/CertificateAuthority\"" + + "\271\r\n\007Cluster\022\021\n\004name\030\001 \001(\tB\003\340A\002\0224\n\013create" + + "_time\030\003 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\003\022@\n\005state\030\004 \001(\0162,.google.cloud.redis" + + ".cluster.v1.Cluster.StateB\003\340A\003\022\020\n\003uid\030\005 " + + "\001(\tB\003\340A\003\022\037\n\rreplica_count\030\010 \001(\005B\003\340A\001H\000\210\001" + + "\001\022Q\n\022authorization_mode\030\013 \001(\01620.google.c" + + "loud.redis.cluster.v1.AuthorizationModeB" + + "\003\340A\001\022Z\n\027transit_encryption_mode\030\014 \001(\01624." + + "google.cloud.redis.cluster.v1.TransitEnc" + + "ryptionModeB\003\340A\001\022\031\n\007size_gb\030\r \001(\005B\003\340A\003H\001" + + "\210\001\001\022\035\n\013shard_count\030\016 \001(\005B\003\340A\002H\002\210\001\001\022B\n\013ps" + + "c_configs\030\017 \003(\0132(.google.cloud.redis.clu" + + "ster.v1.PscConfigB\003\340A\002\022R\n\023discovery_endp" + + "oints\030\020 \003(\01320.google.cloud.redis.cluster" + + ".v1.DiscoveryEndpointB\003\340A\003\022J\n\017psc_connec" + + "tions\030\021 \003(\0132,.google.cloud.redis.cluster" + + ".v1.PscConnectionB\003\340A\003\022I\n\nstate_info\030\022 \001" + + "(\01320.google.cloud.redis.cluster.v1.Clust" + + "er.StateInfoB\003\340A\003\022?\n\tnode_type\030\023 \001(\0162\'.g" + + "oogle.cloud.redis.cluster.v1.NodeTypeB\003\340" + + "A\001\022X\n\022persistence_config\030\024 \001(\01327.google." + + "cloud.redis.cluster.v1.ClusterPersistenc" + + "eConfigB\003\340A\001\022T\n\rredis_configs\030\025 \003(\01328.go" + + "ogle.cloud.redis.cluster.v1.Cluster.Redi" + + "sConfigsEntryB\003\340A\001\022!\n\017precise_size_gb\030\026 " + + "\001(\001B\003\340A\003H\003\210\001\001\022\\\n\030zone_distribution_confi" + + "g\030\027 \001(\01325.google.cloud.redis.cluster.v1." + + "ZoneDistributionConfigB\003\340A\001\022-\n\033deletion_" + + "protection_enabled\030\031 \001(\010B\003\340A\001H\004\210\001\001\032\352\001\n\tS" + + "tateInfo\022R\n\013update_info\030\001 \001(\0132;.google.c" + + "loud.redis.cluster.v1.Cluster.StateInfo." + + "UpdateInfoH\000\032\200\001\n\nUpdateInfo\022\037\n\022target_sh" + + "ard_count\030\001 \001(\005H\000\210\001\001\022!\n\024target_replica_c" + + "ount\030\002 \001(\005H\001\210\001\001B\025\n\023_target_shard_countB\027" + + "\n\025_target_replica_countB\006\n\004info\0323\n\021Redis" + + "ConfigsEntry\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\010" + + "CREATING\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010UPDATING\020\003\022\014\n\010" + + "DELETING\020\004:]\352AZ\n\034redis.googleapis.com/Cl" + + "uster\022:projects/{project}/locations/{loc" + + "ation}/clusters/{cluster}B\020\n\016_replica_co" + + "untB\n\n\010_size_gbB\016\n\014_shard_countB\022\n\020_prec" + + "ise_size_gbB\036\n\034_deletion_protection_enab" + + "led\"!\n\tPscConfig\022\024\n\007network\030\002 \001(\tB\003\340A\002\"\177" + + "\n\021DiscoveryEndpoint\022\024\n\007address\030\001 \001(\tB\003\340A" + + "\003\022\021\n\004port\030\002 \001(\005B\003\340A\003\022A\n\npsc_config\030\003 \001(\013" + + "2(.google.cloud.redis.cluster.v1.PscConf" + + "igB\003\340A\003\"\215\001\n\rPscConnection\022\036\n\021psc_connect" + + "ion_id\030\001 \001(\tB\003\340A\003\022\024\n\007address\030\002 \001(\tB\003\340A\003\022" + + "\034\n\017forwarding_rule\030\003 \001(\tB\003\340A\003\022\027\n\nproject" + + "_id\030\004 \001(\tB\003\340A\003\022\017\n\007network\030\005 \001(\t\"\200\002\n\021Oper" + + "ationMetadata\0224\n\013create_time\030\001 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\0221\n\010end_time\030" + + "\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\023" + + "\n\006target\030\003 \001(\tB\003\340A\003\022\021\n\004verb\030\004 \001(\tB\003\340A\003\022\033" + + "\n\016status_message\030\005 \001(\tB\003\340A\003\022#\n\026requested" + + "_cancellation\030\006 \001(\010B\003\340A\003\022\030\n\013api_version\030" + + "\007 \001(\tB\003\340A\003\"\325\003\n\024CertificateAuthority\022l\n\021m" + + "anaged_server_ca\030\001 \001(\0132O.google.cloud.re" + + "dis.cluster.v1.CertificateAuthority.Mana" + + "gedCertificateAuthorityH\000\022\021\n\004name\030\002 \001(\tB" + + "\003\340A\010\032\255\001\n\033ManagedCertificateAuthority\022k\n\010" + + "ca_certs\030\001 \003(\0132Y.google.cloud.redis.clus" + + "ter.v1.CertificateAuthority.ManagedCerti" + + "ficateAuthority.CertChain\032!\n\tCertChain\022\024" + + "\n\014certificates\030\001 \003(\t:\177\352A|\n)redis.googlea" + + "pis.com/CertificateAuthority\022Oprojects/{" + + "project}/locations/{location}/clusters/{" + + "cluster}/certificateAuthorityB\013\n\tserver_" + + "ca\"\207\007\n\030ClusterPersistenceConfig\022Z\n\004mode\030" + + "\001 \001(\0162G.google.cloud.redis.cluster.v1.Cl" + + "usterPersistenceConfig.PersistenceModeB\003" + + "\340A\001\022Z\n\nrdb_config\030\002 \001(\0132A.google.cloud.r" + + "edis.cluster.v1.ClusterPersistenceConfig" + + ".RDBConfigB\003\340A\001\022Z\n\naof_config\030\003 \001(\0132A.go" + + "ogle.cloud.redis.cluster.v1.ClusterPersi" + + "stenceConfig.AOFConfigB\003\340A\001\032\272\002\n\tRDBConfi" + + "g\022r\n\023rdb_snapshot_period\030\001 \001(\0162P.google." + + "cloud.redis.cluster.v1.ClusterPersistenc" + + "eConfig.RDBConfig.SnapshotPeriodB\003\340A\001\022@\n" + + "\027rdb_snapshot_start_time\030\002 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\001\"w\n\016SnapshotPerio" + + "d\022\037\n\033SNAPSHOT_PERIOD_UNSPECIFIED\020\000\022\014\n\010ON" + + "E_HOUR\020\001\022\r\n\tSIX_HOURS\020\002\022\020\n\014TWELVE_HOURS\020" + + "\003\022\025\n\021TWENTY_FOUR_HOURS\020\004\032\304\001\n\tAOFConfig\022h" + + "\n\014append_fsync\030\001 \001(\0162M.google.cloud.redi" + + "s.cluster.v1.ClusterPersistenceConfig.AO" + + "FConfig.AppendFsyncB\003\340A\001\"M\n\013AppendFsync\022" + + "\034\n\030APPEND_FSYNC_UNSPECIFIED\020\000\022\006\n\002NO\020\001\022\014\n" + + "\010EVERYSEC\020\002\022\n\n\006ALWAYS\020\003\"S\n\017PersistenceMo" + + "de\022 \n\034PERSISTENCE_MODE_UNSPECIFIED\020\000\022\014\n\010" + + "DISABLED\020\001\022\007\n\003RDB\020\002\022\007\n\003AOF\020\003\"\353\001\n\026ZoneDis" + + "tributionConfig\022]\n\004mode\030\001 \001(\0162J.google.c" + + "loud.redis.cluster.v1.ZoneDistributionCo" + + "nfig.ZoneDistributionModeB\003\340A\001\022\021\n\004zone\030\002" + + " \001(\tB\003\340A\001\"_\n\024ZoneDistributionMode\022&\n\"ZON" + + "E_DISTRIBUTION_MODE_UNSPECIFIED\020\000\022\016\n\nMUL" + + "TI_ZONE\020\001\022\017\n\013SINGLE_ZONE\020\002*^\n\021Authorizat" + + "ionMode\022\031\n\025AUTH_MODE_UNSPECIFIED\020\000\022\026\n\022AU" + + "TH_MODE_IAM_AUTH\020\001\022\026\n\022AUTH_MODE_DISABLED" + + "\020\002*\217\001\n\010NodeType\022\031\n\025NODE_TYPE_UNSPECIFIED" + + "\020\000\022\032\n\026REDIS_SHARED_CORE_NANO\020\001\022\030\n\024REDIS_" + + "HIGHMEM_MEDIUM\020\002\022\030\n\024REDIS_HIGHMEM_XLARGE" + + "\020\003\022\030\n\024REDIS_STANDARD_SMALL\020\004*\231\001\n\025Transit" + + "EncryptionMode\022\'\n#TRANSIT_ENCRYPTION_MOD" + + "E_UNSPECIFIED\020\000\022$\n TRANSIT_ENCRYPTION_MO" + + "DE_DISABLED\020\001\0221\n-TRANSIT_ENCRYPTION_MODE" + + "_SERVER_AUTHENTICATION\020\0022\304\n\n\021CloudRedisC" + + "luster\022\266\001\n\014ListClusters\0222.google.cloud.r" + + "edis.cluster.v1.ListClustersRequest\0323.go" + + "ogle.cloud.redis.cluster.v1.ListClusters" + + "Response\"=\332A\006parent\202\323\344\223\002.\022,/v1/{parent=p" + + "rojects/*/locations/*}/clusters\022\243\001\n\nGetC" + + "luster\0220.google.cloud.redis.cluster.v1.G" + + "etClusterRequest\032&.google.cloud.redis.cl" + + "uster.v1.Cluster\";\332A\004name\202\323\344\223\002.\022,/v1/{na" + + "me=projects/*/locations/*/clusters/*}\022\341\001" + + "\n\rUpdateCluster\0223.google.cloud.redis.clu" + + "ster.v1.UpdateClusterRequest\032\035.google.lo" + + "ngrunning.Operation\"|\312A\036\n\007Cluster\022\023googl" + + "e.protobuf.Any\332A\023cluster,update_mask\202\323\344\223" + + "\002?24/v1/{cluster.name=projects/*/locatio" + + "ns/*/clusters/*}:\007cluster\022\317\001\n\rDeleteClus" + + "ter\0223.google.cloud.redis.cluster.v1.Dele" + + "teClusterRequest\032\035.google.longrunning.Op" + + "eration\"j\312A,\n\025google.protobuf.Empty\022\023goo" + + "gle.protobuf.Any\332A\004name\202\323\344\223\002.*,/v1/{name" + + "=projects/*/locations/*/clusters/*}\022\337\001\n\r" + + "CreateCluster\0223.google.cloud.redis.clust" + + "er.v1.CreateClusterRequest\032\035.google.long" + + "running.Operation\"z\312A\036\n\007Cluster\022\023google." + + "protobuf.Any\332A\031parent,cluster,cluster_id" + + "\202\323\344\223\0027\",/v1/{parent=projects/*/locations" + + "/*}/clusters:\007cluster\022\355\001\n\036GetClusterCert" + + "ificateAuthority\022D.google.cloud.redis.cl" + + "uster.v1.GetClusterCertificateAuthorityR" + + "equest\0323.google.cloud.redis.cluster.v1.C" + + "ertificateAuthority\"P\332A\004name\202\323\344\223\002C\022A/v1/" + + "{name=projects/*/locations/*/clusters/*/" + + "certificateAuthority}\032H\312A\024redis.googleap" + + "is.com\322A.https://www.googleapis.com/auth" + + "/cloud-platformB\236\001\n!com.google.cloud.red" + + "is.cluster.v1B\026CloudRedisClusterProtoP\001Z" + + ";cloud.google.com/go/redis/cluster/apiv1" + + "/clusterpb;clusterpb\352\002!Google::Cloud::Re" + + "dis::Cluster::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -263,8 +365,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "RequestId", }); - internal_static_google_cloud_redis_cluster_v1_Cluster_descriptor = + internal_static_google_cloud_redis_cluster_v1_GetClusterCertificateAuthorityRequest_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_redis_cluster_v1_GetClusterCertificateAuthorityRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_GetClusterCertificateAuthorityRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_redis_cluster_v1_Cluster_descriptor = + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_redis_cluster_v1_Cluster_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_cluster_v1_Cluster_descriptor, @@ -282,6 +392,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DiscoveryEndpoints", "PscConnections", "StateInfo", + "NodeType", + "PersistenceConfig", + "RedisConfigs", + "PreciseSizeGb", + "ZoneDistributionConfig", + "DeletionProtectionEnabled", }); internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_descriptor = internal_static_google_cloud_redis_cluster_v1_Cluster_descriptor.getNestedTypes().get(0); @@ -301,8 +417,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "TargetShardCount", "TargetReplicaCount", }); + internal_static_google_cloud_redis_cluster_v1_Cluster_RedisConfigsEntry_descriptor = + internal_static_google_cloud_redis_cluster_v1_Cluster_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_redis_cluster_v1_Cluster_RedisConfigsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_Cluster_RedisConfigsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_cloud_redis_cluster_v1_PscConfig_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_redis_cluster_v1_PscConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_cluster_v1_PscConfig_descriptor, @@ -310,7 +434,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Network", }); internal_static_google_cloud_redis_cluster_v1_DiscoveryEndpoint_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_redis_cluster_v1_DiscoveryEndpoint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_cluster_v1_DiscoveryEndpoint_descriptor, @@ -318,7 +442,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Address", "Port", "PscConfig", }); internal_static_google_cloud_redis_cluster_v1_PscConnection_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_redis_cluster_v1_PscConnection_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_cluster_v1_PscConnection_descriptor, @@ -326,7 +450,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PscConnectionId", "Address", "ForwardingRule", "ProjectId", "Network", }); internal_static_google_cloud_redis_cluster_v1_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_redis_cluster_v1_OperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_cluster_v1_OperationMetadata_descriptor, @@ -339,6 +463,70 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RequestedCancellation", "ApiVersion", }); + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_descriptor, + new java.lang.String[] { + "ManagedServerCa", "Name", "ServerCa", + }); + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_descriptor = + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_descriptor, + new java.lang.String[] { + "CaCerts", + }); + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_CertChain_descriptor = + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_CertChain_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_CertificateAuthority_ManagedCertificateAuthority_CertChain_descriptor, + new java.lang.String[] { + "Certificates", + }); + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_descriptor, + new java.lang.String[] { + "Mode", "RdbConfig", "AofConfig", + }); + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_RDBConfig_descriptor = + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_RDBConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_RDBConfig_descriptor, + new java.lang.String[] { + "RdbSnapshotPeriod", "RdbSnapshotStartTime", + }); + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_AOFConfig_descriptor = + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_AOFConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_AOFConfig_descriptor, + new java.lang.String[] { + "AppendFsync", + }); + internal_static_google_cloud_redis_cluster_v1_ZoneDistributionConfig_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_redis_cluster_v1_ZoneDistributionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_ZoneDistributionConfig_descriptor, + new java.lang.String[] { + "Mode", "Zone", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/Cluster.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/Cluster.java index ca611c3f78ae..b931dee74841 100644 --- a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/Cluster.java +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/Cluster.java @@ -47,6 +47,7 @@ private Cluster() { pscConfigs_ = java.util.Collections.emptyList(); discoveryEndpoints_ = java.util.Collections.emptyList(); pscConnections_ = java.util.Collections.emptyList(); + nodeType_ = 0; } @java.lang.Override @@ -60,6 +61,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_redis_cluster_v1_Cluster_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 21: + return internalGetRedisConfigs(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -2209,7 +2222,8 @@ public com.google.cloud.redis.cluster.v1.TransitEncryptionMode getTransitEncrypt * * *
-   * Output only. Redis memory size in GB for the entire cluster.
+   * Output only. Redis memory size in GB for the entire cluster rounded up to
+   * the next integer.
    * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2224,7 +2238,8 @@ public boolean hasSizeGb() { * * *
-   * Output only. Redis memory size in GB for the entire cluster.
+   * Output only. Redis memory size in GB for the entire cluster rounded up to
+   * the next integer.
    * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2591,6 +2606,342 @@ public com.google.cloud.redis.cluster.v1.Cluster.StateInfoOrBuilder getStateInfo : stateInfo_; } + public static final int NODE_TYPE_FIELD_NUMBER = 19; + private int nodeType_ = 0; + /** + * + * + *
+   * Optional. The type of a redis node in the cluster. NodeType determines the
+   * underlying machine-type of a redis node.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nodeType. + */ + @java.lang.Override + public int getNodeTypeValue() { + return nodeType_; + } + /** + * + * + *
+   * Optional. The type of a redis node in the cluster. NodeType determines the
+   * underlying machine-type of a redis node.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nodeType. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.NodeType getNodeType() { + com.google.cloud.redis.cluster.v1.NodeType result = + com.google.cloud.redis.cluster.v1.NodeType.forNumber(nodeType_); + return result == null ? com.google.cloud.redis.cluster.v1.NodeType.UNRECOGNIZED : result; + } + + public static final int PERSISTENCE_CONFIG_FIELD_NUMBER = 20; + private com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistenceConfig_; + /** + * + * + *
+   * Optional. Persistence config (RDB, AOF) for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the persistenceConfig field is set. + */ + @java.lang.Override + public boolean hasPersistenceConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Optional. Persistence config (RDB, AOF) for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The persistenceConfig. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig getPersistenceConfig() { + return persistenceConfig_ == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.getDefaultInstance() + : persistenceConfig_; + } + /** + * + * + *
+   * Optional. Persistence config (RDB, AOF) for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfigOrBuilder + getPersistenceConfigOrBuilder() { + return persistenceConfig_ == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.getDefaultInstance() + : persistenceConfig_; + } + + public static final int REDIS_CONFIGS_FIELD_NUMBER = 21; + + private static final class RedisConfigsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_RedisConfigsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField redisConfigs_; + + private com.google.protobuf.MapField + internalGetRedisConfigs() { + if (redisConfigs_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RedisConfigsDefaultEntryHolder.defaultEntry); + } + return redisConfigs_; + } + + public int getRedisConfigsCount() { + return internalGetRedisConfigs().getMap().size(); + } + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsRedisConfigs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetRedisConfigs().getMap().containsKey(key); + } + /** Use {@link #getRedisConfigsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRedisConfigs() { + return getRedisConfigsMap(); + } + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getRedisConfigsMap() { + return internalGetRedisConfigs().getMap(); + } + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getRedisConfigsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRedisConfigs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getRedisConfigsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRedisConfigs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PRECISE_SIZE_GB_FIELD_NUMBER = 22; + private double preciseSizeGb_ = 0D; + /** + * + * + *
+   * Output only. Precise value of redis memory size in GB for the entire
+   * cluster.
+   * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the preciseSizeGb field is set. + */ + @java.lang.Override + public boolean hasPreciseSizeGb() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * Output only. Precise value of redis memory size in GB for the entire
+   * cluster.
+   * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The preciseSizeGb. + */ + @java.lang.Override + public double getPreciseSizeGb() { + return preciseSizeGb_; + } + + public static final int ZONE_DISTRIBUTION_CONFIG_FIELD_NUMBER = 23; + private com.google.cloud.redis.cluster.v1.ZoneDistributionConfig zoneDistributionConfig_; + /** + * + * + *
+   * Optional. This config will be used to determine how the customer wants us
+   * to distribute cluster resources within the region.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the zoneDistributionConfig field is set. + */ + @java.lang.Override + public boolean hasZoneDistributionConfig() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+   * Optional. This config will be used to determine how the customer wants us
+   * to distribute cluster resources within the region.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The zoneDistributionConfig. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ZoneDistributionConfig getZoneDistributionConfig() { + return zoneDistributionConfig_ == null + ? com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.getDefaultInstance() + : zoneDistributionConfig_; + } + /** + * + * + *
+   * Optional. This config will be used to determine how the customer wants us
+   * to distribute cluster resources within the region.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ZoneDistributionConfigOrBuilder + getZoneDistributionConfigOrBuilder() { + return zoneDistributionConfig_ == null + ? com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.getDefaultInstance() + : zoneDistributionConfig_; + } + + public static final int DELETION_PROTECTION_ENABLED_FIELD_NUMBER = 25; + private boolean deletionProtectionEnabled_ = false; + /** + * + * + *
+   * Optional. The delete operation will fail when the value is set to true.
+   * 
+ * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deletionProtectionEnabled field is set. + */ + @java.lang.Override + public boolean hasDeletionProtectionEnabled() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+   * Optional. The delete operation will fail when the value is set to true.
+   * 
+ * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deletionProtectionEnabled. + */ + @java.lang.Override + public boolean getDeletionProtectionEnabled() { + return deletionProtectionEnabled_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2648,6 +2999,23 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(18, getStateInfo()); } + if (nodeType_ != com.google.cloud.redis.cluster.v1.NodeType.NODE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(19, nodeType_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(20, getPersistenceConfig()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetRedisConfigs(), RedisConfigsDefaultEntryHolder.defaultEntry, 21); + if (((bitField0_ & 0x00000040) != 0)) { + output.writeDouble(22, preciseSizeGb_); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(23, getZoneDistributionConfig()); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeBool(25, deletionProtectionEnabled_); + } getUnknownFields().writeTo(output); } @@ -2701,6 +3069,32 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getStateInfo()); } + if (nodeType_ != com.google.cloud.redis.cluster.v1.NodeType.NODE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, nodeType_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getPersistenceConfig()); + } + for (java.util.Map.Entry entry : + internalGetRedisConfigs().getMap().entrySet()) { + com.google.protobuf.MapEntry redisConfigs__ = + RedisConfigsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, redisConfigs__); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(22, preciseSizeGb_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(23, getZoneDistributionConfig()); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(25, deletionProtectionEnabled_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2745,6 +3139,25 @@ public boolean equals(final java.lang.Object obj) { if (hasStateInfo()) { if (!getStateInfo().equals(other.getStateInfo())) return false; } + if (nodeType_ != other.nodeType_) return false; + if (hasPersistenceConfig() != other.hasPersistenceConfig()) return false; + if (hasPersistenceConfig()) { + if (!getPersistenceConfig().equals(other.getPersistenceConfig())) return false; + } + if (!internalGetRedisConfigs().equals(other.internalGetRedisConfigs())) return false; + if (hasPreciseSizeGb() != other.hasPreciseSizeGb()) return false; + if (hasPreciseSizeGb()) { + if (java.lang.Double.doubleToLongBits(getPreciseSizeGb()) + != java.lang.Double.doubleToLongBits(other.getPreciseSizeGb())) return false; + } + if (hasZoneDistributionConfig() != other.hasZoneDistributionConfig()) return false; + if (hasZoneDistributionConfig()) { + if (!getZoneDistributionConfig().equals(other.getZoneDistributionConfig())) return false; + } + if (hasDeletionProtectionEnabled() != other.hasDeletionProtectionEnabled()) return false; + if (hasDeletionProtectionEnabled()) { + if (getDeletionProtectionEnabled() != other.getDeletionProtectionEnabled()) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2798,6 +3211,31 @@ public int hashCode() { hash = (37 * hash) + STATE_INFO_FIELD_NUMBER; hash = (53 * hash) + getStateInfo().hashCode(); } + hash = (37 * hash) + NODE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + nodeType_; + if (hasPersistenceConfig()) { + hash = (37 * hash) + PERSISTENCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPersistenceConfig().hashCode(); + } + if (!internalGetRedisConfigs().getMap().isEmpty()) { + hash = (37 * hash) + REDIS_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetRedisConfigs().hashCode(); + } + if (hasPreciseSizeGb()) { + hash = (37 * hash) + PRECISE_SIZE_GB_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getPreciseSizeGb())); + } + if (hasZoneDistributionConfig()) { + hash = (37 * hash) + ZONE_DISTRIBUTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getZoneDistributionConfig().hashCode(); + } + if (hasDeletionProtectionEnabled()) { + hash = (37 * hash) + DELETION_PROTECTION_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDeletionProtectionEnabled()); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2916,6 +3354,28 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_redis_cluster_v1_Cluster_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 21: + return internalGetRedisConfigs(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 21: + return internalGetMutableRedisConfigs(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -2943,6 +3403,8 @@ private void maybeForceBuilderInitialization() { getDiscoveryEndpointsFieldBuilder(); getPscConnectionsFieldBuilder(); getStateInfoFieldBuilder(); + getPersistenceConfigFieldBuilder(); + getZoneDistributionConfigFieldBuilder(); } } @@ -2989,6 +3451,20 @@ public Builder clear() { stateInfoBuilder_.dispose(); stateInfoBuilder_ = null; } + nodeType_ = 0; + persistenceConfig_ = null; + if (persistenceConfigBuilder_ != null) { + persistenceConfigBuilder_.dispose(); + persistenceConfigBuilder_ = null; + } + internalGetMutableRedisConfigs().clear(); + preciseSizeGb_ = 0D; + zoneDistributionConfig_ = null; + if (zoneDistributionConfigBuilder_ != null) { + zoneDistributionConfigBuilder_.dispose(); + zoneDistributionConfigBuilder_ = null; + } + deletionProtectionEnabled_ = false; return this; } @@ -3092,6 +3568,35 @@ private void buildPartial0(com.google.cloud.redis.cluster.v1.Cluster result) { result.stateInfo_ = stateInfoBuilder_ == null ? stateInfo_ : stateInfoBuilder_.build(); to_bitField0_ |= 0x00000010; } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.nodeType_ = nodeType_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.persistenceConfig_ = + persistenceConfigBuilder_ == null + ? persistenceConfig_ + : persistenceConfigBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.redisConfigs_ = internalGetRedisConfigs(); + result.redisConfigs_.makeImmutable(); + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.preciseSizeGb_ = preciseSizeGb_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.zoneDistributionConfig_ = + zoneDistributionConfigBuilder_ == null + ? zoneDistributionConfig_ + : zoneDistributionConfigBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.deletionProtectionEnabled_ = deletionProtectionEnabled_; + to_bitField0_ |= 0x00000100; + } result.bitField0_ |= to_bitField0_; } @@ -3255,6 +3760,23 @@ public Builder mergeFrom(com.google.cloud.redis.cluster.v1.Cluster other) { if (other.hasStateInfo()) { mergeStateInfo(other.getStateInfo()); } + if (other.nodeType_ != 0) { + setNodeTypeValue(other.getNodeTypeValue()); + } + if (other.hasPersistenceConfig()) { + mergePersistenceConfig(other.getPersistenceConfig()); + } + internalGetMutableRedisConfigs().mergeFrom(other.internalGetRedisConfigs()); + bitField0_ |= 0x00008000; + if (other.hasPreciseSizeGb()) { + setPreciseSizeGb(other.getPreciseSizeGb()); + } + if (other.hasZoneDistributionConfig()) { + mergeZoneDistributionConfig(other.getZoneDistributionConfig()); + } + if (other.hasDeletionProtectionEnabled()) { + setDeletionProtectionEnabled(other.getDeletionProtectionEnabled()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3382,6 +3904,50 @@ public Builder mergeFrom( bitField0_ |= 0x00001000; break; } // case 146 + case 152: + { + nodeType_ = input.readEnum(); + bitField0_ |= 0x00002000; + break; + } // case 152 + case 162: + { + input.readMessage( + getPersistenceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 162 + case 170: + { + com.google.protobuf.MapEntry redisConfigs__ = + input.readMessage( + RedisConfigsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableRedisConfigs() + .getMutableMap() + .put(redisConfigs__.getKey(), redisConfigs__.getValue()); + bitField0_ |= 0x00008000; + break; + } // case 170 + case 177: + { + preciseSizeGb_ = input.readDouble(); + bitField0_ |= 0x00010000; + break; + } // case 177 + case 186: + { + input.readMessage( + getZoneDistributionConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 186 + case 200: + { + deletionProtectionEnabled_ = input.readBool(); + bitField0_ |= 0x00040000; + break; + } // case 200 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4219,7 +4785,8 @@ public Builder clearTransitEncryptionMode() { * * *
-     * Output only. Redis memory size in GB for the entire cluster.
+     * Output only. Redis memory size in GB for the entire cluster rounded up to
+     * the next integer.
      * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -4234,7 +4801,8 @@ public boolean hasSizeGb() { * * *
-     * Output only. Redis memory size in GB for the entire cluster.
+     * Output only. Redis memory size in GB for the entire cluster rounded up to
+     * the next integer.
      * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -4249,7 +4817,8 @@ public int getSizeGb() { * * *
-     * Output only. Redis memory size in GB for the entire cluster.
+     * Output only. Redis memory size in GB for the entire cluster rounded up to
+     * the next integer.
      * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -4268,7 +4837,8 @@ public Builder setSizeGb(int value) { * * *
-     * Output only. Redis memory size in GB for the entire cluster.
+     * Output only. Redis memory size in GB for the entire cluster rounded up to
+     * the next integer.
      * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -5810,6 +6380,864 @@ public com.google.cloud.redis.cluster.v1.Cluster.StateInfoOrBuilder getStateInfo return stateInfoBuilder_; } + private int nodeType_ = 0; + /** + * + * + *
+     * Optional. The type of a redis node in the cluster. NodeType determines the
+     * underlying machine-type of a redis node.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nodeType. + */ + @java.lang.Override + public int getNodeTypeValue() { + return nodeType_; + } + /** + * + * + *
+     * Optional. The type of a redis node in the cluster. NodeType determines the
+     * underlying machine-type of a redis node.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for nodeType to set. + * @return This builder for chaining. + */ + public Builder setNodeTypeValue(int value) { + nodeType_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The type of a redis node in the cluster. NodeType determines the
+     * underlying machine-type of a redis node.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nodeType. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.NodeType getNodeType() { + com.google.cloud.redis.cluster.v1.NodeType result = + com.google.cloud.redis.cluster.v1.NodeType.forNumber(nodeType_); + return result == null ? com.google.cloud.redis.cluster.v1.NodeType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Optional. The type of a redis node in the cluster. NodeType determines the
+     * underlying machine-type of a redis node.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The nodeType to set. + * @return This builder for chaining. + */ + public Builder setNodeType(com.google.cloud.redis.cluster.v1.NodeType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00002000; + nodeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The type of a redis node in the cluster. NodeType determines the
+     * underlying machine-type of a redis node.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearNodeType() { + bitField0_ = (bitField0_ & ~0x00002000); + nodeType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistenceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.Builder, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfigOrBuilder> + persistenceConfigBuilder_; + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the persistenceConfig field is set. + */ + public boolean hasPersistenceConfig() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The persistenceConfig. + */ + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig getPersistenceConfig() { + if (persistenceConfigBuilder_ == null) { + return persistenceConfig_ == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.getDefaultInstance() + : persistenceConfig_; + } else { + return persistenceConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPersistenceConfig( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig value) { + if (persistenceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + persistenceConfig_ = value; + } else { + persistenceConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPersistenceConfig( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.Builder builderForValue) { + if (persistenceConfigBuilder_ == null) { + persistenceConfig_ = builderForValue.build(); + } else { + persistenceConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePersistenceConfig( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig value) { + if (persistenceConfigBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && persistenceConfig_ != null + && persistenceConfig_ + != com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig + .getDefaultInstance()) { + getPersistenceConfigBuilder().mergeFrom(value); + } else { + persistenceConfig_ = value; + } + } else { + persistenceConfigBuilder_.mergeFrom(value); + } + if (persistenceConfig_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPersistenceConfig() { + bitField0_ = (bitField0_ & ~0x00004000); + persistenceConfig_ = null; + if (persistenceConfigBuilder_ != null) { + persistenceConfigBuilder_.dispose(); + persistenceConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.Builder + getPersistenceConfigBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getPersistenceConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfigOrBuilder + getPersistenceConfigOrBuilder() { + if (persistenceConfigBuilder_ != null) { + return persistenceConfigBuilder_.getMessageOrBuilder(); + } else { + return persistenceConfig_ == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.getDefaultInstance() + : persistenceConfig_; + } + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.Builder, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfigOrBuilder> + getPersistenceConfigFieldBuilder() { + if (persistenceConfigBuilder_ == null) { + persistenceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.Builder, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfigOrBuilder>( + getPersistenceConfig(), getParentForChildren(), isClean()); + persistenceConfig_ = null; + } + return persistenceConfigBuilder_; + } + + private com.google.protobuf.MapField redisConfigs_; + + private com.google.protobuf.MapField + internalGetRedisConfigs() { + if (redisConfigs_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RedisConfigsDefaultEntryHolder.defaultEntry); + } + return redisConfigs_; + } + + private com.google.protobuf.MapField + internalGetMutableRedisConfigs() { + if (redisConfigs_ == null) { + redisConfigs_ = + com.google.protobuf.MapField.newMapField(RedisConfigsDefaultEntryHolder.defaultEntry); + } + if (!redisConfigs_.isMutable()) { + redisConfigs_ = redisConfigs_.copy(); + } + bitField0_ |= 0x00008000; + onChanged(); + return redisConfigs_; + } + + public int getRedisConfigsCount() { + return internalGetRedisConfigs().getMap().size(); + } + /** + * + * + *
+     * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+     * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsRedisConfigs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetRedisConfigs().getMap().containsKey(key); + } + /** Use {@link #getRedisConfigsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRedisConfigs() { + return getRedisConfigsMap(); + } + /** + * + * + *
+     * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+     * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getRedisConfigsMap() { + return internalGetRedisConfigs().getMap(); + } + /** + * + * + *
+     * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+     * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getRedisConfigsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRedisConfigs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+     * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getRedisConfigsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRedisConfigs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearRedisConfigs() { + bitField0_ = (bitField0_ & ~0x00008000); + internalGetMutableRedisConfigs().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+     * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeRedisConfigs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableRedisConfigs().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableRedisConfigs() { + bitField0_ |= 0x00008000; + return internalGetMutableRedisConfigs().getMutableMap(); + } + /** + * + * + *
+     * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+     * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putRedisConfigs(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableRedisConfigs().getMutableMap().put(key, value); + bitField0_ |= 0x00008000; + return this; + } + /** + * + * + *
+     * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+     * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllRedisConfigs(java.util.Map values) { + internalGetMutableRedisConfigs().getMutableMap().putAll(values); + bitField0_ |= 0x00008000; + return this; + } + + private double preciseSizeGb_; + /** + * + * + *
+     * Output only. Precise value of redis memory size in GB for the entire
+     * cluster.
+     * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the preciseSizeGb field is set. + */ + @java.lang.Override + public boolean hasPreciseSizeGb() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+     * Output only. Precise value of redis memory size in GB for the entire
+     * cluster.
+     * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The preciseSizeGb. + */ + @java.lang.Override + public double getPreciseSizeGb() { + return preciseSizeGb_; + } + /** + * + * + *
+     * Output only. Precise value of redis memory size in GB for the entire
+     * cluster.
+     * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The preciseSizeGb to set. + * @return This builder for chaining. + */ + public Builder setPreciseSizeGb(double value) { + + preciseSizeGb_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Precise value of redis memory size in GB for the entire
+     * cluster.
+     * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearPreciseSizeGb() { + bitField0_ = (bitField0_ & ~0x00010000); + preciseSizeGb_ = 0D; + onChanged(); + return this; + } + + private com.google.cloud.redis.cluster.v1.ZoneDistributionConfig zoneDistributionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig, + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.Builder, + com.google.cloud.redis.cluster.v1.ZoneDistributionConfigOrBuilder> + zoneDistributionConfigBuilder_; + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the zoneDistributionConfig field is set. + */ + public boolean hasZoneDistributionConfig() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The zoneDistributionConfig. + */ + public com.google.cloud.redis.cluster.v1.ZoneDistributionConfig getZoneDistributionConfig() { + if (zoneDistributionConfigBuilder_ == null) { + return zoneDistributionConfig_ == null + ? com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.getDefaultInstance() + : zoneDistributionConfig_; + } else { + return zoneDistributionConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setZoneDistributionConfig( + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig value) { + if (zoneDistributionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + zoneDistributionConfig_ = value; + } else { + zoneDistributionConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setZoneDistributionConfig( + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.Builder builderForValue) { + if (zoneDistributionConfigBuilder_ == null) { + zoneDistributionConfig_ = builderForValue.build(); + } else { + zoneDistributionConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeZoneDistributionConfig( + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig value) { + if (zoneDistributionConfigBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) + && zoneDistributionConfig_ != null + && zoneDistributionConfig_ + != com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.getDefaultInstance()) { + getZoneDistributionConfigBuilder().mergeFrom(value); + } else { + zoneDistributionConfig_ = value; + } + } else { + zoneDistributionConfigBuilder_.mergeFrom(value); + } + if (zoneDistributionConfig_ != null) { + bitField0_ |= 0x00020000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearZoneDistributionConfig() { + bitField0_ = (bitField0_ & ~0x00020000); + zoneDistributionConfig_ = null; + if (zoneDistributionConfigBuilder_ != null) { + zoneDistributionConfigBuilder_.dispose(); + zoneDistributionConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.Builder + getZoneDistributionConfigBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getZoneDistributionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1.ZoneDistributionConfigOrBuilder + getZoneDistributionConfigOrBuilder() { + if (zoneDistributionConfigBuilder_ != null) { + return zoneDistributionConfigBuilder_.getMessageOrBuilder(); + } else { + return zoneDistributionConfig_ == null + ? com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.getDefaultInstance() + : zoneDistributionConfig_; + } + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig, + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.Builder, + com.google.cloud.redis.cluster.v1.ZoneDistributionConfigOrBuilder> + getZoneDistributionConfigFieldBuilder() { + if (zoneDistributionConfigBuilder_ == null) { + zoneDistributionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig, + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.Builder, + com.google.cloud.redis.cluster.v1.ZoneDistributionConfigOrBuilder>( + getZoneDistributionConfig(), getParentForChildren(), isClean()); + zoneDistributionConfig_ = null; + } + return zoneDistributionConfigBuilder_; + } + + private boolean deletionProtectionEnabled_; + /** + * + * + *
+     * Optional. The delete operation will fail when the value is set to true.
+     * 
+ * + * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deletionProtectionEnabled field is set. + */ + @java.lang.Override + public boolean hasDeletionProtectionEnabled() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + * + * + *
+     * Optional. The delete operation will fail when the value is set to true.
+     * 
+ * + * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deletionProtectionEnabled. + */ + @java.lang.Override + public boolean getDeletionProtectionEnabled() { + return deletionProtectionEnabled_; + } + /** + * + * + *
+     * Optional. The delete operation will fail when the value is set to true.
+     * 
+ * + * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The deletionProtectionEnabled to set. + * @return This builder for chaining. + */ + public Builder setDeletionProtectionEnabled(boolean value) { + + deletionProtectionEnabled_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The delete operation will fail when the value is set to true.
+     * 
+ * + * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDeletionProtectionEnabled() { + bitField0_ = (bitField0_ & ~0x00040000); + deletionProtectionEnabled_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterOrBuilder.java index 650f1aa895e7..701192796fea 100644 --- a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterOrBuilder.java +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterOrBuilder.java @@ -238,7 +238,8 @@ public interface ClusterOrBuilder * * *
-   * Output only. Redis memory size in GB for the entire cluster.
+   * Output only. Redis memory size in GB for the entire cluster rounded up to
+   * the next integer.
    * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -250,7 +251,8 @@ public interface ClusterOrBuilder * * *
-   * Output only. Redis memory size in GB for the entire cluster.
+   * Output only. Redis memory size in GB for the entire cluster rounded up to
+   * the next integer.
    * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -531,4 +533,239 @@ com.google.cloud.redis.cluster.v1.DiscoveryEndpointOrBuilder getDiscoveryEndpoin *
*/ com.google.cloud.redis.cluster.v1.Cluster.StateInfoOrBuilder getStateInfoOrBuilder(); + + /** + * + * + *
+   * Optional. The type of a redis node in the cluster. NodeType determines the
+   * underlying machine-type of a redis node.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nodeType. + */ + int getNodeTypeValue(); + /** + * + * + *
+   * Optional. The type of a redis node in the cluster. NodeType determines the
+   * underlying machine-type of a redis node.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nodeType. + */ + com.google.cloud.redis.cluster.v1.NodeType getNodeType(); + + /** + * + * + *
+   * Optional. Persistence config (RDB, AOF) for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the persistenceConfig field is set. + */ + boolean hasPersistenceConfig(); + /** + * + * + *
+   * Optional. Persistence config (RDB, AOF) for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The persistenceConfig. + */ + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig getPersistenceConfig(); + /** + * + * + *
+   * Optional. Persistence config (RDB, AOF) for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfigOrBuilder + getPersistenceConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getRedisConfigsCount(); + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsRedisConfigs(java.lang.String key); + /** Use {@link #getRedisConfigsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getRedisConfigs(); + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getRedisConfigsMap(); + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getRedisConfigsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getRedisConfigsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Precise value of redis memory size in GB for the entire
+   * cluster.
+   * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the preciseSizeGb field is set. + */ + boolean hasPreciseSizeGb(); + /** + * + * + *
+   * Output only. Precise value of redis memory size in GB for the entire
+   * cluster.
+   * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The preciseSizeGb. + */ + double getPreciseSizeGb(); + + /** + * + * + *
+   * Optional. This config will be used to determine how the customer wants us
+   * to distribute cluster resources within the region.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the zoneDistributionConfig field is set. + */ + boolean hasZoneDistributionConfig(); + /** + * + * + *
+   * Optional. This config will be used to determine how the customer wants us
+   * to distribute cluster resources within the region.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The zoneDistributionConfig. + */ + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig getZoneDistributionConfig(); + /** + * + * + *
+   * Optional. This config will be used to determine how the customer wants us
+   * to distribute cluster resources within the region.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.redis.cluster.v1.ZoneDistributionConfigOrBuilder + getZoneDistributionConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The delete operation will fail when the value is set to true.
+   * 
+ * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deletionProtectionEnabled field is set. + */ + boolean hasDeletionProtectionEnabled(); + /** + * + * + *
+   * Optional. The delete operation will fail when the value is set to true.
+   * 
+ * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deletionProtectionEnabled. + */ + boolean getDeletionProtectionEnabled(); } diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterPersistenceConfig.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterPersistenceConfig.java new file mode 100644 index 000000000000..54559c1d4daa --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterPersistenceConfig.java @@ -0,0 +1,3505 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1; + +/** + * + * + *
+ * Configuration of the persistence functionality.
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.ClusterPersistenceConfig} + */ +public final class ClusterPersistenceConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.ClusterPersistenceConfig) + ClusterPersistenceConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ClusterPersistenceConfig.newBuilder() to construct. + private ClusterPersistenceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ClusterPersistenceConfig() { + mode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ClusterPersistenceConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.class, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.Builder.class); + } + + /** + * + * + *
+   * Available persistence modes.
+   * 
+ * + * Protobuf enum {@code google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode} + */ + public enum PersistenceMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * PERSISTENCE_MODE_UNSPECIFIED = 0; + */ + PERSISTENCE_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Persistence is disabled, and any snapshot data is deleted.
+     * 
+ * + * DISABLED = 1; + */ + DISABLED(1), + /** + * + * + *
+     * RDB based persistence is enabled.
+     * 
+ * + * RDB = 2; + */ + RDB(2), + /** + * + * + *
+     * AOF based persistence is enabled.
+     * 
+ * + * AOF = 3; + */ + AOF(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * PERSISTENCE_MODE_UNSPECIFIED = 0; + */ + public static final int PERSISTENCE_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Persistence is disabled, and any snapshot data is deleted.
+     * 
+ * + * DISABLED = 1; + */ + public static final int DISABLED_VALUE = 1; + /** + * + * + *
+     * RDB based persistence is enabled.
+     * 
+ * + * RDB = 2; + */ + public static final int RDB_VALUE = 2; + /** + * + * + *
+     * AOF based persistence is enabled.
+     * 
+ * + * AOF = 3; + */ + public static final int AOF_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 PersistenceMode 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 PersistenceMode forNumber(int value) { + switch (value) { + case 0: + return PERSISTENCE_MODE_UNSPECIFIED; + case 1: + return DISABLED; + case 2: + return RDB; + case 3: + return AOF; + 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 PersistenceMode findValueByNumber(int number) { + return PersistenceMode.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final PersistenceMode[] VALUES = values(); + + public static PersistenceMode 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 PersistenceMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode) + } + + public interface RDBConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Period between RDB snapshots.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rdbSnapshotPeriod. + */ + int getRdbSnapshotPeriodValue(); + /** + * + * + *
+     * Optional. Period between RDB snapshots.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotPeriod. + */ + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + getRdbSnapshotPeriod(); + + /** + * + * + *
+     * Optional. The time that the first snapshot was/will be attempted, and to
+     * which future snapshots will be aligned. If not provided, the current time
+     * will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rdbSnapshotStartTime field is set. + */ + boolean hasRdbSnapshotStartTime(); + /** + * + * + *
+     * Optional. The time that the first snapshot was/will be attempted, and to
+     * which future snapshots will be aligned. If not provided, the current time
+     * will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotStartTime. + */ + com.google.protobuf.Timestamp getRdbSnapshotStartTime(); + /** + * + * + *
+     * Optional. The time that the first snapshot was/will be attempted, and to
+     * which future snapshots will be aligned. If not provided, the current time
+     * will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getRdbSnapshotStartTimeOrBuilder(); + } + /** + * + * + *
+   * Configuration of the RDB based persistence.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig} + */ + public static final class RDBConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig) + RDBConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RDBConfig.newBuilder() to construct. + private RDBConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RDBConfig() { + rdbSnapshotPeriod_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RDBConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_RDBConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_RDBConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.class, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.Builder.class); + } + + /** + * + * + *
+     * Available snapshot periods.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod} + */ + public enum SnapshotPeriod implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Not set.
+       * 
+ * + * SNAPSHOT_PERIOD_UNSPECIFIED = 0; + */ + SNAPSHOT_PERIOD_UNSPECIFIED(0), + /** + * + * + *
+       * One hour.
+       * 
+ * + * ONE_HOUR = 1; + */ + ONE_HOUR(1), + /** + * + * + *
+       * Six hours.
+       * 
+ * + * SIX_HOURS = 2; + */ + SIX_HOURS(2), + /** + * + * + *
+       * Twelve hours.
+       * 
+ * + * TWELVE_HOURS = 3; + */ + TWELVE_HOURS(3), + /** + * + * + *
+       * Twenty four hours.
+       * 
+ * + * TWENTY_FOUR_HOURS = 4; + */ + TWENTY_FOUR_HOURS(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Not set.
+       * 
+ * + * SNAPSHOT_PERIOD_UNSPECIFIED = 0; + */ + public static final int SNAPSHOT_PERIOD_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * One hour.
+       * 
+ * + * ONE_HOUR = 1; + */ + public static final int ONE_HOUR_VALUE = 1; + /** + * + * + *
+       * Six hours.
+       * 
+ * + * SIX_HOURS = 2; + */ + public static final int SIX_HOURS_VALUE = 2; + /** + * + * + *
+       * Twelve hours.
+       * 
+ * + * TWELVE_HOURS = 3; + */ + public static final int TWELVE_HOURS_VALUE = 3; + /** + * + * + *
+       * Twenty four hours.
+       * 
+ * + * TWENTY_FOUR_HOURS = 4; + */ + public static final int TWENTY_FOUR_HOURS_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 SnapshotPeriod 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 SnapshotPeriod forNumber(int value) { + switch (value) { + case 0: + return SNAPSHOT_PERIOD_UNSPECIFIED; + case 1: + return ONE_HOUR; + case 2: + return SIX_HOURS; + case 3: + return TWELVE_HOURS; + case 4: + return TWENTY_FOUR_HOURS; + 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 SnapshotPeriod findValueByNumber(int number) { + return SnapshotPeriod.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SnapshotPeriod[] VALUES = values(); + + public static SnapshotPeriod 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 SnapshotPeriod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod) + } + + private int bitField0_; + public static final int RDB_SNAPSHOT_PERIOD_FIELD_NUMBER = 1; + private int rdbSnapshotPeriod_ = 0; + /** + * + * + *
+     * Optional. Period between RDB snapshots.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rdbSnapshotPeriod. + */ + @java.lang.Override + public int getRdbSnapshotPeriodValue() { + return rdbSnapshotPeriod_; + } + /** + * + * + *
+     * Optional. Period between RDB snapshots.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotPeriod. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + getRdbSnapshotPeriod() { + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod result = + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + .forNumber(rdbSnapshotPeriod_); + return result == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + .UNRECOGNIZED + : result; + } + + public static final int RDB_SNAPSHOT_START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp rdbSnapshotStartTime_; + /** + * + * + *
+     * Optional. The time that the first snapshot was/will be attempted, and to
+     * which future snapshots will be aligned. If not provided, the current time
+     * will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rdbSnapshotStartTime field is set. + */ + @java.lang.Override + public boolean hasRdbSnapshotStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The time that the first snapshot was/will be attempted, and to
+     * which future snapshots will be aligned. If not provided, the current time
+     * will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotStartTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRdbSnapshotStartTime() { + return rdbSnapshotStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbSnapshotStartTime_; + } + /** + * + * + *
+     * Optional. The time that the first snapshot was/will be attempted, and to
+     * which future snapshots will be aligned. If not provided, the current time
+     * will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRdbSnapshotStartTimeOrBuilder() { + return rdbSnapshotStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbSnapshotStartTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (rdbSnapshotPeriod_ + != com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + .SNAPSHOT_PERIOD_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, rdbSnapshotPeriod_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getRdbSnapshotStartTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rdbSnapshotPeriod_ + != com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + .SNAPSHOT_PERIOD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, rdbSnapshotPeriod_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRdbSnapshotStartTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig other = + (com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig) obj; + + if (rdbSnapshotPeriod_ != other.rdbSnapshotPeriod_) return false; + if (hasRdbSnapshotStartTime() != other.hasRdbSnapshotStartTime()) return false; + if (hasRdbSnapshotStartTime()) { + if (!getRdbSnapshotStartTime().equals(other.getRdbSnapshotStartTime())) 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) + RDB_SNAPSHOT_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + rdbSnapshotPeriod_; + if (hasRdbSnapshotStartTime()) { + hash = (37 * hash) + RDB_SNAPSHOT_START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRdbSnapshotStartTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Configuration of the RDB based persistence.
+     * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig) + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_RDBConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_RDBConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.class, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.Builder.class); + } + + // Construct using + // com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRdbSnapshotStartTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rdbSnapshotPeriod_ = 0; + rdbSnapshotStartTime_ = null; + if (rdbSnapshotStartTimeBuilder_ != null) { + rdbSnapshotStartTimeBuilder_.dispose(); + rdbSnapshotStartTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_RDBConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig + getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig build() { + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig buildPartial() { + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig result = + new com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rdbSnapshotPeriod_ = rdbSnapshotPeriod_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rdbSnapshotStartTime_ = + rdbSnapshotStartTimeBuilder_ == null + ? rdbSnapshotStartTime_ + : rdbSnapshotStartTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig) { + return mergeFrom( + (com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig other) { + if (other + == com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig + .getDefaultInstance()) return this; + if (other.rdbSnapshotPeriod_ != 0) { + setRdbSnapshotPeriodValue(other.getRdbSnapshotPeriodValue()); + } + if (other.hasRdbSnapshotStartTime()) { + mergeRdbSnapshotStartTime(other.getRdbSnapshotStartTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + rdbSnapshotPeriod_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + getRdbSnapshotStartTimeFieldBuilder().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 rdbSnapshotPeriod_ = 0; + /** + * + * + *
+       * Optional. Period between RDB snapshots.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rdbSnapshotPeriod. + */ + @java.lang.Override + public int getRdbSnapshotPeriodValue() { + return rdbSnapshotPeriod_; + } + /** + * + * + *
+       * Optional. Period between RDB snapshots.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for rdbSnapshotPeriod to set. + * @return This builder for chaining. + */ + public Builder setRdbSnapshotPeriodValue(int value) { + rdbSnapshotPeriod_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Period between RDB snapshots.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotPeriod. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + getRdbSnapshotPeriod() { + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod result = + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + .forNumber(rdbSnapshotPeriod_); + return result == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Optional. Period between RDB snapshots.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The rdbSnapshotPeriod to set. + * @return This builder for chaining. + */ + public Builder setRdbSnapshotPeriod( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + rdbSnapshotPeriod_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Period between RDB snapshots.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRdbSnapshotPeriod() { + bitField0_ = (bitField0_ & ~0x00000001); + rdbSnapshotPeriod_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp rdbSnapshotStartTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + rdbSnapshotStartTimeBuilder_; + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rdbSnapshotStartTime field is set. + */ + public boolean hasRdbSnapshotStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotStartTime. + */ + public com.google.protobuf.Timestamp getRdbSnapshotStartTime() { + if (rdbSnapshotStartTimeBuilder_ == null) { + return rdbSnapshotStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbSnapshotStartTime_; + } else { + return rdbSnapshotStartTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRdbSnapshotStartTime(com.google.protobuf.Timestamp value) { + if (rdbSnapshotStartTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rdbSnapshotStartTime_ = value; + } else { + rdbSnapshotStartTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRdbSnapshotStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (rdbSnapshotStartTimeBuilder_ == null) { + rdbSnapshotStartTime_ = builderForValue.build(); + } else { + rdbSnapshotStartTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRdbSnapshotStartTime(com.google.protobuf.Timestamp value) { + if (rdbSnapshotStartTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && rdbSnapshotStartTime_ != null + && rdbSnapshotStartTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getRdbSnapshotStartTimeBuilder().mergeFrom(value); + } else { + rdbSnapshotStartTime_ = value; + } + } else { + rdbSnapshotStartTimeBuilder_.mergeFrom(value); + } + if (rdbSnapshotStartTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRdbSnapshotStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + rdbSnapshotStartTime_ = null; + if (rdbSnapshotStartTimeBuilder_ != null) { + rdbSnapshotStartTimeBuilder_.dispose(); + rdbSnapshotStartTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getRdbSnapshotStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRdbSnapshotStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getRdbSnapshotStartTimeOrBuilder() { + if (rdbSnapshotStartTimeBuilder_ != null) { + return rdbSnapshotStartTimeBuilder_.getMessageOrBuilder(); + } else { + return rdbSnapshotStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbSnapshotStartTime_; + } + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRdbSnapshotStartTimeFieldBuilder() { + if (rdbSnapshotStartTimeBuilder_ == null) { + rdbSnapshotStartTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRdbSnapshotStartTime(), getParentForChildren(), isClean()); + rdbSnapshotStartTime_ = null; + } + return rdbSnapshotStartTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig) + private static final com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig(); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RDBConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AOFConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. fsync configuration.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for appendFsync. + */ + int getAppendFsyncValue(); + /** + * + * + *
+     * Optional. fsync configuration.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The appendFsync. + */ + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync + getAppendFsync(); + } + /** + * + * + *
+   * Configuration of the AOF based persistence.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig} + */ + public static final class AOFConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig) + AOFConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AOFConfig.newBuilder() to construct. + private AOFConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AOFConfig() { + appendFsync_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AOFConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_AOFConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_AOFConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.class, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.Builder.class); + } + + /** + * + * + *
+     * Available fsync modes.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync} + */ + public enum AppendFsync implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Not set. Default: EVERYSEC
+       * 
+ * + * APPEND_FSYNC_UNSPECIFIED = 0; + */ + APPEND_FSYNC_UNSPECIFIED(0), + /** + * + * + *
+       * Never fsync. Normally Linux will flush data every 30 seconds with this
+       * configuration, but it's up to the kernel's exact tuning.
+       * 
+ * + * NO = 1; + */ + NO(1), + /** + * + * + *
+       * fsync every second. Fast enough, and you may lose 1 second of data if
+       * there is a disaster
+       * 
+ * + * EVERYSEC = 2; + */ + EVERYSEC(2), + /** + * + * + *
+       * fsync every time new commands are appended to the AOF. It has the best
+       * data loss protection at the cost of performance
+       * 
+ * + * ALWAYS = 3; + */ + ALWAYS(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Not set. Default: EVERYSEC
+       * 
+ * + * APPEND_FSYNC_UNSPECIFIED = 0; + */ + public static final int APPEND_FSYNC_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Never fsync. Normally Linux will flush data every 30 seconds with this
+       * configuration, but it's up to the kernel's exact tuning.
+       * 
+ * + * NO = 1; + */ + public static final int NO_VALUE = 1; + /** + * + * + *
+       * fsync every second. Fast enough, and you may lose 1 second of data if
+       * there is a disaster
+       * 
+ * + * EVERYSEC = 2; + */ + public static final int EVERYSEC_VALUE = 2; + /** + * + * + *
+       * fsync every time new commands are appended to the AOF. It has the best
+       * data loss protection at the cost of performance
+       * 
+ * + * ALWAYS = 3; + */ + public static final int ALWAYS_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 AppendFsync 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 AppendFsync forNumber(int value) { + switch (value) { + case 0: + return APPEND_FSYNC_UNSPECIFIED; + case 1: + return NO; + case 2: + return EVERYSEC; + case 3: + return ALWAYS; + 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 AppendFsync findValueByNumber(int number) { + return AppendFsync.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AppendFsync[] VALUES = values(); + + public static AppendFsync 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 AppendFsync(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync) + } + + public static final int APPEND_FSYNC_FIELD_NUMBER = 1; + private int appendFsync_ = 0; + /** + * + * + *
+     * Optional. fsync configuration.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for appendFsync. + */ + @java.lang.Override + public int getAppendFsyncValue() { + return appendFsync_; + } + /** + * + * + *
+     * Optional. fsync configuration.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The appendFsync. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync + getAppendFsync() { + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync result = + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync + .forNumber(appendFsync_); + return result == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync + .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 (appendFsync_ + != com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync + .APPEND_FSYNC_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, appendFsync_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (appendFsync_ + != com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync + .APPEND_FSYNC_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, appendFsync_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig other = + (com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig) obj; + + if (appendFsync_ != other.appendFsync_) 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) + APPEND_FSYNC_FIELD_NUMBER; + hash = (53 * hash) + appendFsync_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Configuration of the AOF based persistence.
+     * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig) + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_AOFConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_AOFConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.class, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.Builder.class); + } + + // Construct using + // com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + appendFsync_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_AOFConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig + getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig build() { + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig buildPartial() { + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig result = + new com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.appendFsync_ = appendFsync_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig) { + return mergeFrom( + (com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig other) { + if (other + == com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig + .getDefaultInstance()) return this; + if (other.appendFsync_ != 0) { + setAppendFsyncValue(other.getAppendFsyncValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + appendFsync_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int appendFsync_ = 0; + /** + * + * + *
+       * Optional. fsync configuration.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for appendFsync. + */ + @java.lang.Override + public int getAppendFsyncValue() { + return appendFsync_; + } + /** + * + * + *
+       * Optional. fsync configuration.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for appendFsync to set. + * @return This builder for chaining. + */ + public Builder setAppendFsyncValue(int value) { + appendFsync_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. fsync configuration.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The appendFsync. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync + getAppendFsync() { + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync result = + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync + .forNumber(appendFsync_); + return result == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Optional. fsync configuration.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The appendFsync to set. + * @return This builder for chaining. + */ + public Builder setAppendFsync( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + appendFsync_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. fsync configuration.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAppendFsync() { + bitField0_ = (bitField0_ & ~0x00000001); + appendFsync_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig) + private static final com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig(); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AOFConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int MODE_FIELD_NUMBER = 1; + private int mode_ = 0; + /** + * + * + *
+   * Optional. The mode of persistence.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+   * Optional. The mode of persistence.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode getMode() { + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode result = + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode.forNumber(mode_); + return result == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode.UNRECOGNIZED + : result; + } + + public static final int RDB_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdbConfig_; + /** + * + * + *
+   * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rdbConfig field is set. + */ + @java.lang.Override + public boolean hasRdbConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbConfig. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig getRdbConfig() { + return rdbConfig_ == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.getDefaultInstance() + : rdbConfig_; + } + /** + * + * + *
+   * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfigOrBuilder + getRdbConfigOrBuilder() { + return rdbConfig_ == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.getDefaultInstance() + : rdbConfig_; + } + + public static final int AOF_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aofConfig_; + /** + * + * + *
+   * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the aofConfig field is set. + */ + @java.lang.Override + public boolean hasAofConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The aofConfig. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig getAofConfig() { + return aofConfig_ == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.getDefaultInstance() + : aofConfig_; + } + /** + * + * + *
+   * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfigOrBuilder + getAofConfigOrBuilder() { + return aofConfig_ == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.getDefaultInstance() + : aofConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (mode_ + != com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode + .PERSISTENCE_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, mode_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getRdbConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getAofConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mode_ + != com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode + .PERSISTENCE_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRdbConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAofConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.redis.cluster.v1.ClusterPersistenceConfig)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig other = + (com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig) obj; + + if (mode_ != other.mode_) return false; + if (hasRdbConfig() != other.hasRdbConfig()) return false; + if (hasRdbConfig()) { + if (!getRdbConfig().equals(other.getRdbConfig())) return false; + } + if (hasAofConfig() != other.hasAofConfig()) return false; + if (hasAofConfig()) { + if (!getAofConfig().equals(other.getAofConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + if (hasRdbConfig()) { + hash = (37 * hash) + RDB_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getRdbConfig().hashCode(); + } + if (hasAofConfig()) { + hash = (37 * hash) + AOF_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAofConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1.ClusterPersistenceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Configuration of the persistence functionality.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.ClusterPersistenceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.ClusterPersistenceConfig) + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.class, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRdbConfigFieldBuilder(); + getAofConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mode_ = 0; + rdbConfig_ = null; + if (rdbConfigBuilder_ != null) { + rdbConfigBuilder_.dispose(); + rdbConfigBuilder_ = null; + } + aofConfig_ = null; + if (aofConfigBuilder_ != null) { + aofConfigBuilder_.dispose(); + aofConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ClusterPersistenceConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig build() { + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig buildPartial() { + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig result = + new com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mode_ = mode_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rdbConfig_ = rdbConfigBuilder_ == null ? rdbConfig_ : rdbConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.aofConfig_ = aofConfigBuilder_ == null ? aofConfig_ : aofConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig) { + return mergeFrom((com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig other) { + if (other == com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.getDefaultInstance()) + return this; + if (other.mode_ != 0) { + setModeValue(other.getModeValue()); + } + if (other.hasRdbConfig()) { + mergeRdbConfig(other.getRdbConfig()); + } + if (other.hasAofConfig()) { + mergeAofConfig(other.getAofConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mode_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getRdbConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getAofConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int mode_ = 0; + /** + * + * + *
+     * Optional. The mode of persistence.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+     * Optional. The mode of persistence.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. + */ + public Builder setModeValue(int value) { + mode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mode of persistence.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode getMode() { + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode result = + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode.forNumber( + mode_); + return result == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The mode of persistence.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + mode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mode of persistence.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000001); + mode_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdbConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.Builder, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfigOrBuilder> + rdbConfigBuilder_; + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rdbConfig field is set. + */ + public boolean hasRdbConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbConfig. + */ + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig getRdbConfig() { + if (rdbConfigBuilder_ == null) { + return rdbConfig_ == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig + .getDefaultInstance() + : rdbConfig_; + } else { + return rdbConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRdbConfig( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig value) { + if (rdbConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rdbConfig_ = value; + } else { + rdbConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRdbConfig( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.Builder + builderForValue) { + if (rdbConfigBuilder_ == null) { + rdbConfig_ = builderForValue.build(); + } else { + rdbConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRdbConfig( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig value) { + if (rdbConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && rdbConfig_ != null + && rdbConfig_ + != com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig + .getDefaultInstance()) { + getRdbConfigBuilder().mergeFrom(value); + } else { + rdbConfig_ = value; + } + } else { + rdbConfigBuilder_.mergeFrom(value); + } + if (rdbConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRdbConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + rdbConfig_ = null; + if (rdbConfigBuilder_ != null) { + rdbConfigBuilder_.dispose(); + rdbConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.Builder + getRdbConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRdbConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfigOrBuilder + getRdbConfigOrBuilder() { + if (rdbConfigBuilder_ != null) { + return rdbConfigBuilder_.getMessageOrBuilder(); + } else { + return rdbConfig_ == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig + .getDefaultInstance() + : rdbConfig_; + } + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.Builder, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfigOrBuilder> + getRdbConfigFieldBuilder() { + if (rdbConfigBuilder_ == null) { + rdbConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.Builder, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfigOrBuilder>( + getRdbConfig(), getParentForChildren(), isClean()); + rdbConfig_ = null; + } + return rdbConfigBuilder_; + } + + private com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aofConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.Builder, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfigOrBuilder> + aofConfigBuilder_; + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the aofConfig field is set. + */ + public boolean hasAofConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The aofConfig. + */ + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig getAofConfig() { + if (aofConfigBuilder_ == null) { + return aofConfig_ == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig + .getDefaultInstance() + : aofConfig_; + } else { + return aofConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAofConfig( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig value) { + if (aofConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aofConfig_ = value; + } else { + aofConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAofConfig( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.Builder + builderForValue) { + if (aofConfigBuilder_ == null) { + aofConfig_ = builderForValue.build(); + } else { + aofConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAofConfig( + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig value) { + if (aofConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && aofConfig_ != null + && aofConfig_ + != com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig + .getDefaultInstance()) { + getAofConfigBuilder().mergeFrom(value); + } else { + aofConfig_ = value; + } + } else { + aofConfigBuilder_.mergeFrom(value); + } + if (aofConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAofConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + aofConfig_ = null; + if (aofConfigBuilder_ != null) { + aofConfigBuilder_.dispose(); + aofConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.Builder + getAofConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAofConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfigOrBuilder + getAofConfigOrBuilder() { + if (aofConfigBuilder_ != null) { + return aofConfigBuilder_.getMessageOrBuilder(); + } else { + return aofConfig_ == null + ? com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig + .getDefaultInstance() + : aofConfig_; + } + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.Builder, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfigOrBuilder> + getAofConfigFieldBuilder() { + if (aofConfigBuilder_ == null) { + aofConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.Builder, + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfigOrBuilder>( + getAofConfig(), getParentForChildren(), isClean()); + aofConfig_ = null; + } + return aofConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.ClusterPersistenceConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.ClusterPersistenceConfig) + private static final com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig(); + } + + public static com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClusterPersistenceConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1.ClusterPersistenceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterPersistenceConfigOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterPersistenceConfigOrBuilder.java new file mode 100644 index 000000000000..5d32e44d4905 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterPersistenceConfigOrBuilder.java @@ -0,0 +1,139 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1; + +public interface ClusterPersistenceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.ClusterPersistenceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The mode of persistence.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + /** + * + * + *
+   * Optional. The mode of persistence.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode getMode(); + + /** + * + * + *
+   * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rdbConfig field is set. + */ + boolean hasRdbConfig(); + /** + * + * + *
+   * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbConfig. + */ + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig getRdbConfig(); + /** + * + * + *
+   * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfigOrBuilder + getRdbConfigOrBuilder(); + + /** + * + * + *
+   * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the aofConfig field is set. + */ + boolean hasAofConfig(); + /** + * + * + *
+   * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The aofConfig. + */ + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig getAofConfig(); + /** + * + * + *
+   * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfigOrBuilder + getAofConfigOrBuilder(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/GetClusterCertificateAuthorityRequest.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/GetClusterCertificateAuthorityRequest.java new file mode 100644 index 000000000000..477add503c58 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/GetClusterCertificateAuthorityRequest.java @@ -0,0 +1,673 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1; + +/** + * + * + *
+ * Request for
+ * [GetClusterCertificateAuthorityRequest][CloudRedis.GetClusterCertificateAuthorityRequest].
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest} + */ +public final class GetClusterCertificateAuthorityRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest) + GetClusterCertificateAuthorityRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetClusterCertificateAuthorityRequest.newBuilder() to construct. + private GetClusterCertificateAuthorityRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetClusterCertificateAuthorityRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetClusterCertificateAuthorityRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_GetClusterCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_GetClusterCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest.class, + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Redis cluster certificate authority resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+   * where `location_id` refers to a GCP 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. Redis cluster certificate authority resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+   * where `location_id` refers to a GCP 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.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.redis.cluster.v1.GetClusterCertificateAuthorityRequest)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest other = + (com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest) 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.redis.cluster.v1.GetClusterCertificateAuthorityRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1.GetClusterCertificateAuthorityRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for
+   * [GetClusterCertificateAuthorityRequest][CloudRedis.GetClusterCertificateAuthorityRequest].
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest) + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_GetClusterCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_GetClusterCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest.class, + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_GetClusterCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest + getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest build() { + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest buildPartial() { + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest result = + new com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest) { + return mergeFrom( + (com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest other) { + if (other + == com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest + .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. Redis cluster certificate authority resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+     * where `location_id` refers to a GCP 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. Redis cluster certificate authority resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+     * where `location_id` refers to a GCP 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. Redis cluster certificate authority resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+     * where `location_id` refers to a GCP 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. Redis cluster certificate authority resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+     * where `location_id` refers to a GCP 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. Redis cluster certificate authority resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+     * where `location_id` refers to a GCP 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest) + private static final com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest(); + } + + public static com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetClusterCertificateAuthorityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1.GetClusterCertificateAuthorityRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/GetClusterCertificateAuthorityRequestOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/GetClusterCertificateAuthorityRequestOrBuilder.java new file mode 100644 index 000000000000..ad62bfb97c55 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/GetClusterCertificateAuthorityRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1; + +public interface GetClusterCertificateAuthorityRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Redis cluster certificate authority resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Redis cluster certificate authority resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+   * where `location_id` refers to a GCP 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-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/NodeType.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/NodeType.java new file mode 100644 index 000000000000..7c52ca61d1df --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/NodeType.java @@ -0,0 +1,207 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1; + +/** + * + * + *
+ * NodeType of a redis cluster node,
+ * 
+ * + * Protobuf enum {@code google.cloud.redis.cluster.v1.NodeType} + */ +public enum NodeType implements com.google.protobuf.ProtocolMessageEnum { + /** NODE_TYPE_UNSPECIFIED = 0; */ + NODE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Redis shared core nano node_type.
+   * 
+ * + * REDIS_SHARED_CORE_NANO = 1; + */ + REDIS_SHARED_CORE_NANO(1), + /** + * + * + *
+   * Redis highmem medium node_type.
+   * 
+ * + * REDIS_HIGHMEM_MEDIUM = 2; + */ + REDIS_HIGHMEM_MEDIUM(2), + /** + * + * + *
+   * Redis highmem xlarge node_type.
+   * 
+ * + * REDIS_HIGHMEM_XLARGE = 3; + */ + REDIS_HIGHMEM_XLARGE(3), + /** + * + * + *
+   * Redis standard small node_type.
+   * 
+ * + * REDIS_STANDARD_SMALL = 4; + */ + REDIS_STANDARD_SMALL(4), + UNRECOGNIZED(-1), + ; + + /** NODE_TYPE_UNSPECIFIED = 0; */ + public static final int NODE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Redis shared core nano node_type.
+   * 
+ * + * REDIS_SHARED_CORE_NANO = 1; + */ + public static final int REDIS_SHARED_CORE_NANO_VALUE = 1; + /** + * + * + *
+   * Redis highmem medium node_type.
+   * 
+ * + * REDIS_HIGHMEM_MEDIUM = 2; + */ + public static final int REDIS_HIGHMEM_MEDIUM_VALUE = 2; + /** + * + * + *
+   * Redis highmem xlarge node_type.
+   * 
+ * + * REDIS_HIGHMEM_XLARGE = 3; + */ + public static final int REDIS_HIGHMEM_XLARGE_VALUE = 3; + /** + * + * + *
+   * Redis standard small node_type.
+   * 
+ * + * REDIS_STANDARD_SMALL = 4; + */ + public static final int REDIS_STANDARD_SMALL_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 NodeType 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 NodeType forNumber(int value) { + switch (value) { + case 0: + return NODE_TYPE_UNSPECIFIED; + case 1: + return REDIS_SHARED_CORE_NANO; + case 2: + return REDIS_HIGHMEM_MEDIUM; + case 3: + return REDIS_HIGHMEM_XLARGE; + case 4: + return REDIS_STANDARD_SMALL; + 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 NodeType findValueByNumber(int number) { + return NodeType.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final NodeType[] VALUES = values(); + + public static NodeType 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 NodeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1.NodeType) +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/TransitEncryptionMode.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/TransitEncryptionMode.java index 70d783d8559a..1d1879d301ff 100644 --- a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/TransitEncryptionMode.java +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/TransitEncryptionMode.java @@ -156,7 +156,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto.getDescriptor() .getEnumTypes() - .get(1); + .get(2); } private static final TransitEncryptionMode[] VALUES = values(); diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ZoneDistributionConfig.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ZoneDistributionConfig.java new file mode 100644 index 000000000000..e6942c661f9c --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ZoneDistributionConfig.java @@ -0,0 +1,992 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1; + +/** + * + * + *
+ * Zone distribution config for allocation of cluster resources.
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.ZoneDistributionConfig} + */ +public final class ZoneDistributionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.ZoneDistributionConfig) + ZoneDistributionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ZoneDistributionConfig.newBuilder() to construct. + private ZoneDistributionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ZoneDistributionConfig() { + mode_ = 0; + zone_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ZoneDistributionConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ZoneDistributionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ZoneDistributionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.class, + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.Builder.class); + } + + /** + * + * + *
+   * Defines various modes of zone distribution.
+   * Currently supports two modes, can be expanded in future to support more
+   * types of distribution modes.
+   * design doc: go/same-zone-cluster
+   * 
+ * + * Protobuf enum {@code google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode} + */ + public enum ZoneDistributionMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not Set. Default: MULTI_ZONE
+     * 
+ * + * ZONE_DISTRIBUTION_MODE_UNSPECIFIED = 0; + */ + ZONE_DISTRIBUTION_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Distribute all resources across 3 zones picked at random, within the
+     * region.
+     * 
+ * + * MULTI_ZONE = 1; + */ + MULTI_ZONE(1), + /** + * + * + *
+     * Distribute all resources in a single zone. The zone field must be
+     * specified, when this mode is selected.
+     * 
+ * + * SINGLE_ZONE = 2; + */ + SINGLE_ZONE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not Set. Default: MULTI_ZONE
+     * 
+ * + * ZONE_DISTRIBUTION_MODE_UNSPECIFIED = 0; + */ + public static final int ZONE_DISTRIBUTION_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Distribute all resources across 3 zones picked at random, within the
+     * region.
+     * 
+ * + * MULTI_ZONE = 1; + */ + public static final int MULTI_ZONE_VALUE = 1; + /** + * + * + *
+     * Distribute all resources in a single zone. The zone field must be
+     * specified, when this mode is selected.
+     * 
+ * + * SINGLE_ZONE = 2; + */ + public static final int SINGLE_ZONE_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 ZoneDistributionMode 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 ZoneDistributionMode forNumber(int value) { + switch (value) { + case 0: + return ZONE_DISTRIBUTION_MODE_UNSPECIFIED; + case 1: + return MULTI_ZONE; + case 2: + return SINGLE_ZONE; + 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 ZoneDistributionMode findValueByNumber(int number) { + return ZoneDistributionMode.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ZoneDistributionMode[] VALUES = values(); + + public static ZoneDistributionMode 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 ZoneDistributionMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode) + } + + public static final int MODE_FIELD_NUMBER = 1; + private int mode_ = 0; + /** + * + * + *
+   * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+   * specified.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+   * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+   * specified.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode getMode() { + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode result = + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode.forNumber( + mode_); + return result == null + ? com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode.UNRECOGNIZED + : result; + } + + public static final int ZONE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object zone_ = ""; + /** + * + * + *
+   * Optional. When SINGLE ZONE distribution is selected, zone field would be
+   * used to allocate all resources in that zone. This is not applicable to
+   * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. When SINGLE ZONE distribution is selected, zone field would be
+   * used to allocate all resources in that zone. This is not applicable to
+   * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = 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 (mode_ + != com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode + .ZONE_DISTRIBUTION_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, mode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, zone_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mode_ + != com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode + .ZONE_DISTRIBUTION_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, zone_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.redis.cluster.v1.ZoneDistributionConfig)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig other = + (com.google.cloud.redis.cluster.v1.ZoneDistributionConfig) obj; + + if (mode_ != other.mode_) return false; + if (!getZone().equals(other.getZone())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1.ZoneDistributionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.ZoneDistributionConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ZoneDistributionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.ZoneDistributionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ZoneDistributionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.ZoneDistributionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ZoneDistributionConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.ZoneDistributionConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ZoneDistributionConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.ZoneDistributionConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ZoneDistributionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.ZoneDistributionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1.ZoneDistributionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Zone distribution config for allocation of cluster resources.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.ZoneDistributionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.ZoneDistributionConfig) + com.google.cloud.redis.cluster.v1.ZoneDistributionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ZoneDistributionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ZoneDistributionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.class, + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mode_ = 0; + zone_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ZoneDistributionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ZoneDistributionConfig getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ZoneDistributionConfig build() { + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ZoneDistributionConfig buildPartial() { + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig result = + new com.google.cloud.redis.cluster.v1.ZoneDistributionConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1.ZoneDistributionConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mode_ = mode_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.zone_ = zone_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.ZoneDistributionConfig) { + return mergeFrom((com.google.cloud.redis.cluster.v1.ZoneDistributionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1.ZoneDistributionConfig other) { + if (other == com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.getDefaultInstance()) + return this; + if (other.mode_ != 0) { + setModeValue(other.getModeValue()); + } + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mode_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int mode_ = 0; + /** + * + * + *
+     * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+     * specified.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+     * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+     * specified.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. + */ + public Builder setModeValue(int value) { + mode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+     * specified.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode getMode() { + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode result = + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode.forNumber( + mode_); + return result == null + ? com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+     * specified.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode( + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + mode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+     * specified.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000001); + mode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object zone_ = ""; + /** + * + * + *
+     * Optional. When SINGLE ZONE distribution is selected, zone field would be
+     * used to allocate all resources in that zone. This is not applicable to
+     * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. When SINGLE ZONE distribution is selected, zone field would be
+     * used to allocate all resources in that zone. This is not applicable to
+     * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. When SINGLE ZONE distribution is selected, zone field would be
+     * used to allocate all resources in that zone. This is not applicable to
+     * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + zone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When SINGLE ZONE distribution is selected, zone field would be
+     * used to allocate all resources in that zone. This is not applicable to
+     * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + zone_ = getDefaultInstance().getZone(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When SINGLE ZONE distribution is selected, zone field would be
+     * used to allocate all resources in that zone. This is not applicable to
+     * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + zone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.ZoneDistributionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.ZoneDistributionConfig) + private static final com.google.cloud.redis.cluster.v1.ZoneDistributionConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.ZoneDistributionConfig(); + } + + public static com.google.cloud.redis.cluster.v1.ZoneDistributionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ZoneDistributionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1.ZoneDistributionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ZoneDistributionConfigOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ZoneDistributionConfigOrBuilder.java new file mode 100644 index 000000000000..e381b6dabf81 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ZoneDistributionConfigOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1; + +public interface ZoneDistributionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.ZoneDistributionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+   * specified.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + /** + * + * + *
+   * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+   * specified.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + com.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode getMode(); + + /** + * + * + *
+   * Optional. When SINGLE ZONE distribution is selected, zone field would be
+   * used to allocate all resources in that zone. This is not applicable to
+   * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The zone. + */ + java.lang.String getZone(); + /** + * + * + *
+   * Optional. When SINGLE ZONE distribution is selected, zone field would be
+   * used to allocate all resources in that zone. This is not applicable to
+   * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/proto/google/cloud/redis/cluster/v1/cloud_redis_cluster.proto b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/proto/google/cloud/redis/cluster/v1/cloud_redis_cluster.proto index 70fe73bea43d..b89fe889eb87 100644 --- a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/proto/google/cloud/redis/cluster/v1/cloud_redis_cluster.proto +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/proto/google/cloud/redis/cluster/v1/cloud_redis_cluster.proto @@ -134,6 +134,15 @@ service CloudRedisCluster { metadata_type: "google.protobuf.Any" }; } + + // Gets the details of certificate authority information for Redis cluster. + rpc GetClusterCertificateAuthority(GetClusterCertificateAuthorityRequest) + returns (CertificateAuthority) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/clusters/*/certificateAuthority}" + }; + option (google.api.method_signature) = "name"; + } } // Available authorization mode of a Redis cluster. @@ -148,6 +157,23 @@ enum AuthorizationMode { AUTH_MODE_DISABLED = 2; } +// NodeType of a redis cluster node, +enum NodeType { + NODE_TYPE_UNSPECIFIED = 0; + + // Redis shared core nano node_type. + REDIS_SHARED_CORE_NANO = 1; + + // Redis highmem medium node_type. + REDIS_HIGHMEM_MEDIUM = 2; + + // Redis highmem xlarge node_type. + REDIS_HIGHMEM_XLARGE = 3; + + // Redis standard small node_type. + REDIS_STANDARD_SMALL = 4; +} + // Available mode of in-transit encryption. enum TransitEncryptionMode { // In-transit encryption not set. @@ -282,6 +308,20 @@ message DeleteClusterRequest { string request_id = 2; } +// Request for +// [GetClusterCertificateAuthorityRequest][CloudRedis.GetClusterCertificateAuthorityRequest]. +message GetClusterCertificateAuthorityRequest { + // Required. Redis cluster certificate authority resource name using the form: + // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` + // where `location_id` refers to a GCP region. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "redis.googleapis.com/CertificateAuthority" + } + ]; +} + // A cluster instance. message Cluster { option (google.api.resource) = { @@ -353,7 +393,8 @@ message Cluster { TransitEncryptionMode transit_encryption_mode = 12 [(google.api.field_behavior) = OPTIONAL]; - // Output only. Redis memory size in GB for the entire cluster. + // Output only. Redis memory size in GB for the entire cluster rounded up to + // the next integer. optional int32 size_gb = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. Number of shards for the Redis cluster. @@ -376,6 +417,32 @@ message Cluster { // Output only. Additional information about the current state of the cluster. StateInfo state_info = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The type of a redis node in the cluster. NodeType determines the + // underlying machine-type of a redis node. + NodeType node_type = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Persistence config (RDB, AOF) for the cluster. + ClusterPersistenceConfig persistence_config = 20 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Key/Value pairs of customer overrides for mutable Redis Configs + map redis_configs = 21 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Precise value of redis memory size in GB for the entire + // cluster. + optional double precise_size_gb = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. This config will be used to determine how the customer wants us + // to distribute cluster resources within the region. + ZoneDistributionConfig zone_distribution_config = 23 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The delete operation will fail when the value is set to true. + optional bool deletion_protection_enabled = 25 + [(google.api.field_behavior) = OPTIONAL]; } message PscConfig { @@ -452,3 +519,143 @@ message OperationMetadata { // Output only. API version used to start the operation. string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } + +// Redis cluster certificate authority +message CertificateAuthority { + option (google.api.resource) = { + type: "redis.googleapis.com/CertificateAuthority" + pattern: "projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority" + }; + + message ManagedCertificateAuthority { + message CertChain { + // The certificates that form the CA chain, from leaf to root order. + repeated string certificates = 1; + } + + // The PEM encoded CA certificate chains for redis managed + // server authentication + repeated CertChain ca_certs = 1; + } + + // server ca information + oneof server_ca { + ManagedCertificateAuthority managed_server_ca = 1; + } + + // Identifier. Unique name of the resource in this scope including project, + // location and cluster using the form: + // `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority` + string name = 2 [(google.api.field_behavior) = IDENTIFIER]; +} + +// Configuration of the persistence functionality. +message ClusterPersistenceConfig { + // Configuration of the RDB based persistence. + message RDBConfig { + // Available snapshot periods. + enum SnapshotPeriod { + // Not set. + SNAPSHOT_PERIOD_UNSPECIFIED = 0; + + // One hour. + ONE_HOUR = 1; + + // Six hours. + SIX_HOURS = 2; + + // Twelve hours. + TWELVE_HOURS = 3; + + // Twenty four hours. + TWENTY_FOUR_HOURS = 4; + } + + // Optional. Period between RDB snapshots. + SnapshotPeriod rdb_snapshot_period = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The time that the first snapshot was/will be attempted, and to + // which future snapshots will be aligned. If not provided, the current time + // will be used. + google.protobuf.Timestamp rdb_snapshot_start_time = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration of the AOF based persistence. + message AOFConfig { + // Available fsync modes. + enum AppendFsync { + // Not set. Default: EVERYSEC + APPEND_FSYNC_UNSPECIFIED = 0; + + // Never fsync. Normally Linux will flush data every 30 seconds with this + // configuration, but it's up to the kernel's exact tuning. + NO = 1; + + // fsync every second. Fast enough, and you may lose 1 second of data if + // there is a disaster + EVERYSEC = 2; + + // fsync every time new commands are appended to the AOF. It has the best + // data loss protection at the cost of performance + ALWAYS = 3; + } + + // Optional. fsync configuration. + AppendFsync append_fsync = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Available persistence modes. + enum PersistenceMode { + // Not set. + PERSISTENCE_MODE_UNSPECIFIED = 0; + + // Persistence is disabled, and any snapshot data is deleted. + DISABLED = 1; + + // RDB based persistence is enabled. + RDB = 2; + + // AOF based persistence is enabled. + AOF = 3; + } + + // Optional. The mode of persistence. + PersistenceMode mode = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. RDB configuration. This field will be ignored if mode is not RDB. + RDBConfig rdb_config = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. AOF configuration. This field will be ignored if mode is not AOF. + AOFConfig aof_config = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Zone distribution config for allocation of cluster resources. +message ZoneDistributionConfig { + // Defines various modes of zone distribution. + // Currently supports two modes, can be expanded in future to support more + // types of distribution modes. + // design doc: go/same-zone-cluster + enum ZoneDistributionMode { + // Not Set. Default: MULTI_ZONE + ZONE_DISTRIBUTION_MODE_UNSPECIFIED = 0; + + // Distribute all resources across 3 zones picked at random, within the + // region. + MULTI_ZONE = 1; + + // Distribute all resources in a single zone. The zone field must be + // specified, when this mode is selected. + SINGLE_ZONE = 2; + } + + // Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not + // specified. + ZoneDistributionMode mode = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When SINGLE ZONE distribution is selected, zone field would be + // used to allocate all resources in that zone. This is not applicable to + // MULTI_ZONE, and would be ignored for MULTI_ZONE clusters. + string zone = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CertificateAuthority.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CertificateAuthority.java new file mode 100644 index 000000000000..09bf8a8d0eb4 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CertificateAuthority.java @@ -0,0 +1,3038 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1beta1; + +/** + * + * + *
+ * Redis cluster certificate authority
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.CertificateAuthority} + */ +public final class CertificateAuthority extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.CertificateAuthority) + CertificateAuthorityOrBuilder { + private static final long serialVersionUID = 0L; + // Use CertificateAuthority.newBuilder() to construct. + private CertificateAuthority(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CertificateAuthority() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CertificateAuthority(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.class, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.Builder.class); + } + + public interface ManagedCertificateAuthorityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + java.util.List< + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain> + getCaCertsList(); + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + getCaCerts(int index); + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + int getCaCertsCount(); + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChainOrBuilder> + getCaCertsOrBuilderList(); + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChainOrBuilder + getCaCertsOrBuilder(int index); + } + /** + * Protobuf type {@code + * google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority} + */ + public static final class ManagedCertificateAuthority + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority) + ManagedCertificateAuthorityOrBuilder { + private static final long serialVersionUID = 0L; + // Use ManagedCertificateAuthority.newBuilder() to construct. + private ManagedCertificateAuthority(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ManagedCertificateAuthority() { + caCerts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ManagedCertificateAuthority(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.class, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.Builder.class); + } + + public interface CertChainOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain) + 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); + } + /** + * Protobuf type {@code + * google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain} + */ + public static final class CertChain extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain) + CertChainOrBuilder { + private static final long serialVersionUID = 0L; + // Use CertChain.newBuilder() to construct. + private CertChain(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CertChain() { + certificates_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CertChain(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_CertChain_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_CertChain_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain.class, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain.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.GeneratedMessageV3.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.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + other = + (com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain) + 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.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain) + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChainOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_CertChain_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_CertChain_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain.class, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain.Builder.class); + } + + // Construct using + // com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_CertChain_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + build() { + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + buildPartial() { + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + result = + new com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + certificates_.makeImmutable(); + result.certificates_ = certificates_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain) { + return mergeFrom( + (com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + other) { + if (other + == com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain) + private static final com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain(); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CertChain parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CA_CERTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain> + caCerts_; + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain> + getCaCertsList() { + return caCerts_; + } + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChainOrBuilder> + getCaCertsOrBuilderList() { + return caCerts_; + } + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + @java.lang.Override + public int getCaCertsCount() { + return caCerts_.size(); + } + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + getCaCerts(int index) { + return caCerts_.get(index); + } + /** + * + * + *
+     * The PEM encoded CA certificate chains for redis managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChainOrBuilder + 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.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + other = + (com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority) + 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.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority) + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthorityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.class, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.Builder.class); + } + + // Construct using + // com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + build() { + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + buildPartial() { + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + result = + new com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + 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.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority) { + return mergeFrom( + (com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + other) { + if (other + == com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.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.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCaCertsFieldBuilder() + : 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.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain + m = + input.readMessage( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain.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.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain> + caCerts_ = java.util.Collections.emptyList(); + + private void ensureCaCertsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + caCerts_ = + new java.util.ArrayList< + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain>(caCerts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain.Builder, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChainOrBuilder> + caCertsBuilder_; + + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public java.util.List< + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain> + getCaCertsList() { + if (caCertsBuilder_ == null) { + return java.util.Collections.unmodifiableList(caCerts_); + } else { + return caCertsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public int getCaCertsCount() { + if (caCertsBuilder_ == null) { + return caCerts_.size(); + } else { + return caCertsBuilder_.getCount(); + } + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + getCaCerts(int index) { + if (caCertsBuilder_ == null) { + return caCerts_.get(index); + } else { + return caCertsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public Builder setCaCerts( + int index, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + 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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public Builder setCaCerts( + int index, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public Builder addCaCerts( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + 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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public Builder addCaCerts( + int index, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain + 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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public Builder addCaCerts( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public Builder addCaCerts( + int index, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public Builder addAllCaCerts( + java.lang.Iterable< + ? extends + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain> + 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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain 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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain 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 redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.Builder + getCaCertsBuilder(int index) { + return getCaCertsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChainOrBuilder + getCaCertsOrBuilder(int index) { + if (caCertsBuilder_ == null) { + return caCerts_.get(index); + } else { + return caCertsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChainOrBuilder> + getCaCertsOrBuilderList() { + if (caCertsBuilder_ != null) { + return caCertsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(caCerts_); + } + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.Builder + addCaCertsBuilder() { + return getCaCertsFieldBuilder() + .addBuilder( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain.getDefaultInstance()); + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .CertChain.Builder + addCaCertsBuilder(int index) { + return getCaCertsFieldBuilder() + .addBuilder( + index, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain.getDefaultInstance()); + } + /** + * + * + *
+       * The PEM encoded CA certificate chains for redis managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * + */ + public java.util.List< + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain.Builder> + getCaCertsBuilderList() { + return getCaCertsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain.Builder, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChainOrBuilder> + getCaCertsFieldBuilder() { + if (caCertsBuilder_ == null) { + caCertsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChain.Builder, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.CertChainOrBuilder>( + caCerts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + caCerts_ = null; + } + return caCertsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority) + private static final com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority(); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ManagedCertificateAuthority parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + 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(1), + 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 1: + 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 = 1; + /** + * + * .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + * + * @return Whether the managedServerCa field is set. + */ + @java.lang.Override + public boolean hasManagedServerCa() { + return serverCaCase_ == 1; + } + /** + * + * .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + * + * @return The managedServerCa. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + getManagedServerCa() { + if (serverCaCase_ == 1) { + return (com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority) + serverCa_; + } + return com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .getDefaultInstance(); + } + /** + * + * .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthorityOrBuilder + getManagedServerCaOrBuilder() { + if (serverCaCase_ == 1) { + return (com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority) + serverCa_; + } + return com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Identifier. Unique name of the resource in this scope including project,
+   * location and cluster using the form:
+   *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+   * 
+ * + * string name = 2 [(.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,
+   * location and cluster using the form:
+   *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+   * 
+ * + * string name = 2 [(.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 (serverCaCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority) + serverCa_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (serverCaCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority) + serverCa_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, 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.redis.cluster.v1beta1.CertificateAuthority)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority other = + (com.google.cloud.redis.cluster.v1beta1.CertificateAuthority) obj; + + if (!getName().equals(other.getName())) return false; + if (!getServerCaCase().equals(other.getServerCaCase())) return false; + switch (serverCaCase_) { + case 1: + 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 1: + 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.redis.cluster.v1beta1.CertificateAuthority parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1beta1.CertificateAuthority prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Redis cluster certificate authority
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.CertificateAuthority} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.CertificateAuthority) + com.google.cloud.redis.cluster.v1beta1.CertificateAuthorityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.class, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority build() { + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority buildPartial() { + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority result = + new com.google.cloud.redis.cluster.v1beta1.CertificateAuthority(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1beta1.CertificateAuthority result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + } + + private void buildPartialOneofs( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority result) { + result.serverCaCase_ = serverCaCase_; + result.serverCa_ = this.serverCa_; + if (serverCaCase_ == 1 && managedServerCaBuilder_ != null) { + result.serverCa_ = managedServerCaBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1beta1.CertificateAuthority) { + return mergeFrom((com.google.cloud.redis.cluster.v1beta1.CertificateAuthority) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1beta1.CertificateAuthority other) { + if (other == com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.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: + { + input.readMessage(getManagedServerCaFieldBuilder().getBuilder(), extensionRegistry); + serverCaCase_ = 1; + break; + } // case 10 + case 18: + { + name_ = 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 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.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .Builder, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthorityOrBuilder> + managedServerCaBuilder_; + /** + * + * .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + * + * @return Whether the managedServerCa field is set. + */ + @java.lang.Override + public boolean hasManagedServerCa() { + return serverCaCase_ == 1; + } + /** + * + * .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + * + * @return The managedServerCa. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + getManagedServerCa() { + if (managedServerCaBuilder_ == null) { + if (serverCaCase_ == 1) { + return (com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority) + serverCa_; + } + return com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.getDefaultInstance(); + } else { + if (serverCaCase_ == 1) { + return managedServerCaBuilder_.getMessage(); + } + return com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.getDefaultInstance(); + } + } + /** + * + * .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + public Builder setManagedServerCa( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + value) { + if (managedServerCaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serverCa_ = value; + onChanged(); + } else { + managedServerCaBuilder_.setMessage(value); + } + serverCaCase_ = 1; + return this; + } + /** + * + * .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + public Builder setManagedServerCa( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .Builder + builderForValue) { + if (managedServerCaBuilder_ == null) { + serverCa_ = builderForValue.build(); + onChanged(); + } else { + managedServerCaBuilder_.setMessage(builderForValue.build()); + } + serverCaCase_ = 1; + return this; + } + /** + * + * .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + public Builder mergeManagedServerCa( + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + value) { + if (managedServerCaBuilder_ == null) { + if (serverCaCase_ == 1 + && serverCa_ + != com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.getDefaultInstance()) { + serverCa_ = + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.newBuilder( + (com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority) + serverCa_) + .mergeFrom(value) + .buildPartial(); + } else { + serverCa_ = value; + } + onChanged(); + } else { + if (serverCaCase_ == 1) { + managedServerCaBuilder_.mergeFrom(value); + } else { + managedServerCaBuilder_.setMessage(value); + } + } + serverCaCase_ = 1; + return this; + } + /** + * + * .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + public Builder clearManagedServerCa() { + if (managedServerCaBuilder_ == null) { + if (serverCaCase_ == 1) { + serverCaCase_ = 0; + serverCa_ = null; + onChanged(); + } + } else { + if (serverCaCase_ == 1) { + serverCaCase_ = 0; + serverCa_ = null; + } + managedServerCaBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .Builder + getManagedServerCaBuilder() { + return getManagedServerCaFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthorityOrBuilder + getManagedServerCaOrBuilder() { + if ((serverCaCase_ == 1) && (managedServerCaBuilder_ != null)) { + return managedServerCaBuilder_.getMessageOrBuilder(); + } else { + if (serverCaCase_ == 1) { + return (com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority) + serverCa_; + } + return com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.getDefaultInstance(); + } + } + /** + * + * .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + .Builder, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthorityOrBuilder> + getManagedServerCaFieldBuilder() { + if (managedServerCaBuilder_ == null) { + if (!(serverCaCase_ == 1)) { + serverCa_ = + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.getDefaultInstance(); + } + managedServerCaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority.Builder, + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthorityOrBuilder>( + (com.google.cloud.redis.cluster.v1beta1.CertificateAuthority + .ManagedCertificateAuthority) + serverCa_, + getParentForChildren(), + isClean()); + serverCa_ = null; + } + serverCaCase_ = 1; + onChanged(); + return managedServerCaBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Identifier. Unique name of the resource in this scope including project,
+     * location and cluster using the form:
+     *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+     * 
+ * + * string name = 2 [(.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,
+     * location and cluster using the form:
+     *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+     * 
+ * + * string name = 2 [(.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,
+     * location and cluster using the form:
+     *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+     * 
+ * + * string name = 2 [(.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,
+     * location and cluster using the form:
+     *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+     * 
+ * + * string name = 2 [(.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,
+     * location and cluster using the form:
+     *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+     * 
+ * + * string name = 2 [(.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.CertificateAuthority) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.CertificateAuthority) + private static final com.google.cloud.redis.cluster.v1beta1.CertificateAuthority DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1beta1.CertificateAuthority(); + } + + public static com.google.cloud.redis.cluster.v1beta1.CertificateAuthority getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CertificateAuthority parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1beta1.CertificateAuthority getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CertificateAuthorityName.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CertificateAuthorityName.java new file mode 100644 index 000000000000..8f439ba8b6bd --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CertificateAuthorityName.java @@ -0,0 +1,225 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1; + +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 CertificateAuthorityName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CLUSTER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String cluster; + + @Deprecated + protected CertificateAuthorityName() { + project = null; + location = null; + cluster = null; + } + + private CertificateAuthorityName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + cluster = Preconditions.checkNotNull(builder.getCluster()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CertificateAuthorityName of(String project, String location, String cluster) { + return newBuilder().setProject(project).setLocation(location).setCluster(cluster).build(); + } + + public static String format(String project, String location, String cluster) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCluster(cluster) + .build() + .toString(); + } + + public static CertificateAuthorityName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CLUSTER.validatedMatch( + formattedString, "CertificateAuthorityName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("cluster")); + } + + 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 (CertificateAuthorityName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CLUSTER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (cluster != null) { + fieldMapBuilder.put("cluster", cluster); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CLUSTER.instantiate( + "project", project, "location", location, "cluster", cluster); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + CertificateAuthorityName that = ((CertificateAuthorityName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.cluster, that.cluster); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(cluster); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority. + */ + public static class Builder { + private String project; + private String location; + private String cluster; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCluster(String cluster) { + this.cluster = cluster; + return this; + } + + private Builder(CertificateAuthorityName certificateAuthorityName) { + this.project = certificateAuthorityName.project; + this.location = certificateAuthorityName.location; + this.cluster = certificateAuthorityName.cluster; + } + + public CertificateAuthorityName build() { + return new CertificateAuthorityName(this); + } + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CertificateAuthorityOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CertificateAuthorityOrBuilder.java new file mode 100644 index 000000000000..cdfbf262e9b3 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CertificateAuthorityOrBuilder.java @@ -0,0 +1,82 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1beta1; + +public interface CertificateAuthorityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.CertificateAuthority) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + * + * @return Whether the managedServerCa field is set. + */ + boolean hasManagedServerCa(); + /** + * + * .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + * + * @return The managedServerCa. + */ + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority + getManagedServerCa(); + /** + * + * .google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * + */ + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ManagedCertificateAuthorityOrBuilder + getManagedServerCaOrBuilder(); + + /** + * + * + *
+   * Identifier. Unique name of the resource in this scope including project,
+   * location and cluster using the form:
+   *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+   * 
+ * + * string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Identifier. Unique name of the resource in this scope including project,
+   * location and cluster using the form:
+   *     `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
+   * 
+ * + * string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + com.google.cloud.redis.cluster.v1beta1.CertificateAuthority.ServerCaCase getServerCaCase(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterProto.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterProto.java index cc010acc0513..b1a361553269 100644 --- a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterProto.java +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterProto.java @@ -52,6 +52,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_redis_cluster_v1beta1_DeleteClusterRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_redis_cluster_v1beta1_DeleteClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_GetClusterCertificateAuthorityRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_GetClusterCertificateAuthorityRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_redis_cluster_v1beta1_Cluster_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -64,6 +68,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_UpdateInfo_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_UpdateInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_Cluster_RedisConfigsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_Cluster_RedisConfigsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_redis_cluster_v1beta1_PscConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -80,6 +88,34 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_redis_cluster_v1beta1_OperationMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_redis_cluster_v1beta1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_CertChain_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_CertChain_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_RDBConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_RDBConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_AOFConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_AOFConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_ZoneDistributionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_ZoneDistributionConfig_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -118,91 +154,160 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".googleapis.com/Cluster\"^\n\024DeleteCluster" + "Request\0222\n\004name\030\001 \001(\tB$\340A\002\372A\036\n\034redis.goo" + "gleapis.com/Cluster\022\022\n\nrequest_id\030\002 \001(\t\"" - + "\327\t\n\007Cluster\022\021\n\004name\030\001 \001(\tB\003\340A\002\0224\n\013create" - + "_time\030\003 \001(\0132\032.google.protobuf.TimestampB" - + "\003\340A\003\022E\n\005state\030\004 \001(\01621.google.cloud.redis" - + ".cluster.v1beta1.Cluster.StateB\003\340A\003\022\020\n\003u" - + "id\030\005 \001(\tB\003\340A\003\022\037\n\rreplica_count\030\010 \001(\005B\003\340A" - + "\001H\000\210\001\001\022V\n\022authorization_mode\030\013 \001(\01625.goo" - + "gle.cloud.redis.cluster.v1beta1.Authoriz" - + "ationModeB\003\340A\001\022_\n\027transit_encryption_mod" - + "e\030\014 \001(\01629.google.cloud.redis.cluster.v1b" - + "eta1.TransitEncryptionModeB\003\340A\001\022\031\n\007size_" - + "gb\030\r \001(\005B\003\340A\003H\001\210\001\001\022\035\n\013shard_count\030\016 \001(\005B" - + "\003\340A\002H\002\210\001\001\022G\n\013psc_configs\030\017 \003(\0132-.google." - + "cloud.redis.cluster.v1beta1.PscConfigB\003\340" - + "A\002\022W\n\023discovery_endpoints\030\020 \003(\01325.google" - + ".cloud.redis.cluster.v1beta1.DiscoveryEn" - + "dpointB\003\340A\003\022O\n\017psc_connections\030\021 \003(\01321.g" - + "oogle.cloud.redis.cluster.v1beta1.PscCon" - + "nectionB\003\340A\003\022N\n\nstate_info\030\022 \001(\01325.googl" - + "e.cloud.redis.cluster.v1beta1.Cluster.St" - + "ateInfoB\003\340A\003\032\357\001\n\tStateInfo\022W\n\013update_inf" - + "o\030\001 \001(\0132@.google.cloud.redis.cluster.v1b" - + "eta1.Cluster.StateInfo.UpdateInfoH\000\032\200\001\n\n" - + "UpdateInfo\022\037\n\022target_shard_count\030\001 \001(\005H\000" - + "\210\001\001\022!\n\024target_replica_count\030\002 \001(\005H\001\210\001\001B\025" - + "\n\023_target_shard_countB\027\n\025_target_replica" - + "_countB\006\n\004info\"T\n\005State\022\025\n\021STATE_UNSPECI" - + "FIED\020\000\022\014\n\010CREATING\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010UPDA" - + "TING\020\003\022\014\n\010DELETING\020\004:]\352AZ\n\034redis.googlea" - + "pis.com/Cluster\022:projects/{project}/loca" - + "tions/{location}/clusters/{cluster}B\020\n\016_" - + "replica_countB\n\n\010_size_gbB\016\n\014_shard_coun" - + "t\"!\n\tPscConfig\022\024\n\007network\030\002 \001(\tB\003\340A\002\"\204\001\n" - + "\021DiscoveryEndpoint\022\024\n\007address\030\001 \001(\tB\003\340A\003" - + "\022\021\n\004port\030\002 \001(\005B\003\340A\003\022F\n\npsc_config\030\003 \001(\0132" - + "-.google.cloud.redis.cluster.v1beta1.Psc" - + "ConfigB\003\340A\003\"\215\001\n\rPscConnection\022\036\n\021psc_con" - + "nection_id\030\001 \001(\tB\003\340A\003\022\024\n\007address\030\002 \001(\tB\003" - + "\340A\003\022\034\n\017forwarding_rule\030\003 \001(\tB\003\340A\003\022\027\n\npro" - + "ject_id\030\004 \001(\tB\003\340A\003\022\017\n\007network\030\005 \001(\t\"\200\002\n\021" - + "OperationMetadata\0224\n\013create_time\030\001 \001(\0132\032" - + ".google.protobuf.TimestampB\003\340A\003\0221\n\010end_t" - + "ime\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340" - + "A\003\022\023\n\006target\030\003 \001(\tB\003\340A\003\022\021\n\004verb\030\004 \001(\tB\003\340" - + "A\003\022\033\n\016status_message\030\005 \001(\tB\003\340A\003\022#\n\026reque" - + "sted_cancellation\030\006 \001(\010B\003\340A\003\022\030\n\013api_vers" - + "ion\030\007 \001(\tB\003\340A\003*^\n\021AuthorizationMode\022\031\n\025A" - + "UTH_MODE_UNSPECIFIED\020\000\022\026\n\022AUTH_MODE_IAM_" - + "AUTH\020\001\022\026\n\022AUTH_MODE_DISABLED\020\002*\231\001\n\025Trans" - + "itEncryptionMode\022\'\n#TRANSIT_ENCRYPTION_M" - + "ODE_UNSPECIFIED\020\000\022$\n TRANSIT_ENCRYPTION_" - + "MODE_DISABLED\020\001\0221\n-TRANSIT_ENCRYPTION_MO" - + "DE_SERVER_AUTHENTICATION\020\0022\221\t\n\021CloudRedi" - + "sCluster\022\305\001\n\014ListClusters\0227.google.cloud" - + ".redis.cluster.v1beta1.ListClustersReque" - + "st\0328.google.cloud.redis.cluster.v1beta1." - + "ListClustersResponse\"B\332A\006parent\202\323\344\223\0023\0221/" - + "v1beta1/{parent=projects/*/locations/*}/" - + "clusters\022\262\001\n\nGetCluster\0225.google.cloud.r" - + "edis.cluster.v1beta1.GetClusterRequest\032+" - + ".google.cloud.redis.cluster.v1beta1.Clus" - + "ter\"@\332A\004name\202\323\344\223\0023\0221/v1beta1/{name=proje" - + "cts/*/locations/*/clusters/*}\022\354\001\n\rUpdate" - + "Cluster\0228.google.cloud.redis.cluster.v1b" - + "eta1.UpdateClusterRequest\032\035.google.longr" - + "unning.Operation\"\201\001\312A\036\n\007Cluster\022\023google." - + "protobuf.Any\332A\023cluster,update_mask\202\323\344\223\002D" - + "29/v1beta1/{cluster.name=projects/*/loca" - + "tions/*/clusters/*}:\007cluster\022\331\001\n\rDeleteC" - + "luster\0228.google.cloud.redis.cluster.v1be" - + "ta1.DeleteClusterRequest\032\035.google.longru" - + "nning.Operation\"o\312A,\n\025google.protobuf.Em" - + "pty\022\023google.protobuf.Any\332A\004name\202\323\344\223\0023*1/" + + "h\n%GetClusterCertificateAuthorityRequest" + + "\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)redis.googleapis" + + ".com/CertificateAuthority\"\365\r\n\007Cluster\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\002\0224\n\013create_time\030\003 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\022E\n\005state\030" + + "\004 \001(\01621.google.cloud.redis.cluster.v1bet" + + "a1.Cluster.StateB\003\340A\003\022\020\n\003uid\030\005 \001(\tB\003\340A\003\022" + + "\037\n\rreplica_count\030\010 \001(\005B\003\340A\001H\000\210\001\001\022V\n\022auth" + + "orization_mode\030\013 \001(\01625.google.cloud.redi" + + "s.cluster.v1beta1.AuthorizationModeB\003\340A\001" + + "\022_\n\027transit_encryption_mode\030\014 \001(\01629.goog" + + "le.cloud.redis.cluster.v1beta1.TransitEn" + + "cryptionModeB\003\340A\001\022\031\n\007size_gb\030\r \001(\005B\003\340A\003H" + + "\001\210\001\001\022\035\n\013shard_count\030\016 \001(\005B\003\340A\002H\002\210\001\001\022G\n\013p" + + "sc_configs\030\017 \003(\0132-.google.cloud.redis.cl" + + "uster.v1beta1.PscConfigB\003\340A\002\022W\n\023discover" + + "y_endpoints\030\020 \003(\01325.google.cloud.redis.c" + + "luster.v1beta1.DiscoveryEndpointB\003\340A\003\022O\n" + + "\017psc_connections\030\021 \003(\01321.google.cloud.re" + + "dis.cluster.v1beta1.PscConnectionB\003\340A\003\022N" + + "\n\nstate_info\030\022 \001(\01325.google.cloud.redis." + + "cluster.v1beta1.Cluster.StateInfoB\003\340A\003\022D" + + "\n\tnode_type\030\023 \001(\0162,.google.cloud.redis.c" + + "luster.v1beta1.NodeTypeB\003\340A\001\022]\n\022persiste" + + "nce_config\030\024 \001(\0132<.google.cloud.redis.cl" + + "uster.v1beta1.ClusterPersistenceConfigB\003" + + "\340A\001\022Y\n\rredis_configs\030\025 \003(\0132=.google.clou" + + "d.redis.cluster.v1beta1.Cluster.RedisCon" + + "figsEntryB\003\340A\001\022!\n\017precise_size_gb\030\026 \001(\001B" + + "\003\340A\003H\003\210\001\001\022a\n\030zone_distribution_config\030\027 " + + "\001(\0132:.google.cloud.redis.cluster.v1beta1" + + ".ZoneDistributionConfigB\003\340A\001\022-\n\033deletion" + + "_protection_enabled\030\031 \001(\010B\003\340A\001H\004\210\001\001\032\357\001\n\t" + + "StateInfo\022W\n\013update_info\030\001 \001(\0132@.google." + + "cloud.redis.cluster.v1beta1.Cluster.Stat" + + "eInfo.UpdateInfoH\000\032\200\001\n\nUpdateInfo\022\037\n\022tar" + + "get_shard_count\030\001 \001(\005H\000\210\001\001\022!\n\024target_rep" + + "lica_count\030\002 \001(\005H\001\210\001\001B\025\n\023_target_shard_c" + + "ountB\027\n\025_target_replica_countB\006\n\004info\0323\n" + + "\021RedisConfigsEntry\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\010CREATING\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010UPDATING" + + "\020\003\022\014\n\010DELETING\020\004:]\352AZ\n\034redis.googleapis." + + "com/Cluster\022:projects/{project}/location" + + "s/{location}/clusters/{cluster}B\020\n\016_repl" + + "ica_countB\n\n\010_size_gbB\016\n\014_shard_countB\022\n" + + "\020_precise_size_gbB\036\n\034_deletion_protectio" + + "n_enabled\"!\n\tPscConfig\022\024\n\007network\030\002 \001(\tB" + + "\003\340A\002\"\204\001\n\021DiscoveryEndpoint\022\024\n\007address\030\001 " + + "\001(\tB\003\340A\003\022\021\n\004port\030\002 \001(\005B\003\340A\003\022F\n\npsc_confi" + + "g\030\003 \001(\0132-.google.cloud.redis.cluster.v1b" + + "eta1.PscConfigB\003\340A\003\"\215\001\n\rPscConnection\022\036\n" + + "\021psc_connection_id\030\001 \001(\tB\003\340A\003\022\024\n\007address" + + "\030\002 \001(\tB\003\340A\003\022\034\n\017forwarding_rule\030\003 \001(\tB\003\340A" + + "\003\022\027\n\nproject_id\030\004 \001(\tB\003\340A\003\022\017\n\007network\030\005 " + + "\001(\t\"\200\002\n\021OperationMetadata\0224\n\013create_time" + + "\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "1\n\010end_time\030\002 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\022\023\n\006target\030\003 \001(\tB\003\340A\003\022\021\n\004verb\030" + + "\004 \001(\tB\003\340A\003\022\033\n\016status_message\030\005 \001(\tB\003\340A\003\022" + + "#\n\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030\n\013" + + "api_version\030\007 \001(\tB\003\340A\003\"\337\003\n\024CertificateAu" + + "thority\022q\n\021managed_server_ca\030\001 \001(\0132T.goo" + + "gle.cloud.redis.cluster.v1beta1.Certific" + + "ateAuthority.ManagedCertificateAuthority" + + "H\000\022\021\n\004name\030\002 \001(\tB\003\340A\010\032\262\001\n\033ManagedCertifi" + + "cateAuthority\022p\n\010ca_certs\030\001 \003(\0132^.google" + + ".cloud.redis.cluster.v1beta1.Certificate" + + "Authority.ManagedCertificateAuthority.Ce" + + "rtChain\032!\n\tCertChain\022\024\n\014certificates\030\001 \003" + + "(\t:\177\352A|\n)redis.googleapis.com/Certificat" + + "eAuthority\022Oprojects/{project}/locations" + + "/{location}/clusters/{cluster}/certifica" + + "teAuthorityB\013\n\tserver_ca\"\240\007\n\030ClusterPers" + + "istenceConfig\022_\n\004mode\030\001 \001(\0162L.google.clo" + + "ud.redis.cluster.v1beta1.ClusterPersiste" + + "nceConfig.PersistenceModeB\003\340A\001\022_\n\nrdb_co" + + "nfig\030\002 \001(\0132F.google.cloud.redis.cluster." + + "v1beta1.ClusterPersistenceConfig.RDBConf" + + "igB\003\340A\001\022_\n\naof_config\030\003 \001(\0132F.google.clo" + + "ud.redis.cluster.v1beta1.ClusterPersiste" + + "nceConfig.AOFConfigB\003\340A\001\032\277\002\n\tRDBConfig\022w" + + "\n\023rdb_snapshot_period\030\001 \001(\0162U.google.clo" + + "ud.redis.cluster.v1beta1.ClusterPersiste" + + "nceConfig.RDBConfig.SnapshotPeriodB\003\340A\001\022" + + "@\n\027rdb_snapshot_start_time\030\002 \001(\0132\032.googl" + + "e.protobuf.TimestampB\003\340A\001\"w\n\016SnapshotPer" + + "iod\022\037\n\033SNAPSHOT_PERIOD_UNSPECIFIED\020\000\022\014\n\010" + + "ONE_HOUR\020\001\022\r\n\tSIX_HOURS\020\002\022\020\n\014TWELVE_HOUR" + + "S\020\003\022\025\n\021TWENTY_FOUR_HOURS\020\004\032\311\001\n\tAOFConfig" + + "\022m\n\014append_fsync\030\001 \001(\0162R.google.cloud.re" + + "dis.cluster.v1beta1.ClusterPersistenceCo" + + "nfig.AOFConfig.AppendFsyncB\003\340A\001\"M\n\013Appen" + + "dFsync\022\034\n\030APPEND_FSYNC_UNSPECIFIED\020\000\022\006\n\002" + + "NO\020\001\022\014\n\010EVERYSEC\020\002\022\n\n\006ALWAYS\020\003\"S\n\017Persis" + + "tenceMode\022 \n\034PERSISTENCE_MODE_UNSPECIFIE" + + "D\020\000\022\014\n\010DISABLED\020\001\022\007\n\003RDB\020\002\022\007\n\003AOF\020\003\"\360\001\n\026" + + "ZoneDistributionConfig\022b\n\004mode\030\001 \001(\0162O.g" + + "oogle.cloud.redis.cluster.v1beta1.ZoneDi" + + "stributionConfig.ZoneDistributionModeB\003\340" + + "A\001\022\021\n\004zone\030\002 \001(\tB\003\340A\001\"_\n\024ZoneDistributio" + + "nMode\022&\n\"ZONE_DISTRIBUTION_MODE_UNSPECIF" + + "IED\020\000\022\016\n\nMULTI_ZONE\020\001\022\017\n\013SINGLE_ZONE\020\002*^" + + "\n\021AuthorizationMode\022\031\n\025AUTH_MODE_UNSPECI" + + "FIED\020\000\022\026\n\022AUTH_MODE_IAM_AUTH\020\001\022\026\n\022AUTH_M" + + "ODE_DISABLED\020\002*\217\001\n\010NodeType\022\031\n\025NODE_TYPE" + + "_UNSPECIFIED\020\000\022\032\n\026REDIS_SHARED_CORE_NANO" + + "\020\001\022\030\n\024REDIS_HIGHMEM_MEDIUM\020\002\022\030\n\024REDIS_HI" + + "GHMEM_XLARGE\020\003\022\030\n\024REDIS_STANDARD_SMALL\020\004" + + "*\231\001\n\025TransitEncryptionMode\022\'\n#TRANSIT_EN" + + "CRYPTION_MODE_UNSPECIFIED\020\000\022$\n TRANSIT_E" + + "NCRYPTION_MODE_DISABLED\020\001\0221\n-TRANSIT_ENC" + + "RYPTION_MODE_SERVER_AUTHENTICATION\020\0022\220\013\n" + + "\021CloudRedisCluster\022\305\001\n\014ListClusters\0227.go" + + "ogle.cloud.redis.cluster.v1beta1.ListClu" + + "stersRequest\0328.google.cloud.redis.cluste" + + "r.v1beta1.ListClustersResponse\"B\332A\006paren" + + "t\202\323\344\223\0023\0221/v1beta1/{parent=projects/*/loc" + + "ations/*}/clusters\022\262\001\n\nGetCluster\0225.goog" + + "le.cloud.redis.cluster.v1beta1.GetCluste" + + "rRequest\032+.google.cloud.redis.cluster.v1" + + "beta1.Cluster\"@\332A\004name\202\323\344\223\0023\0221/v1beta1/{" + + "name=projects/*/locations/*/clusters/*}\022" + + "\354\001\n\rUpdateCluster\0228.google.cloud.redis.c" + + "luster.v1beta1.UpdateClusterRequest\032\035.go" + + "ogle.longrunning.Operation\"\201\001\312A\036\n\007Cluste" + + "r\022\023google.protobuf.Any\332A\023cluster,update_" + + "mask\202\323\344\223\002D29/v1beta1/{cluster.name=proje" + + "cts/*/locations/*/clusters/*}:\007cluster\022\331" + + "\001\n\rDeleteCluster\0228.google.cloud.redis.cl" + + "uster.v1beta1.DeleteClusterRequest\032\035.goo" + + "gle.longrunning.Operation\"o\312A,\n\025google.p" + + "rotobuf.Empty\022\023google.protobuf.Any\332A\004nam" + + "e\202\323\344\223\0023*1/v1beta1/{name=projects/*/locat" + + "ions/*/clusters/*}\022\351\001\n\rCreateCluster\0228.g" + + "oogle.cloud.redis.cluster.v1beta1.Create" + + "ClusterRequest\032\035.google.longrunning.Oper" + + "ation\"\177\312A\036\n\007Cluster\022\023google.protobuf.Any" + + "\332A\031parent,cluster,cluster_id\202\323\344\223\002<\"1/v1b" + + "eta1/{parent=projects/*/locations/*}/clu" + + "sters:\007cluster\022\374\001\n\036GetClusterCertificate" + + "Authority\022I.google.cloud.redis.cluster.v" + + "1beta1.GetClusterCertificateAuthorityReq" + + "uest\0328.google.cloud.redis.cluster.v1beta" + + "1.CertificateAuthority\"U\332A\004name\202\323\344\223\002H\022F/" + "v1beta1/{name=projects/*/locations/*/clu" - + "sters/*}\022\351\001\n\rCreateCluster\0228.google.clou" - + "d.redis.cluster.v1beta1.CreateClusterReq" - + "uest\032\035.google.longrunning.Operation\"\177\312A\036" - + "\n\007Cluster\022\023google.protobuf.Any\332A\031parent," - + "cluster,cluster_id\202\323\344\223\002<\"1/v1beta1/{pare" - + "nt=projects/*/locations/*}/clusters:\007clu" - + "ster\032H\312A\024redis.googleapis.com\322A.https://" - + "www.googleapis.com/auth/cloud-platformB\204" - + "\001\n&com.google.cloud.redis.cluster.v1beta" - + "1B\026CloudRedisClusterProtoP\001Z@cloud.googl" - + "e.com/go/redis/cluster/apiv1beta1/cluste" - + "rpb;clusterpbb\006proto3" + + "sters/*/certificateAuthority}\032H\312A\024redis." + + "googleapis.com\322A.https://www.googleapis." + + "com/auth/cloud-platformB\255\001\n&com.google.c" + + "loud.redis.cluster.v1beta1B\026CloudRedisCl" + + "usterProtoP\001Z@cloud.google.com/go/redis/" + + "cluster/apiv1beta1/clusterpb;clusterpb\352\002" + + "&Google::Cloud::Redis::Cluster::V1beta1b" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -266,8 +371,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "RequestId", }); - internal_static_google_cloud_redis_cluster_v1beta1_Cluster_descriptor = + internal_static_google_cloud_redis_cluster_v1beta1_GetClusterCertificateAuthorityRequest_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_redis_cluster_v1beta1_GetClusterCertificateAuthorityRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1beta1_GetClusterCertificateAuthorityRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_redis_cluster_v1beta1_Cluster_descriptor = + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_redis_cluster_v1beta1_Cluster_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_cluster_v1beta1_Cluster_descriptor, @@ -285,6 +398,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DiscoveryEndpoints", "PscConnections", "StateInfo", + "NodeType", + "PersistenceConfig", + "RedisConfigs", + "PreciseSizeGb", + "ZoneDistributionConfig", + "DeletionProtectionEnabled", }); internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_descriptor = internal_static_google_cloud_redis_cluster_v1beta1_Cluster_descriptor @@ -306,8 +425,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "TargetShardCount", "TargetReplicaCount", }); + internal_static_google_cloud_redis_cluster_v1beta1_Cluster_RedisConfigsEntry_descriptor = + internal_static_google_cloud_redis_cluster_v1beta1_Cluster_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_redis_cluster_v1beta1_Cluster_RedisConfigsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1beta1_Cluster_RedisConfigsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_cloud_redis_cluster_v1beta1_PscConfig_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_redis_cluster_v1beta1_PscConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_cluster_v1beta1_PscConfig_descriptor, @@ -315,7 +444,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Network", }); internal_static_google_cloud_redis_cluster_v1beta1_DiscoveryEndpoint_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_redis_cluster_v1beta1_DiscoveryEndpoint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_cluster_v1beta1_DiscoveryEndpoint_descriptor, @@ -323,7 +452,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Address", "Port", "PscConfig", }); internal_static_google_cloud_redis_cluster_v1beta1_PscConnection_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_redis_cluster_v1beta1_PscConnection_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_cluster_v1beta1_PscConnection_descriptor, @@ -331,7 +460,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PscConnectionId", "Address", "ForwardingRule", "ProjectId", "Network", }); internal_static_google_cloud_redis_cluster_v1beta1_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_redis_cluster_v1beta1_OperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_cluster_v1beta1_OperationMetadata_descriptor, @@ -344,6 +473,70 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RequestedCancellation", "ApiVersion", }); + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_descriptor, + new java.lang.String[] { + "ManagedServerCa", "Name", "ServerCa", + }); + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_descriptor = + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_descriptor, + new java.lang.String[] { + "CaCerts", + }); + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_CertChain_descriptor = + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_CertChain_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1beta1_CertificateAuthority_ManagedCertificateAuthority_CertChain_descriptor, + new java.lang.String[] { + "Certificates", + }); + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_descriptor, + new java.lang.String[] { + "Mode", "RdbConfig", "AofConfig", + }); + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_RDBConfig_descriptor = + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_RDBConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_RDBConfig_descriptor, + new java.lang.String[] { + "RdbSnapshotPeriod", "RdbSnapshotStartTime", + }); + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_AOFConfig_descriptor = + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_AOFConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_AOFConfig_descriptor, + new java.lang.String[] { + "AppendFsync", + }); + internal_static_google_cloud_redis_cluster_v1beta1_ZoneDistributionConfig_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_redis_cluster_v1beta1_ZoneDistributionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1beta1_ZoneDistributionConfig_descriptor, + new java.lang.String[] { + "Mode", "Zone", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/Cluster.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/Cluster.java index 6132b222b12e..593ca48a444f 100644 --- a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/Cluster.java +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/Cluster.java @@ -47,6 +47,7 @@ private Cluster() { pscConfigs_ = java.util.Collections.emptyList(); discoveryEndpoints_ = java.util.Collections.emptyList(); pscConnections_ = java.util.Collections.emptyList(); + nodeType_ = 0; } @java.lang.Override @@ -60,6 +61,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 21: + return internalGetRedisConfigs(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -2236,7 +2249,8 @@ public com.google.cloud.redis.cluster.v1beta1.TransitEncryptionMode getTransitEn * * *
-   * Output only. Redis memory size in GB for the entire cluster.
+   * Output only. Redis memory size in GB for the entire cluster rounded up to
+   * the next integer.
    * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2251,7 +2265,8 @@ public boolean hasSizeGb() { * * *
-   * Output only. Redis memory size in GB for the entire cluster.
+   * Output only. Redis memory size in GB for the entire cluster rounded up to
+   * the next integer.
    * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2621,6 +2636,342 @@ public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfoOrBuilder getStat : stateInfo_; } + public static final int NODE_TYPE_FIELD_NUMBER = 19; + private int nodeType_ = 0; + /** + * + * + *
+   * Optional. The type of a redis node in the cluster. NodeType determines the
+   * underlying machine-type of a redis node.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nodeType. + */ + @java.lang.Override + public int getNodeTypeValue() { + return nodeType_; + } + /** + * + * + *
+   * Optional. The type of a redis node in the cluster. NodeType determines the
+   * underlying machine-type of a redis node.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nodeType. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.NodeType getNodeType() { + com.google.cloud.redis.cluster.v1beta1.NodeType result = + com.google.cloud.redis.cluster.v1beta1.NodeType.forNumber(nodeType_); + return result == null ? com.google.cloud.redis.cluster.v1beta1.NodeType.UNRECOGNIZED : result; + } + + public static final int PERSISTENCE_CONFIG_FIELD_NUMBER = 20; + private com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistenceConfig_; + /** + * + * + *
+   * Optional. Persistence config (RDB, AOF) for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the persistenceConfig field is set. + */ + @java.lang.Override + public boolean hasPersistenceConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Optional. Persistence config (RDB, AOF) for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The persistenceConfig. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig getPersistenceConfig() { + return persistenceConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.getDefaultInstance() + : persistenceConfig_; + } + /** + * + * + *
+   * Optional. Persistence config (RDB, AOF) for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfigOrBuilder + getPersistenceConfigOrBuilder() { + return persistenceConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.getDefaultInstance() + : persistenceConfig_; + } + + public static final int REDIS_CONFIGS_FIELD_NUMBER = 21; + + private static final class RedisConfigsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_RedisConfigsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField redisConfigs_; + + private com.google.protobuf.MapField + internalGetRedisConfigs() { + if (redisConfigs_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RedisConfigsDefaultEntryHolder.defaultEntry); + } + return redisConfigs_; + } + + public int getRedisConfigsCount() { + return internalGetRedisConfigs().getMap().size(); + } + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsRedisConfigs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetRedisConfigs().getMap().containsKey(key); + } + /** Use {@link #getRedisConfigsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRedisConfigs() { + return getRedisConfigsMap(); + } + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getRedisConfigsMap() { + return internalGetRedisConfigs().getMap(); + } + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getRedisConfigsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRedisConfigs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getRedisConfigsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRedisConfigs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PRECISE_SIZE_GB_FIELD_NUMBER = 22; + private double preciseSizeGb_ = 0D; + /** + * + * + *
+   * Output only. Precise value of redis memory size in GB for the entire
+   * cluster.
+   * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the preciseSizeGb field is set. + */ + @java.lang.Override + public boolean hasPreciseSizeGb() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * Output only. Precise value of redis memory size in GB for the entire
+   * cluster.
+   * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The preciseSizeGb. + */ + @java.lang.Override + public double getPreciseSizeGb() { + return preciseSizeGb_; + } + + public static final int ZONE_DISTRIBUTION_CONFIG_FIELD_NUMBER = 23; + private com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zoneDistributionConfig_; + /** + * + * + *
+   * Optional. This config will be used to determine how the customer wants us
+   * to distribute cluster resources within the region.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the zoneDistributionConfig field is set. + */ + @java.lang.Override + public boolean hasZoneDistributionConfig() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+   * Optional. This config will be used to determine how the customer wants us
+   * to distribute cluster resources within the region.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The zoneDistributionConfig. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig getZoneDistributionConfig() { + return zoneDistributionConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.getDefaultInstance() + : zoneDistributionConfig_; + } + /** + * + * + *
+   * Optional. This config will be used to determine how the customer wants us
+   * to distribute cluster resources within the region.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfigOrBuilder + getZoneDistributionConfigOrBuilder() { + return zoneDistributionConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.getDefaultInstance() + : zoneDistributionConfig_; + } + + public static final int DELETION_PROTECTION_ENABLED_FIELD_NUMBER = 25; + private boolean deletionProtectionEnabled_ = false; + /** + * + * + *
+   * Optional. The delete operation will fail when the value is set to true.
+   * 
+ * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deletionProtectionEnabled field is set. + */ + @java.lang.Override + public boolean hasDeletionProtectionEnabled() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+   * Optional. The delete operation will fail when the value is set to true.
+   * 
+ * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deletionProtectionEnabled. + */ + @java.lang.Override + public boolean getDeletionProtectionEnabled() { + return deletionProtectionEnabled_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2680,6 +3031,24 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(18, getStateInfo()); } + if (nodeType_ + != com.google.cloud.redis.cluster.v1beta1.NodeType.NODE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(19, nodeType_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(20, getPersistenceConfig()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetRedisConfigs(), RedisConfigsDefaultEntryHolder.defaultEntry, 21); + if (((bitField0_ & 0x00000040) != 0)) { + output.writeDouble(22, preciseSizeGb_); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(23, getZoneDistributionConfig()); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeBool(25, deletionProtectionEnabled_); + } getUnknownFields().writeTo(output); } @@ -2735,6 +3104,33 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getStateInfo()); } + if (nodeType_ + != com.google.cloud.redis.cluster.v1beta1.NodeType.NODE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, nodeType_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getPersistenceConfig()); + } + for (java.util.Map.Entry entry : + internalGetRedisConfigs().getMap().entrySet()) { + com.google.protobuf.MapEntry redisConfigs__ = + RedisConfigsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, redisConfigs__); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(22, preciseSizeGb_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(23, getZoneDistributionConfig()); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(25, deletionProtectionEnabled_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2779,6 +3175,25 @@ public boolean equals(final java.lang.Object obj) { if (hasStateInfo()) { if (!getStateInfo().equals(other.getStateInfo())) return false; } + if (nodeType_ != other.nodeType_) return false; + if (hasPersistenceConfig() != other.hasPersistenceConfig()) return false; + if (hasPersistenceConfig()) { + if (!getPersistenceConfig().equals(other.getPersistenceConfig())) return false; + } + if (!internalGetRedisConfigs().equals(other.internalGetRedisConfigs())) return false; + if (hasPreciseSizeGb() != other.hasPreciseSizeGb()) return false; + if (hasPreciseSizeGb()) { + if (java.lang.Double.doubleToLongBits(getPreciseSizeGb()) + != java.lang.Double.doubleToLongBits(other.getPreciseSizeGb())) return false; + } + if (hasZoneDistributionConfig() != other.hasZoneDistributionConfig()) return false; + if (hasZoneDistributionConfig()) { + if (!getZoneDistributionConfig().equals(other.getZoneDistributionConfig())) return false; + } + if (hasDeletionProtectionEnabled() != other.hasDeletionProtectionEnabled()) return false; + if (hasDeletionProtectionEnabled()) { + if (getDeletionProtectionEnabled() != other.getDeletionProtectionEnabled()) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2832,6 +3247,31 @@ public int hashCode() { hash = (37 * hash) + STATE_INFO_FIELD_NUMBER; hash = (53 * hash) + getStateInfo().hashCode(); } + hash = (37 * hash) + NODE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + nodeType_; + if (hasPersistenceConfig()) { + hash = (37 * hash) + PERSISTENCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPersistenceConfig().hashCode(); + } + if (!internalGetRedisConfigs().getMap().isEmpty()) { + hash = (37 * hash) + REDIS_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetRedisConfigs().hashCode(); + } + if (hasPreciseSizeGb()) { + hash = (37 * hash) + PRECISE_SIZE_GB_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getPreciseSizeGb())); + } + if (hasZoneDistributionConfig()) { + hash = (37 * hash) + ZONE_DISTRIBUTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getZoneDistributionConfig().hashCode(); + } + if (hasDeletionProtectionEnabled()) { + hash = (37 * hash) + DELETION_PROTECTION_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDeletionProtectionEnabled()); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2950,6 +3390,28 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 21: + return internalGetRedisConfigs(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 21: + return internalGetMutableRedisConfigs(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -2977,6 +3439,8 @@ private void maybeForceBuilderInitialization() { getDiscoveryEndpointsFieldBuilder(); getPscConnectionsFieldBuilder(); getStateInfoFieldBuilder(); + getPersistenceConfigFieldBuilder(); + getZoneDistributionConfigFieldBuilder(); } } @@ -3023,6 +3487,20 @@ public Builder clear() { stateInfoBuilder_.dispose(); stateInfoBuilder_ = null; } + nodeType_ = 0; + persistenceConfig_ = null; + if (persistenceConfigBuilder_ != null) { + persistenceConfigBuilder_.dispose(); + persistenceConfigBuilder_ = null; + } + internalGetMutableRedisConfigs().clear(); + preciseSizeGb_ = 0D; + zoneDistributionConfig_ = null; + if (zoneDistributionConfigBuilder_ != null) { + zoneDistributionConfigBuilder_.dispose(); + zoneDistributionConfigBuilder_ = null; + } + deletionProtectionEnabled_ = false; return this; } @@ -3126,6 +3604,35 @@ private void buildPartial0(com.google.cloud.redis.cluster.v1beta1.Cluster result result.stateInfo_ = stateInfoBuilder_ == null ? stateInfo_ : stateInfoBuilder_.build(); to_bitField0_ |= 0x00000010; } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.nodeType_ = nodeType_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.persistenceConfig_ = + persistenceConfigBuilder_ == null + ? persistenceConfig_ + : persistenceConfigBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.redisConfigs_ = internalGetRedisConfigs(); + result.redisConfigs_.makeImmutable(); + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.preciseSizeGb_ = preciseSizeGb_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.zoneDistributionConfig_ = + zoneDistributionConfigBuilder_ == null + ? zoneDistributionConfig_ + : zoneDistributionConfigBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.deletionProtectionEnabled_ = deletionProtectionEnabled_; + to_bitField0_ |= 0x00000100; + } result.bitField0_ |= to_bitField0_; } @@ -3289,6 +3796,23 @@ public Builder mergeFrom(com.google.cloud.redis.cluster.v1beta1.Cluster other) { if (other.hasStateInfo()) { mergeStateInfo(other.getStateInfo()); } + if (other.nodeType_ != 0) { + setNodeTypeValue(other.getNodeTypeValue()); + } + if (other.hasPersistenceConfig()) { + mergePersistenceConfig(other.getPersistenceConfig()); + } + internalGetMutableRedisConfigs().mergeFrom(other.internalGetRedisConfigs()); + bitField0_ |= 0x00008000; + if (other.hasPreciseSizeGb()) { + setPreciseSizeGb(other.getPreciseSizeGb()); + } + if (other.hasZoneDistributionConfig()) { + mergeZoneDistributionConfig(other.getZoneDistributionConfig()); + } + if (other.hasDeletionProtectionEnabled()) { + setDeletionProtectionEnabled(other.getDeletionProtectionEnabled()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3417,6 +3941,50 @@ public Builder mergeFrom( bitField0_ |= 0x00001000; break; } // case 146 + case 152: + { + nodeType_ = input.readEnum(); + bitField0_ |= 0x00002000; + break; + } // case 152 + case 162: + { + input.readMessage( + getPersistenceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 162 + case 170: + { + com.google.protobuf.MapEntry redisConfigs__ = + input.readMessage( + RedisConfigsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableRedisConfigs() + .getMutableMap() + .put(redisConfigs__.getKey(), redisConfigs__.getValue()); + bitField0_ |= 0x00008000; + break; + } // case 170 + case 177: + { + preciseSizeGb_ = input.readDouble(); + bitField0_ |= 0x00010000; + break; + } // case 177 + case 186: + { + input.readMessage( + getZoneDistributionConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 186 + case 200: + { + deletionProtectionEnabled_ = input.readBool(); + bitField0_ |= 0x00040000; + break; + } // case 200 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4258,7 +4826,8 @@ public Builder clearTransitEncryptionMode() { * * *
-     * Output only. Redis memory size in GB for the entire cluster.
+     * Output only. Redis memory size in GB for the entire cluster rounded up to
+     * the next integer.
      * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -4273,7 +4842,8 @@ public boolean hasSizeGb() { * * *
-     * Output only. Redis memory size in GB for the entire cluster.
+     * Output only. Redis memory size in GB for the entire cluster rounded up to
+     * the next integer.
      * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -4288,7 +4858,8 @@ public int getSizeGb() { * * *
-     * Output only. Redis memory size in GB for the entire cluster.
+     * Output only. Redis memory size in GB for the entire cluster rounded up to
+     * the next integer.
      * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -4307,7 +4878,8 @@ public Builder setSizeGb(int value) { * * *
-     * Output only. Redis memory size in GB for the entire cluster.
+     * Output only. Redis memory size in GB for the entire cluster rounded up to
+     * the next integer.
      * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -5863,6 +6435,866 @@ public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.Builder getState return stateInfoBuilder_; } + private int nodeType_ = 0; + /** + * + * + *
+     * Optional. The type of a redis node in the cluster. NodeType determines the
+     * underlying machine-type of a redis node.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nodeType. + */ + @java.lang.Override + public int getNodeTypeValue() { + return nodeType_; + } + /** + * + * + *
+     * Optional. The type of a redis node in the cluster. NodeType determines the
+     * underlying machine-type of a redis node.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for nodeType to set. + * @return This builder for chaining. + */ + public Builder setNodeTypeValue(int value) { + nodeType_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The type of a redis node in the cluster. NodeType determines the
+     * underlying machine-type of a redis node.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nodeType. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.NodeType getNodeType() { + com.google.cloud.redis.cluster.v1beta1.NodeType result = + com.google.cloud.redis.cluster.v1beta1.NodeType.forNumber(nodeType_); + return result == null ? com.google.cloud.redis.cluster.v1beta1.NodeType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Optional. The type of a redis node in the cluster. NodeType determines the
+     * underlying machine-type of a redis node.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The nodeType to set. + * @return This builder for chaining. + */ + public Builder setNodeType(com.google.cloud.redis.cluster.v1beta1.NodeType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00002000; + nodeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The type of a redis node in the cluster. NodeType determines the
+     * underlying machine-type of a redis node.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearNodeType() { + bitField0_ = (bitField0_ & ~0x00002000); + nodeType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistenceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfigOrBuilder> + persistenceConfigBuilder_; + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the persistenceConfig field is set. + */ + public boolean hasPersistenceConfig() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The persistenceConfig. + */ + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig getPersistenceConfig() { + if (persistenceConfigBuilder_ == null) { + return persistenceConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.getDefaultInstance() + : persistenceConfig_; + } else { + return persistenceConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPersistenceConfig( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig value) { + if (persistenceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + persistenceConfig_ = value; + } else { + persistenceConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPersistenceConfig( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.Builder builderForValue) { + if (persistenceConfigBuilder_ == null) { + persistenceConfig_ = builderForValue.build(); + } else { + persistenceConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePersistenceConfig( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig value) { + if (persistenceConfigBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && persistenceConfig_ != null + && persistenceConfig_ + != com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig + .getDefaultInstance()) { + getPersistenceConfigBuilder().mergeFrom(value); + } else { + persistenceConfig_ = value; + } + } else { + persistenceConfigBuilder_.mergeFrom(value); + } + if (persistenceConfig_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPersistenceConfig() { + bitField0_ = (bitField0_ & ~0x00004000); + persistenceConfig_ = null; + if (persistenceConfigBuilder_ != null) { + persistenceConfigBuilder_.dispose(); + persistenceConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.Builder + getPersistenceConfigBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getPersistenceConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfigOrBuilder + getPersistenceConfigOrBuilder() { + if (persistenceConfigBuilder_ != null) { + return persistenceConfigBuilder_.getMessageOrBuilder(); + } else { + return persistenceConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.getDefaultInstance() + : persistenceConfig_; + } + } + /** + * + * + *
+     * Optional. Persistence config (RDB, AOF) for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfigOrBuilder> + getPersistenceConfigFieldBuilder() { + if (persistenceConfigBuilder_ == null) { + persistenceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfigOrBuilder>( + getPersistenceConfig(), getParentForChildren(), isClean()); + persistenceConfig_ = null; + } + return persistenceConfigBuilder_; + } + + private com.google.protobuf.MapField redisConfigs_; + + private com.google.protobuf.MapField + internalGetRedisConfigs() { + if (redisConfigs_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RedisConfigsDefaultEntryHolder.defaultEntry); + } + return redisConfigs_; + } + + private com.google.protobuf.MapField + internalGetMutableRedisConfigs() { + if (redisConfigs_ == null) { + redisConfigs_ = + com.google.protobuf.MapField.newMapField(RedisConfigsDefaultEntryHolder.defaultEntry); + } + if (!redisConfigs_.isMutable()) { + redisConfigs_ = redisConfigs_.copy(); + } + bitField0_ |= 0x00008000; + onChanged(); + return redisConfigs_; + } + + public int getRedisConfigsCount() { + return internalGetRedisConfigs().getMap().size(); + } + /** + * + * + *
+     * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+     * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsRedisConfigs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetRedisConfigs().getMap().containsKey(key); + } + /** Use {@link #getRedisConfigsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRedisConfigs() { + return getRedisConfigsMap(); + } + /** + * + * + *
+     * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+     * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getRedisConfigsMap() { + return internalGetRedisConfigs().getMap(); + } + /** + * + * + *
+     * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+     * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getRedisConfigsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRedisConfigs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+     * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getRedisConfigsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRedisConfigs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearRedisConfigs() { + bitField0_ = (bitField0_ & ~0x00008000); + internalGetMutableRedisConfigs().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+     * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeRedisConfigs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableRedisConfigs().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableRedisConfigs() { + bitField0_ |= 0x00008000; + return internalGetMutableRedisConfigs().getMutableMap(); + } + /** + * + * + *
+     * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+     * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putRedisConfigs(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableRedisConfigs().getMutableMap().put(key, value); + bitField0_ |= 0x00008000; + return this; + } + /** + * + * + *
+     * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+     * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllRedisConfigs(java.util.Map values) { + internalGetMutableRedisConfigs().getMutableMap().putAll(values); + bitField0_ |= 0x00008000; + return this; + } + + private double preciseSizeGb_; + /** + * + * + *
+     * Output only. Precise value of redis memory size in GB for the entire
+     * cluster.
+     * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the preciseSizeGb field is set. + */ + @java.lang.Override + public boolean hasPreciseSizeGb() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+     * Output only. Precise value of redis memory size in GB for the entire
+     * cluster.
+     * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The preciseSizeGb. + */ + @java.lang.Override + public double getPreciseSizeGb() { + return preciseSizeGb_; + } + /** + * + * + *
+     * Output only. Precise value of redis memory size in GB for the entire
+     * cluster.
+     * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The preciseSizeGb to set. + * @return This builder for chaining. + */ + public Builder setPreciseSizeGb(double value) { + + preciseSizeGb_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Precise value of redis memory size in GB for the entire
+     * cluster.
+     * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearPreciseSizeGb() { + bitField0_ = (bitField0_ & ~0x00010000); + preciseSizeGb_ = 0D; + onChanged(); + return this; + } + + private com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zoneDistributionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig, + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfigOrBuilder> + zoneDistributionConfigBuilder_; + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the zoneDistributionConfig field is set. + */ + public boolean hasZoneDistributionConfig() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The zoneDistributionConfig. + */ + public com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig + getZoneDistributionConfig() { + if (zoneDistributionConfigBuilder_ == null) { + return zoneDistributionConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.getDefaultInstance() + : zoneDistributionConfig_; + } else { + return zoneDistributionConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setZoneDistributionConfig( + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig value) { + if (zoneDistributionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + zoneDistributionConfig_ = value; + } else { + zoneDistributionConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setZoneDistributionConfig( + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.Builder builderForValue) { + if (zoneDistributionConfigBuilder_ == null) { + zoneDistributionConfig_ = builderForValue.build(); + } else { + zoneDistributionConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeZoneDistributionConfig( + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig value) { + if (zoneDistributionConfigBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) + && zoneDistributionConfig_ != null + && zoneDistributionConfig_ + != com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig + .getDefaultInstance()) { + getZoneDistributionConfigBuilder().mergeFrom(value); + } else { + zoneDistributionConfig_ = value; + } + } else { + zoneDistributionConfigBuilder_.mergeFrom(value); + } + if (zoneDistributionConfig_ != null) { + bitField0_ |= 0x00020000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearZoneDistributionConfig() { + bitField0_ = (bitField0_ & ~0x00020000); + zoneDistributionConfig_ = null; + if (zoneDistributionConfigBuilder_ != null) { + zoneDistributionConfigBuilder_.dispose(); + zoneDistributionConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.Builder + getZoneDistributionConfigBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getZoneDistributionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfigOrBuilder + getZoneDistributionConfigOrBuilder() { + if (zoneDistributionConfigBuilder_ != null) { + return zoneDistributionConfigBuilder_.getMessageOrBuilder(); + } else { + return zoneDistributionConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.getDefaultInstance() + : zoneDistributionConfig_; + } + } + /** + * + * + *
+     * Optional. This config will be used to determine how the customer wants us
+     * to distribute cluster resources within the region.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig, + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfigOrBuilder> + getZoneDistributionConfigFieldBuilder() { + if (zoneDistributionConfigBuilder_ == null) { + zoneDistributionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig, + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfigOrBuilder>( + getZoneDistributionConfig(), getParentForChildren(), isClean()); + zoneDistributionConfig_ = null; + } + return zoneDistributionConfigBuilder_; + } + + private boolean deletionProtectionEnabled_; + /** + * + * + *
+     * Optional. The delete operation will fail when the value is set to true.
+     * 
+ * + * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deletionProtectionEnabled field is set. + */ + @java.lang.Override + public boolean hasDeletionProtectionEnabled() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + * + * + *
+     * Optional. The delete operation will fail when the value is set to true.
+     * 
+ * + * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deletionProtectionEnabled. + */ + @java.lang.Override + public boolean getDeletionProtectionEnabled() { + return deletionProtectionEnabled_; + } + /** + * + * + *
+     * Optional. The delete operation will fail when the value is set to true.
+     * 
+ * + * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The deletionProtectionEnabled to set. + * @return This builder for chaining. + */ + public Builder setDeletionProtectionEnabled(boolean value) { + + deletionProtectionEnabled_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The delete operation will fail when the value is set to true.
+     * 
+ * + * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDeletionProtectionEnabled() { + bitField0_ = (bitField0_ & ~0x00040000); + deletionProtectionEnabled_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterOrBuilder.java index 6384978f70a1..e7588a6495c5 100644 --- a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterOrBuilder.java +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterOrBuilder.java @@ -238,7 +238,8 @@ public interface ClusterOrBuilder * * *
-   * Output only. Redis memory size in GB for the entire cluster.
+   * Output only. Redis memory size in GB for the entire cluster rounded up to
+   * the next integer.
    * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -250,7 +251,8 @@ public interface ClusterOrBuilder * * *
-   * Output only. Redis memory size in GB for the entire cluster.
+   * Output only. Redis memory size in GB for the entire cluster rounded up to
+   * the next integer.
    * 
* * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -533,4 +535,239 @@ com.google.cloud.redis.cluster.v1beta1.PscConnectionOrBuilder getPscConnectionsO *
*/ com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfoOrBuilder getStateInfoOrBuilder(); + + /** + * + * + *
+   * Optional. The type of a redis node in the cluster. NodeType determines the
+   * underlying machine-type of a redis node.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nodeType. + */ + int getNodeTypeValue(); + /** + * + * + *
+   * Optional. The type of a redis node in the cluster. NodeType determines the
+   * underlying machine-type of a redis node.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nodeType. + */ + com.google.cloud.redis.cluster.v1beta1.NodeType getNodeType(); + + /** + * + * + *
+   * Optional. Persistence config (RDB, AOF) for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the persistenceConfig field is set. + */ + boolean hasPersistenceConfig(); + /** + * + * + *
+   * Optional. Persistence config (RDB, AOF) for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The persistenceConfig. + */ + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig getPersistenceConfig(); + /** + * + * + *
+   * Optional. Persistence config (RDB, AOF) for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfigOrBuilder + getPersistenceConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getRedisConfigsCount(); + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsRedisConfigs(java.lang.String key); + /** Use {@link #getRedisConfigsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getRedisConfigs(); + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getRedisConfigsMap(); + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getRedisConfigsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Key/Value pairs of customer overrides for mutable Redis Configs
+   * 
+ * + * map<string, string> redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getRedisConfigsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Precise value of redis memory size in GB for the entire
+   * cluster.
+   * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the preciseSizeGb field is set. + */ + boolean hasPreciseSizeGb(); + /** + * + * + *
+   * Output only. Precise value of redis memory size in GB for the entire
+   * cluster.
+   * 
+ * + * optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The preciseSizeGb. + */ + double getPreciseSizeGb(); + + /** + * + * + *
+   * Optional. This config will be used to determine how the customer wants us
+   * to distribute cluster resources within the region.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the zoneDistributionConfig field is set. + */ + boolean hasZoneDistributionConfig(); + /** + * + * + *
+   * Optional. This config will be used to determine how the customer wants us
+   * to distribute cluster resources within the region.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The zoneDistributionConfig. + */ + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig getZoneDistributionConfig(); + /** + * + * + *
+   * Optional. This config will be used to determine how the customer wants us
+   * to distribute cluster resources within the region.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfigOrBuilder + getZoneDistributionConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The delete operation will fail when the value is set to true.
+   * 
+ * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deletionProtectionEnabled field is set. + */ + boolean hasDeletionProtectionEnabled(); + /** + * + * + *
+   * Optional. The delete operation will fail when the value is set to true.
+   * 
+ * + * optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deletionProtectionEnabled. + */ + boolean getDeletionProtectionEnabled(); } diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterPersistenceConfig.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterPersistenceConfig.java new file mode 100644 index 000000000000..037c3db62367 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterPersistenceConfig.java @@ -0,0 +1,3552 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1beta1; + +/** + * + * + *
+ * Configuration of the persistence functionality.
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig} + */ +public final class ClusterPersistenceConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig) + ClusterPersistenceConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ClusterPersistenceConfig.newBuilder() to construct. + private ClusterPersistenceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ClusterPersistenceConfig() { + mode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ClusterPersistenceConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.class, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.Builder.class); + } + + /** + * + * + *
+   * Available persistence modes.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode} + */ + public enum PersistenceMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * PERSISTENCE_MODE_UNSPECIFIED = 0; + */ + PERSISTENCE_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Persistence is disabled, and any snapshot data is deleted.
+     * 
+ * + * DISABLED = 1; + */ + DISABLED(1), + /** + * + * + *
+     * RDB based persistence is enabled.
+     * 
+ * + * RDB = 2; + */ + RDB(2), + /** + * + * + *
+     * AOF based persistence is enabled.
+     * 
+ * + * AOF = 3; + */ + AOF(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * PERSISTENCE_MODE_UNSPECIFIED = 0; + */ + public static final int PERSISTENCE_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Persistence is disabled, and any snapshot data is deleted.
+     * 
+ * + * DISABLED = 1; + */ + public static final int DISABLED_VALUE = 1; + /** + * + * + *
+     * RDB based persistence is enabled.
+     * 
+ * + * RDB = 2; + */ + public static final int RDB_VALUE = 2; + /** + * + * + *
+     * AOF based persistence is enabled.
+     * 
+ * + * AOF = 3; + */ + public static final int AOF_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 PersistenceMode 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 PersistenceMode forNumber(int value) { + switch (value) { + case 0: + return PERSISTENCE_MODE_UNSPECIFIED; + case 1: + return DISABLED; + case 2: + return RDB; + case 3: + return AOF; + 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 PersistenceMode findValueByNumber(int number) { + return PersistenceMode.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final PersistenceMode[] VALUES = values(); + + public static PersistenceMode 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 PersistenceMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode) + } + + public interface RDBConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Period between RDB snapshots.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rdbSnapshotPeriod. + */ + int getRdbSnapshotPeriodValue(); + /** + * + * + *
+     * Optional. Period between RDB snapshots.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotPeriod. + */ + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + getRdbSnapshotPeriod(); + + /** + * + * + *
+     * Optional. The time that the first snapshot was/will be attempted, and to
+     * which future snapshots will be aligned. If not provided, the current time
+     * will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rdbSnapshotStartTime field is set. + */ + boolean hasRdbSnapshotStartTime(); + /** + * + * + *
+     * Optional. The time that the first snapshot was/will be attempted, and to
+     * which future snapshots will be aligned. If not provided, the current time
+     * will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotStartTime. + */ + com.google.protobuf.Timestamp getRdbSnapshotStartTime(); + /** + * + * + *
+     * Optional. The time that the first snapshot was/will be attempted, and to
+     * which future snapshots will be aligned. If not provided, the current time
+     * will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getRdbSnapshotStartTimeOrBuilder(); + } + /** + * + * + *
+   * Configuration of the RDB based persistence.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig} + */ + public static final class RDBConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig) + RDBConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RDBConfig.newBuilder() to construct. + private RDBConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RDBConfig() { + rdbSnapshotPeriod_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RDBConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_RDBConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_RDBConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.class, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.Builder + .class); + } + + /** + * + * + *
+     * Available snapshot periods.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod} + */ + public enum SnapshotPeriod implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Not set.
+       * 
+ * + * SNAPSHOT_PERIOD_UNSPECIFIED = 0; + */ + SNAPSHOT_PERIOD_UNSPECIFIED(0), + /** + * + * + *
+       * One hour.
+       * 
+ * + * ONE_HOUR = 1; + */ + ONE_HOUR(1), + /** + * + * + *
+       * Six hours.
+       * 
+ * + * SIX_HOURS = 2; + */ + SIX_HOURS(2), + /** + * + * + *
+       * Twelve hours.
+       * 
+ * + * TWELVE_HOURS = 3; + */ + TWELVE_HOURS(3), + /** + * + * + *
+       * Twenty four hours.
+       * 
+ * + * TWENTY_FOUR_HOURS = 4; + */ + TWENTY_FOUR_HOURS(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Not set.
+       * 
+ * + * SNAPSHOT_PERIOD_UNSPECIFIED = 0; + */ + public static final int SNAPSHOT_PERIOD_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * One hour.
+       * 
+ * + * ONE_HOUR = 1; + */ + public static final int ONE_HOUR_VALUE = 1; + /** + * + * + *
+       * Six hours.
+       * 
+ * + * SIX_HOURS = 2; + */ + public static final int SIX_HOURS_VALUE = 2; + /** + * + * + *
+       * Twelve hours.
+       * 
+ * + * TWELVE_HOURS = 3; + */ + public static final int TWELVE_HOURS_VALUE = 3; + /** + * + * + *
+       * Twenty four hours.
+       * 
+ * + * TWENTY_FOUR_HOURS = 4; + */ + public static final int TWENTY_FOUR_HOURS_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 SnapshotPeriod 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 SnapshotPeriod forNumber(int value) { + switch (value) { + case 0: + return SNAPSHOT_PERIOD_UNSPECIFIED; + case 1: + return ONE_HOUR; + case 2: + return SIX_HOURS; + case 3: + return TWELVE_HOURS; + case 4: + return TWENTY_FOUR_HOURS; + 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 SnapshotPeriod findValueByNumber(int number) { + return SnapshotPeriod.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SnapshotPeriod[] VALUES = values(); + + public static SnapshotPeriod 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 SnapshotPeriod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod) + } + + private int bitField0_; + public static final int RDB_SNAPSHOT_PERIOD_FIELD_NUMBER = 1; + private int rdbSnapshotPeriod_ = 0; + /** + * + * + *
+     * Optional. Period between RDB snapshots.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rdbSnapshotPeriod. + */ + @java.lang.Override + public int getRdbSnapshotPeriodValue() { + return rdbSnapshotPeriod_; + } + /** + * + * + *
+     * Optional. Period between RDB snapshots.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotPeriod. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + getRdbSnapshotPeriod() { + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + result = + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + .SnapshotPeriod.forNumber(rdbSnapshotPeriod_); + return result == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + .UNRECOGNIZED + : result; + } + + public static final int RDB_SNAPSHOT_START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp rdbSnapshotStartTime_; + /** + * + * + *
+     * Optional. The time that the first snapshot was/will be attempted, and to
+     * which future snapshots will be aligned. If not provided, the current time
+     * will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rdbSnapshotStartTime field is set. + */ + @java.lang.Override + public boolean hasRdbSnapshotStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The time that the first snapshot was/will be attempted, and to
+     * which future snapshots will be aligned. If not provided, the current time
+     * will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotStartTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRdbSnapshotStartTime() { + return rdbSnapshotStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbSnapshotStartTime_; + } + /** + * + * + *
+     * Optional. The time that the first snapshot was/will be attempted, and to
+     * which future snapshots will be aligned. If not provided, the current time
+     * will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRdbSnapshotStartTimeOrBuilder() { + return rdbSnapshotStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbSnapshotStartTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (rdbSnapshotPeriod_ + != com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + .SnapshotPeriod.SNAPSHOT_PERIOD_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, rdbSnapshotPeriod_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getRdbSnapshotStartTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rdbSnapshotPeriod_ + != com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + .SnapshotPeriod.SNAPSHOT_PERIOD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, rdbSnapshotPeriod_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRdbSnapshotStartTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig other = + (com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig) obj; + + if (rdbSnapshotPeriod_ != other.rdbSnapshotPeriod_) return false; + if (hasRdbSnapshotStartTime() != other.hasRdbSnapshotStartTime()) return false; + if (hasRdbSnapshotStartTime()) { + if (!getRdbSnapshotStartTime().equals(other.getRdbSnapshotStartTime())) 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) + RDB_SNAPSHOT_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + rdbSnapshotPeriod_; + if (hasRdbSnapshotStartTime()) { + hash = (37 * hash) + RDB_SNAPSHOT_START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRdbSnapshotStartTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Configuration of the RDB based persistence.
+     * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig) + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_RDBConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_RDBConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.class, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRdbSnapshotStartTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rdbSnapshotPeriod_ = 0; + rdbSnapshotStartTime_ = null; + if (rdbSnapshotStartTimeBuilder_ != null) { + rdbSnapshotStartTimeBuilder_.dispose(); + rdbSnapshotStartTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_RDBConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig build() { + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + buildPartial() { + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig result = + new com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rdbSnapshotPeriod_ = rdbSnapshotPeriod_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rdbSnapshotStartTime_ = + rdbSnapshotStartTimeBuilder_ == null + ? rdbSnapshotStartTime_ + : rdbSnapshotStartTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig) { + return mergeFrom( + (com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig other) { + if (other + == com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + .getDefaultInstance()) return this; + if (other.rdbSnapshotPeriod_ != 0) { + setRdbSnapshotPeriodValue(other.getRdbSnapshotPeriodValue()); + } + if (other.hasRdbSnapshotStartTime()) { + mergeRdbSnapshotStartTime(other.getRdbSnapshotStartTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + rdbSnapshotPeriod_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + getRdbSnapshotStartTimeFieldBuilder().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 rdbSnapshotPeriod_ = 0; + /** + * + * + *
+       * Optional. Period between RDB snapshots.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rdbSnapshotPeriod. + */ + @java.lang.Override + public int getRdbSnapshotPeriodValue() { + return rdbSnapshotPeriod_; + } + /** + * + * + *
+       * Optional. Period between RDB snapshots.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for rdbSnapshotPeriod to set. + * @return This builder for chaining. + */ + public Builder setRdbSnapshotPeriodValue(int value) { + rdbSnapshotPeriod_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Period between RDB snapshots.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotPeriod. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + .SnapshotPeriod + getRdbSnapshotPeriod() { + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + result = + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + .SnapshotPeriod.forNumber(rdbSnapshotPeriod_); + return result == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + .SnapshotPeriod.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Optional. Period between RDB snapshots.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The rdbSnapshotPeriod to set. + * @return This builder for chaining. + */ + public Builder setRdbSnapshotPeriod( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + rdbSnapshotPeriod_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Period between RDB snapshots.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRdbSnapshotPeriod() { + bitField0_ = (bitField0_ & ~0x00000001); + rdbSnapshotPeriod_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp rdbSnapshotStartTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + rdbSnapshotStartTimeBuilder_; + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rdbSnapshotStartTime field is set. + */ + public boolean hasRdbSnapshotStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotStartTime. + */ + public com.google.protobuf.Timestamp getRdbSnapshotStartTime() { + if (rdbSnapshotStartTimeBuilder_ == null) { + return rdbSnapshotStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbSnapshotStartTime_; + } else { + return rdbSnapshotStartTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRdbSnapshotStartTime(com.google.protobuf.Timestamp value) { + if (rdbSnapshotStartTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rdbSnapshotStartTime_ = value; + } else { + rdbSnapshotStartTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRdbSnapshotStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (rdbSnapshotStartTimeBuilder_ == null) { + rdbSnapshotStartTime_ = builderForValue.build(); + } else { + rdbSnapshotStartTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRdbSnapshotStartTime(com.google.protobuf.Timestamp value) { + if (rdbSnapshotStartTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && rdbSnapshotStartTime_ != null + && rdbSnapshotStartTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getRdbSnapshotStartTimeBuilder().mergeFrom(value); + } else { + rdbSnapshotStartTime_ = value; + } + } else { + rdbSnapshotStartTimeBuilder_.mergeFrom(value); + } + if (rdbSnapshotStartTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRdbSnapshotStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + rdbSnapshotStartTime_ = null; + if (rdbSnapshotStartTimeBuilder_ != null) { + rdbSnapshotStartTimeBuilder_.dispose(); + rdbSnapshotStartTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getRdbSnapshotStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRdbSnapshotStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getRdbSnapshotStartTimeOrBuilder() { + if (rdbSnapshotStartTimeBuilder_ != null) { + return rdbSnapshotStartTimeBuilder_.getMessageOrBuilder(); + } else { + return rdbSnapshotStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbSnapshotStartTime_; + } + } + /** + * + * + *
+       * Optional. The time that the first snapshot was/will be attempted, and to
+       * which future snapshots will be aligned. If not provided, the current time
+       * will be used.
+       * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRdbSnapshotStartTimeFieldBuilder() { + if (rdbSnapshotStartTimeBuilder_ == null) { + rdbSnapshotStartTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRdbSnapshotStartTime(), getParentForChildren(), isClean()); + rdbSnapshotStartTime_ = null; + } + return rdbSnapshotStartTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig) + private static final com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig(); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RDBConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AOFConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. fsync configuration.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for appendFsync. + */ + int getAppendFsyncValue(); + /** + * + * + *
+     * Optional. fsync configuration.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The appendFsync. + */ + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync + getAppendFsync(); + } + /** + * + * + *
+   * Configuration of the AOF based persistence.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig} + */ + public static final class AOFConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig) + AOFConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AOFConfig.newBuilder() to construct. + private AOFConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AOFConfig() { + appendFsync_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AOFConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_AOFConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_AOFConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.class, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.Builder + .class); + } + + /** + * + * + *
+     * Available fsync modes.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync} + */ + public enum AppendFsync implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Not set. Default: EVERYSEC
+       * 
+ * + * APPEND_FSYNC_UNSPECIFIED = 0; + */ + APPEND_FSYNC_UNSPECIFIED(0), + /** + * + * + *
+       * Never fsync. Normally Linux will flush data every 30 seconds with this
+       * configuration, but it's up to the kernel's exact tuning.
+       * 
+ * + * NO = 1; + */ + NO(1), + /** + * + * + *
+       * fsync every second. Fast enough, and you may lose 1 second of data if
+       * there is a disaster
+       * 
+ * + * EVERYSEC = 2; + */ + EVERYSEC(2), + /** + * + * + *
+       * fsync every time new commands are appended to the AOF. It has the best
+       * data loss protection at the cost of performance
+       * 
+ * + * ALWAYS = 3; + */ + ALWAYS(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Not set. Default: EVERYSEC
+       * 
+ * + * APPEND_FSYNC_UNSPECIFIED = 0; + */ + public static final int APPEND_FSYNC_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Never fsync. Normally Linux will flush data every 30 seconds with this
+       * configuration, but it's up to the kernel's exact tuning.
+       * 
+ * + * NO = 1; + */ + public static final int NO_VALUE = 1; + /** + * + * + *
+       * fsync every second. Fast enough, and you may lose 1 second of data if
+       * there is a disaster
+       * 
+ * + * EVERYSEC = 2; + */ + public static final int EVERYSEC_VALUE = 2; + /** + * + * + *
+       * fsync every time new commands are appended to the AOF. It has the best
+       * data loss protection at the cost of performance
+       * 
+ * + * ALWAYS = 3; + */ + public static final int ALWAYS_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 AppendFsync 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 AppendFsync forNumber(int value) { + switch (value) { + case 0: + return APPEND_FSYNC_UNSPECIFIED; + case 1: + return NO; + case 2: + return EVERYSEC; + case 3: + return ALWAYS; + 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 AppendFsync findValueByNumber(int number) { + return AppendFsync.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AppendFsync[] VALUES = values(); + + public static AppendFsync 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 AppendFsync(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync) + } + + public static final int APPEND_FSYNC_FIELD_NUMBER = 1; + private int appendFsync_ = 0; + /** + * + * + *
+     * Optional. fsync configuration.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for appendFsync. + */ + @java.lang.Override + public int getAppendFsyncValue() { + return appendFsync_; + } + /** + * + * + *
+     * Optional. fsync configuration.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The appendFsync. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync + getAppendFsync() { + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync result = + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync + .forNumber(appendFsync_); + return result == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync + .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 (appendFsync_ + != com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync + .APPEND_FSYNC_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, appendFsync_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (appendFsync_ + != com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync + .APPEND_FSYNC_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, appendFsync_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig other = + (com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig) obj; + + if (appendFsync_ != other.appendFsync_) 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) + APPEND_FSYNC_FIELD_NUMBER; + hash = (53 * hash) + appendFsync_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Configuration of the AOF based persistence.
+     * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig) + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_AOFConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_AOFConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.class, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + appendFsync_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_AOFConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig build() { + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + buildPartial() { + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig result = + new com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.appendFsync_ = appendFsync_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig) { + return mergeFrom( + (com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig other) { + if (other + == com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + .getDefaultInstance()) return this; + if (other.appendFsync_ != 0) { + setAppendFsyncValue(other.getAppendFsyncValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + appendFsync_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int appendFsync_ = 0; + /** + * + * + *
+       * Optional. fsync configuration.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for appendFsync. + */ + @java.lang.Override + public int getAppendFsyncValue() { + return appendFsync_; + } + /** + * + * + *
+       * Optional. fsync configuration.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for appendFsync to set. + * @return This builder for chaining. + */ + public Builder setAppendFsyncValue(int value) { + appendFsync_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. fsync configuration.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The appendFsync. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync + getAppendFsync() { + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync + result = + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + .AppendFsync.forNumber(appendFsync_); + return result == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Optional. fsync configuration.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The appendFsync to set. + * @return This builder for chaining. + */ + public Builder setAppendFsync( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + appendFsync_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. fsync configuration.
+       * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAppendFsync() { + bitField0_ = (bitField0_ & ~0x00000001); + appendFsync_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig) + private static final com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig(); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AOFConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int MODE_FIELD_NUMBER = 1; + private int mode_ = 0; + /** + * + * + *
+   * Optional. The mode of persistence.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+   * Optional. The mode of persistence.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode getMode() { + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode result = + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode.forNumber( + mode_); + return result == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode + .UNRECOGNIZED + : result; + } + + public static final int RDB_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdbConfig_; + /** + * + * + *
+   * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rdbConfig field is set. + */ + @java.lang.Override + public boolean hasRdbConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbConfig. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig getRdbConfig() { + return rdbConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + .getDefaultInstance() + : rdbConfig_; + } + /** + * + * + *
+   * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfigOrBuilder + getRdbConfigOrBuilder() { + return rdbConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + .getDefaultInstance() + : rdbConfig_; + } + + public static final int AOF_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aofConfig_; + /** + * + * + *
+   * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the aofConfig field is set. + */ + @java.lang.Override + public boolean hasAofConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The aofConfig. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig getAofConfig() { + return aofConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + .getDefaultInstance() + : aofConfig_; + } + /** + * + * + *
+   * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfigOrBuilder + getAofConfigOrBuilder() { + return aofConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + .getDefaultInstance() + : aofConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (mode_ + != com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode + .PERSISTENCE_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, mode_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getRdbConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getAofConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mode_ + != com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode + .PERSISTENCE_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRdbConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAofConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.redis.cluster.v1beta1.ClusterPersistenceConfig)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig other = + (com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig) obj; + + if (mode_ != other.mode_) return false; + if (hasRdbConfig() != other.hasRdbConfig()) return false; + if (hasRdbConfig()) { + if (!getRdbConfig().equals(other.getRdbConfig())) return false; + } + if (hasAofConfig() != other.hasAofConfig()) return false; + if (hasAofConfig()) { + if (!getAofConfig().equals(other.getAofConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + if (hasRdbConfig()) { + hash = (37 * hash) + RDB_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getRdbConfig().hashCode(); + } + if (hasAofConfig()) { + hash = (37 * hash) + AOF_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAofConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1beta1.ClusterPersistenceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Configuration of the persistence functionality.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig) + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.class, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRdbConfigFieldBuilder(); + getAofConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mode_ = 0; + rdbConfig_ = null; + if (rdbConfigBuilder_ != null) { + rdbConfigBuilder_.dispose(); + rdbConfigBuilder_ = null; + } + aofConfig_ = null; + if (aofConfigBuilder_ != null) { + aofConfigBuilder_.dispose(); + aofConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ClusterPersistenceConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig + getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig build() { + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig buildPartial() { + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig result = + new com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mode_ = mode_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rdbConfig_ = rdbConfigBuilder_ == null ? rdbConfig_ : rdbConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.aofConfig_ = aofConfigBuilder_ == null ? aofConfig_ : aofConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig) { + return mergeFrom((com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig other) { + if (other + == com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.getDefaultInstance()) + return this; + if (other.mode_ != 0) { + setModeValue(other.getModeValue()); + } + if (other.hasRdbConfig()) { + mergeRdbConfig(other.getRdbConfig()); + } + if (other.hasAofConfig()) { + mergeAofConfig(other.getAofConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mode_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getRdbConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getAofConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int mode_ = 0; + /** + * + * + *
+     * Optional. The mode of persistence.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+     * Optional. The mode of persistence.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. + */ + public Builder setModeValue(int value) { + mode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mode of persistence.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode + getMode() { + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode result = + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode.forNumber( + mode_); + return result == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The mode of persistence.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + mode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mode of persistence.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000001); + mode_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdbConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfigOrBuilder> + rdbConfigBuilder_; + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rdbConfig field is set. + */ + public boolean hasRdbConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbConfig. + */ + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + getRdbConfig() { + if (rdbConfigBuilder_ == null) { + return rdbConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + .getDefaultInstance() + : rdbConfig_; + } else { + return rdbConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRdbConfig( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig value) { + if (rdbConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rdbConfig_ = value; + } else { + rdbConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRdbConfig( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.Builder + builderForValue) { + if (rdbConfigBuilder_ == null) { + rdbConfig_ = builderForValue.build(); + } else { + rdbConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRdbConfig( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig value) { + if (rdbConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && rdbConfig_ != null + && rdbConfig_ + != com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + .getDefaultInstance()) { + getRdbConfigBuilder().mergeFrom(value); + } else { + rdbConfig_ = value; + } + } else { + rdbConfigBuilder_.mergeFrom(value); + } + if (rdbConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRdbConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + rdbConfig_ = null; + if (rdbConfigBuilder_ != null) { + rdbConfigBuilder_.dispose(); + rdbConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.Builder + getRdbConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRdbConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfigOrBuilder + getRdbConfigOrBuilder() { + if (rdbConfigBuilder_ != null) { + return rdbConfigBuilder_.getMessageOrBuilder(); + } else { + return rdbConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig + .getDefaultInstance() + : rdbConfig_; + } + } + /** + * + * + *
+     * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfigOrBuilder> + getRdbConfigFieldBuilder() { + if (rdbConfigBuilder_ == null) { + rdbConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfigOrBuilder>( + getRdbConfig(), getParentForChildren(), isClean()); + rdbConfig_ = null; + } + return rdbConfigBuilder_; + } + + private com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aofConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfigOrBuilder> + aofConfigBuilder_; + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the aofConfig field is set. + */ + public boolean hasAofConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The aofConfig. + */ + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + getAofConfig() { + if (aofConfigBuilder_ == null) { + return aofConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + .getDefaultInstance() + : aofConfig_; + } else { + return aofConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAofConfig( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig value) { + if (aofConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aofConfig_ = value; + } else { + aofConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAofConfig( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.Builder + builderForValue) { + if (aofConfigBuilder_ == null) { + aofConfig_ = builderForValue.build(); + } else { + aofConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAofConfig( + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig value) { + if (aofConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && aofConfig_ != null + && aofConfig_ + != com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + .getDefaultInstance()) { + getAofConfigBuilder().mergeFrom(value); + } else { + aofConfig_ = value; + } + } else { + aofConfigBuilder_.mergeFrom(value); + } + if (aofConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAofConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + aofConfig_ = null; + if (aofConfigBuilder_ != null) { + aofConfigBuilder_.dispose(); + aofConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.Builder + getAofConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAofConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfigOrBuilder + getAofConfigOrBuilder() { + if (aofConfigBuilder_ != null) { + return aofConfigBuilder_.getMessageOrBuilder(); + } else { + return aofConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig + .getDefaultInstance() + : aofConfig_; + } + } + /** + * + * + *
+     * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfigOrBuilder> + getAofConfigFieldBuilder() { + if (aofConfigBuilder_ == null) { + aofConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfigOrBuilder>( + getAofConfig(), getParentForChildren(), isClean()); + aofConfig_ = null; + } + return aofConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig) + private static final com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig(); + } + + public static com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClusterPersistenceConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1beta1.ClusterPersistenceConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterPersistenceConfigOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterPersistenceConfigOrBuilder.java new file mode 100644 index 000000000000..9d350734ce47 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterPersistenceConfigOrBuilder.java @@ -0,0 +1,139 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1beta1; + +public interface ClusterPersistenceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The mode of persistence.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + /** + * + * + *
+   * Optional. The mode of persistence.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.PersistenceMode getMode(); + + /** + * + * + *
+   * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rdbConfig field is set. + */ + boolean hasRdbConfig(); + /** + * + * + *
+   * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbConfig. + */ + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig getRdbConfig(); + /** + * + * + *
+   * Optional. RDB configuration. This field will be ignored if mode is not RDB.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.RDBConfigOrBuilder + getRdbConfigOrBuilder(); + + /** + * + * + *
+   * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the aofConfig field is set. + */ + boolean hasAofConfig(); + /** + * + * + *
+   * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The aofConfig. + */ + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig getAofConfig(); + /** + * + * + *
+   * Optional. AOF configuration. This field will be ignored if mode is not AOF.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.redis.cluster.v1beta1.ClusterPersistenceConfig.AOFConfigOrBuilder + getAofConfigOrBuilder(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/GetClusterCertificateAuthorityRequest.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/GetClusterCertificateAuthorityRequest.java new file mode 100644 index 000000000000..62208e685c68 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/GetClusterCertificateAuthorityRequest.java @@ -0,0 +1,681 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1beta1; + +/** + * + * + *
+ * Request for
+ * [GetClusterCertificateAuthorityRequest][CloudRedis.GetClusterCertificateAuthorityRequest].
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest} + */ +public final class GetClusterCertificateAuthorityRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest) + GetClusterCertificateAuthorityRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetClusterCertificateAuthorityRequest.newBuilder() to construct. + private GetClusterCertificateAuthorityRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetClusterCertificateAuthorityRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetClusterCertificateAuthorityRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_GetClusterCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_GetClusterCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest.class, + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Redis cluster certificate authority resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+   * where `location_id` refers to a GCP 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. Redis cluster certificate authority resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+   * where `location_id` refers to a GCP 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.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.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest other = + (com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest) 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.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for
+   * [GetClusterCertificateAuthorityRequest][CloudRedis.GetClusterCertificateAuthorityRequest].
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest) + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_GetClusterCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_GetClusterCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest.class, + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_GetClusterCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest build() { + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + buildPartial() { + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest result = + new com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest) { + return mergeFrom( + (com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest other) { + if (other + == com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + .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. Redis cluster certificate authority resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+     * where `location_id` refers to a GCP 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. Redis cluster certificate authority resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+     * where `location_id` refers to a GCP 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. Redis cluster certificate authority resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+     * where `location_id` refers to a GCP 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. Redis cluster certificate authority resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+     * where `location_id` refers to a GCP 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. Redis cluster certificate authority resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+     * where `location_id` refers to a GCP 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest) + private static final com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest(); + } + + public static com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetClusterCertificateAuthorityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/GetClusterCertificateAuthorityRequestOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/GetClusterCertificateAuthorityRequestOrBuilder.java new file mode 100644 index 000000000000..4f106a1f4ed1 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/GetClusterCertificateAuthorityRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1beta1; + +public interface GetClusterCertificateAuthorityRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Redis cluster certificate authority resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Redis cluster certificate authority resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
+   * where `location_id` refers to a GCP 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-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/NodeType.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/NodeType.java new file mode 100644 index 000000000000..57a0cb2f5234 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/NodeType.java @@ -0,0 +1,207 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1beta1; + +/** + * + * + *
+ * NodeType of a redis cluster node,
+ * 
+ * + * Protobuf enum {@code google.cloud.redis.cluster.v1beta1.NodeType} + */ +public enum NodeType implements com.google.protobuf.ProtocolMessageEnum { + /** NODE_TYPE_UNSPECIFIED = 0; */ + NODE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Redis shared core nano node_type.
+   * 
+ * + * REDIS_SHARED_CORE_NANO = 1; + */ + REDIS_SHARED_CORE_NANO(1), + /** + * + * + *
+   * Redis highmem medium node_type.
+   * 
+ * + * REDIS_HIGHMEM_MEDIUM = 2; + */ + REDIS_HIGHMEM_MEDIUM(2), + /** + * + * + *
+   * Redis highmem xlarge node_type.
+   * 
+ * + * REDIS_HIGHMEM_XLARGE = 3; + */ + REDIS_HIGHMEM_XLARGE(3), + /** + * + * + *
+   * Redis standard small node_type.
+   * 
+ * + * REDIS_STANDARD_SMALL = 4; + */ + REDIS_STANDARD_SMALL(4), + UNRECOGNIZED(-1), + ; + + /** NODE_TYPE_UNSPECIFIED = 0; */ + public static final int NODE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Redis shared core nano node_type.
+   * 
+ * + * REDIS_SHARED_CORE_NANO = 1; + */ + public static final int REDIS_SHARED_CORE_NANO_VALUE = 1; + /** + * + * + *
+   * Redis highmem medium node_type.
+   * 
+ * + * REDIS_HIGHMEM_MEDIUM = 2; + */ + public static final int REDIS_HIGHMEM_MEDIUM_VALUE = 2; + /** + * + * + *
+   * Redis highmem xlarge node_type.
+   * 
+ * + * REDIS_HIGHMEM_XLARGE = 3; + */ + public static final int REDIS_HIGHMEM_XLARGE_VALUE = 3; + /** + * + * + *
+   * Redis standard small node_type.
+   * 
+ * + * REDIS_STANDARD_SMALL = 4; + */ + public static final int REDIS_STANDARD_SMALL_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 NodeType 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 NodeType forNumber(int value) { + switch (value) { + case 0: + return NODE_TYPE_UNSPECIFIED; + case 1: + return REDIS_SHARED_CORE_NANO; + case 2: + return REDIS_HIGHMEM_MEDIUM; + case 3: + return REDIS_HIGHMEM_XLARGE; + case 4: + return REDIS_STANDARD_SMALL; + 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 NodeType findValueByNumber(int number) { + return NodeType.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final NodeType[] VALUES = values(); + + public static NodeType 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 NodeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1beta1.NodeType) +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/TransitEncryptionMode.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/TransitEncryptionMode.java index 79a4adfc6b35..630c27f493be 100644 --- a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/TransitEncryptionMode.java +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/TransitEncryptionMode.java @@ -156,7 +156,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto.getDescriptor() .getEnumTypes() - .get(1); + .get(2); } private static final TransitEncryptionMode[] VALUES = values(); diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ZoneDistributionConfig.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ZoneDistributionConfig.java new file mode 100644 index 000000000000..37ac4defaf3c --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ZoneDistributionConfig.java @@ -0,0 +1,1000 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1beta1; + +/** + * + * + *
+ * Zone distribution config for allocation of cluster resources.
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig} + */ +public final class ZoneDistributionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig) + ZoneDistributionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ZoneDistributionConfig.newBuilder() to construct. + private ZoneDistributionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ZoneDistributionConfig() { + mode_ = 0; + zone_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ZoneDistributionConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ZoneDistributionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ZoneDistributionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.class, + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.Builder.class); + } + + /** + * + * + *
+   * Defines various modes of zone distribution.
+   * Currently supports two modes, can be expanded in future to support more
+   * types of distribution modes.
+   * design doc: go/same-zone-cluster
+   * 
+ * + * Protobuf enum {@code + * google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode} + */ + public enum ZoneDistributionMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not Set. Default: MULTI_ZONE
+     * 
+ * + * ZONE_DISTRIBUTION_MODE_UNSPECIFIED = 0; + */ + ZONE_DISTRIBUTION_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Distribute all resources across 3 zones picked at random, within the
+     * region.
+     * 
+ * + * MULTI_ZONE = 1; + */ + MULTI_ZONE(1), + /** + * + * + *
+     * Distribute all resources in a single zone. The zone field must be
+     * specified, when this mode is selected.
+     * 
+ * + * SINGLE_ZONE = 2; + */ + SINGLE_ZONE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not Set. Default: MULTI_ZONE
+     * 
+ * + * ZONE_DISTRIBUTION_MODE_UNSPECIFIED = 0; + */ + public static final int ZONE_DISTRIBUTION_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Distribute all resources across 3 zones picked at random, within the
+     * region.
+     * 
+ * + * MULTI_ZONE = 1; + */ + public static final int MULTI_ZONE_VALUE = 1; + /** + * + * + *
+     * Distribute all resources in a single zone. The zone field must be
+     * specified, when this mode is selected.
+     * 
+ * + * SINGLE_ZONE = 2; + */ + public static final int SINGLE_ZONE_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 ZoneDistributionMode 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 ZoneDistributionMode forNumber(int value) { + switch (value) { + case 0: + return ZONE_DISTRIBUTION_MODE_UNSPECIFIED; + case 1: + return MULTI_ZONE; + case 2: + return SINGLE_ZONE; + 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 ZoneDistributionMode findValueByNumber(int number) { + return ZoneDistributionMode.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ZoneDistributionMode[] VALUES = values(); + + public static ZoneDistributionMode 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 ZoneDistributionMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode) + } + + public static final int MODE_FIELD_NUMBER = 1; + private int mode_ = 0; + /** + * + * + *
+   * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+   * specified.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+   * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+   * specified.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode + getMode() { + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode result = + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode + .forNumber(mode_); + return result == null + ? com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode + .UNRECOGNIZED + : result; + } + + public static final int ZONE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object zone_ = ""; + /** + * + * + *
+   * Optional. When SINGLE ZONE distribution is selected, zone field would be
+   * used to allocate all resources in that zone. This is not applicable to
+   * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. When SINGLE ZONE distribution is selected, zone field would be
+   * used to allocate all resources in that zone. This is not applicable to
+   * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = 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 (mode_ + != com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode + .ZONE_DISTRIBUTION_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, mode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, zone_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mode_ + != com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode + .ZONE_DISTRIBUTION_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, zone_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.redis.cluster.v1beta1.ZoneDistributionConfig)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig other = + (com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig) obj; + + if (mode_ != other.mode_) return false; + if (!getZone().equals(other.getZone())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.redis.cluster.v1beta1.ZoneDistributionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Zone distribution config for allocation of cluster resources.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig) + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ZoneDistributionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ZoneDistributionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.class, + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mode_ = 0; + zone_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ZoneDistributionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig + getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig build() { + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig buildPartial() { + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig result = + new com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mode_ = mode_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.zone_ = zone_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig) { + return mergeFrom((com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig other) { + if (other + == com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.getDefaultInstance()) + return this; + if (other.mode_ != 0) { + setModeValue(other.getModeValue()); + } + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mode_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int mode_ = 0; + /** + * + * + *
+     * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+     * specified.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+     * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+     * specified.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. + */ + public Builder setModeValue(int value) { + mode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+     * specified.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode + getMode() { + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode result = + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode + .forNumber(mode_); + return result == null + ? com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+     * specified.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode( + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + mode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+     * specified.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000001); + mode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object zone_ = ""; + /** + * + * + *
+     * Optional. When SINGLE ZONE distribution is selected, zone field would be
+     * used to allocate all resources in that zone. This is not applicable to
+     * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. When SINGLE ZONE distribution is selected, zone field would be
+     * used to allocate all resources in that zone. This is not applicable to
+     * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. When SINGLE ZONE distribution is selected, zone field would be
+     * used to allocate all resources in that zone. This is not applicable to
+     * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + zone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When SINGLE ZONE distribution is selected, zone field would be
+     * used to allocate all resources in that zone. This is not applicable to
+     * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + zone_ = getDefaultInstance().getZone(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When SINGLE ZONE distribution is selected, zone field would be
+     * used to allocate all resources in that zone. This is not applicable to
+     * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + zone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig) + private static final com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig(); + } + + public static com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ZoneDistributionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.redis.cluster.v1beta1.ZoneDistributionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ZoneDistributionConfigOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ZoneDistributionConfigOrBuilder.java new file mode 100644 index 000000000000..47e0508ed20b --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ZoneDistributionConfigOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.redis.cluster.v1beta1; + +public interface ZoneDistributionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+   * specified.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + /** + * + * + *
+   * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
+   * specified.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + com.google.cloud.redis.cluster.v1beta1.ZoneDistributionConfig.ZoneDistributionMode getMode(); + + /** + * + * + *
+   * Optional. When SINGLE ZONE distribution is selected, zone field would be
+   * used to allocate all resources in that zone. This is not applicable to
+   * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The zone. + */ + java.lang.String getZone(); + /** + * + * + *
+   * Optional. When SINGLE ZONE distribution is selected, zone field would be
+   * used to allocate all resources in that zone. This is not applicable to
+   * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/proto/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/proto/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto index 6833fd2fe47a..8114ac016064 100644 --- a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/proto/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/proto/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto @@ -30,6 +30,7 @@ option go_package = "cloud.google.com/go/redis/cluster/apiv1beta1/clusterpb;clus option java_multiple_files = true; option java_outer_classname = "CloudRedisClusterProto"; option java_package = "com.google.cloud.redis.cluster.v1beta1"; +option ruby_package = "Google::Cloud::Redis::Cluster::V1beta1"; // Configures and manages Cloud Memorystore for Redis clusters // @@ -133,6 +134,15 @@ service CloudRedisCluster { metadata_type: "google.protobuf.Any" }; } + + // Gets the details of certificate authority information for Redis cluster. + rpc GetClusterCertificateAuthority(GetClusterCertificateAuthorityRequest) + returns (CertificateAuthority) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/clusters/*/certificateAuthority}" + }; + option (google.api.method_signature) = "name"; + } } // Available authorization mode of a Redis cluster. @@ -147,6 +157,23 @@ enum AuthorizationMode { AUTH_MODE_DISABLED = 2; } +// NodeType of a redis cluster node, +enum NodeType { + NODE_TYPE_UNSPECIFIED = 0; + + // Redis shared core nano node_type. + REDIS_SHARED_CORE_NANO = 1; + + // Redis highmem medium node_type. + REDIS_HIGHMEM_MEDIUM = 2; + + // Redis highmem xlarge node_type. + REDIS_HIGHMEM_XLARGE = 3; + + // Redis standard small node_type. + REDIS_STANDARD_SMALL = 4; +} + // Available mode of in-transit encryption. enum TransitEncryptionMode { // In-transit encryption not set. @@ -281,6 +308,20 @@ message DeleteClusterRequest { string request_id = 2; } +// Request for +// [GetClusterCertificateAuthorityRequest][CloudRedis.GetClusterCertificateAuthorityRequest]. +message GetClusterCertificateAuthorityRequest { + // Required. Redis cluster certificate authority resource name using the form: + // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` + // where `location_id` refers to a GCP region. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "redis.googleapis.com/CertificateAuthority" + } + ]; +} + // A cluster instance. message Cluster { option (google.api.resource) = { @@ -352,7 +393,8 @@ message Cluster { TransitEncryptionMode transit_encryption_mode = 12 [(google.api.field_behavior) = OPTIONAL]; - // Output only. Redis memory size in GB for the entire cluster. + // Output only. Redis memory size in GB for the entire cluster rounded up to + // the next integer. optional int32 size_gb = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. Number of shards for the Redis cluster. @@ -375,6 +417,32 @@ message Cluster { // Output only. Additional information about the current state of the cluster. StateInfo state_info = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The type of a redis node in the cluster. NodeType determines the + // underlying machine-type of a redis node. + NodeType node_type = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Persistence config (RDB, AOF) for the cluster. + ClusterPersistenceConfig persistence_config = 20 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Key/Value pairs of customer overrides for mutable Redis Configs + map redis_configs = 21 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Precise value of redis memory size in GB for the entire + // cluster. + optional double precise_size_gb = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. This config will be used to determine how the customer wants us + // to distribute cluster resources within the region. + ZoneDistributionConfig zone_distribution_config = 23 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The delete operation will fail when the value is set to true. + optional bool deletion_protection_enabled = 25 + [(google.api.field_behavior) = OPTIONAL]; } message PscConfig { @@ -451,3 +519,143 @@ message OperationMetadata { // Output only. API version used to start the operation. string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } + +// Redis cluster certificate authority +message CertificateAuthority { + option (google.api.resource) = { + type: "redis.googleapis.com/CertificateAuthority" + pattern: "projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority" + }; + + message ManagedCertificateAuthority { + message CertChain { + // The certificates that form the CA chain, from leaf to root order. + repeated string certificates = 1; + } + + // The PEM encoded CA certificate chains for redis managed + // server authentication + repeated CertChain ca_certs = 1; + } + + // server ca information + oneof server_ca { + ManagedCertificateAuthority managed_server_ca = 1; + } + + // Identifier. Unique name of the resource in this scope including project, + // location and cluster using the form: + // `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority` + string name = 2 [(google.api.field_behavior) = IDENTIFIER]; +} + +// Configuration of the persistence functionality. +message ClusterPersistenceConfig { + // Configuration of the RDB based persistence. + message RDBConfig { + // Available snapshot periods. + enum SnapshotPeriod { + // Not set. + SNAPSHOT_PERIOD_UNSPECIFIED = 0; + + // One hour. + ONE_HOUR = 1; + + // Six hours. + SIX_HOURS = 2; + + // Twelve hours. + TWELVE_HOURS = 3; + + // Twenty four hours. + TWENTY_FOUR_HOURS = 4; + } + + // Optional. Period between RDB snapshots. + SnapshotPeriod rdb_snapshot_period = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The time that the first snapshot was/will be attempted, and to + // which future snapshots will be aligned. If not provided, the current time + // will be used. + google.protobuf.Timestamp rdb_snapshot_start_time = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration of the AOF based persistence. + message AOFConfig { + // Available fsync modes. + enum AppendFsync { + // Not set. Default: EVERYSEC + APPEND_FSYNC_UNSPECIFIED = 0; + + // Never fsync. Normally Linux will flush data every 30 seconds with this + // configuration, but it's up to the kernel's exact tuning. + NO = 1; + + // fsync every second. Fast enough, and you may lose 1 second of data if + // there is a disaster + EVERYSEC = 2; + + // fsync every time new commands are appended to the AOF. It has the best + // data loss protection at the cost of performance + ALWAYS = 3; + } + + // Optional. fsync configuration. + AppendFsync append_fsync = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Available persistence modes. + enum PersistenceMode { + // Not set. + PERSISTENCE_MODE_UNSPECIFIED = 0; + + // Persistence is disabled, and any snapshot data is deleted. + DISABLED = 1; + + // RDB based persistence is enabled. + RDB = 2; + + // AOF based persistence is enabled. + AOF = 3; + } + + // Optional. The mode of persistence. + PersistenceMode mode = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. RDB configuration. This field will be ignored if mode is not RDB. + RDBConfig rdb_config = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. AOF configuration. This field will be ignored if mode is not AOF. + AOFConfig aof_config = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Zone distribution config for allocation of cluster resources. +message ZoneDistributionConfig { + // Defines various modes of zone distribution. + // Currently supports two modes, can be expanded in future to support more + // types of distribution modes. + // design doc: go/same-zone-cluster + enum ZoneDistributionMode { + // Not Set. Default: MULTI_ZONE + ZONE_DISTRIBUTION_MODE_UNSPECIFIED = 0; + + // Distribute all resources across 3 zones picked at random, within the + // region. + MULTI_ZONE = 1; + + // Distribute all resources in a single zone. The zone field must be + // specified, when this mode is selected. + SINGLE_ZONE = 2; + } + + // Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not + // specified. + ZoneDistributionMode mode = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When SINGLE ZONE distribution is selected, zone field would be + // used to allocate all resources in that zone. This is not applicable to + // MULTI_ZONE, and would be ignored for MULTI_ZONE clusters. + string zone = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getclustercertificateauthority/AsyncGetClusterCertificateAuthority.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getclustercertificateauthority/AsyncGetClusterCertificateAuthority.java new file mode 100644 index 000000000000..850a31d91be8 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getclustercertificateauthority/AsyncGetClusterCertificateAuthority.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_GetClusterCertificateAuthority_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.redis.cluster.v1.CertificateAuthority; +import com.google.cloud.redis.cluster.v1.CertificateAuthorityName; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest; + +public class AsyncGetClusterCertificateAuthority { + + public static void main(String[] args) throws Exception { + asyncGetClusterCertificateAuthority(); + } + + public static void asyncGetClusterCertificateAuthority() 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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + GetClusterCertificateAuthorityRequest request = + GetClusterCertificateAuthorityRequest.newBuilder() + .setName( + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + ApiFuture future = + cloudRedisClusterClient.getClusterCertificateAuthorityCallable().futureCall(request); + // Do something. + CertificateAuthority response = future.get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_GetClusterCertificateAuthority_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthority.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthority.java new file mode 100644 index 000000000000..954fd0537830 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthority.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_GetClusterCertificateAuthority_sync] +import com.google.cloud.redis.cluster.v1.CertificateAuthority; +import com.google.cloud.redis.cluster.v1.CertificateAuthorityName; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest; + +public class SyncGetClusterCertificateAuthority { + + public static void main(String[] args) throws Exception { + syncGetClusterCertificateAuthority(); + } + + public static void syncGetClusterCertificateAuthority() 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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + GetClusterCertificateAuthorityRequest request = + GetClusterCertificateAuthorityRequest.newBuilder() + .setName( + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + CertificateAuthority response = + cloudRedisClusterClient.getClusterCertificateAuthority(request); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_GetClusterCertificateAuthority_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthorityCertificateauthorityname.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthorityCertificateauthorityname.java new file mode 100644 index 000000000000..468a641a0247 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthorityCertificateauthorityname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_GetClusterCertificateAuthority_Certificateauthorityname_sync] +import com.google.cloud.redis.cluster.v1.CertificateAuthority; +import com.google.cloud.redis.cluster.v1.CertificateAuthorityName; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; + +public class SyncGetClusterCertificateAuthorityCertificateauthorityname { + + public static void main(String[] args) throws Exception { + syncGetClusterCertificateAuthorityCertificateauthorityname(); + } + + public static void syncGetClusterCertificateAuthorityCertificateauthorityname() 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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + CertificateAuthority response = cloudRedisClusterClient.getClusterCertificateAuthority(name); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_GetClusterCertificateAuthority_Certificateauthorityname_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthorityString.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthorityString.java new file mode 100644 index 000000000000..15195ae1a62c --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthorityString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_GetClusterCertificateAuthority_String_sync] +import com.google.cloud.redis.cluster.v1.CertificateAuthority; +import com.google.cloud.redis.cluster.v1.CertificateAuthorityName; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; + +public class SyncGetClusterCertificateAuthorityString { + + public static void main(String[] args) throws Exception { + syncGetClusterCertificateAuthorityString(); + } + + public static void syncGetClusterCertificateAuthorityString() 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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + String name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); + CertificateAuthority response = cloudRedisClusterClient.getClusterCertificateAuthority(name); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_GetClusterCertificateAuthority_String_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getclustercertificateauthority/AsyncGetClusterCertificateAuthority.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getclustercertificateauthority/AsyncGetClusterCertificateAuthority.java new file mode 100644 index 000000000000..3669ea85dd09 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getclustercertificateauthority/AsyncGetClusterCertificateAuthority.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_GetClusterCertificateAuthority_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.redis.cluster.v1beta1.CertificateAuthority; +import com.google.cloud.redis.cluster.v1beta1.CertificateAuthorityName; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest; + +public class AsyncGetClusterCertificateAuthority { + + public static void main(String[] args) throws Exception { + asyncGetClusterCertificateAuthority(); + } + + public static void asyncGetClusterCertificateAuthority() 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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + GetClusterCertificateAuthorityRequest request = + GetClusterCertificateAuthorityRequest.newBuilder() + .setName( + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + ApiFuture future = + cloudRedisClusterClient.getClusterCertificateAuthorityCallable().futureCall(request); + // Do something. + CertificateAuthority response = future.get(); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_GetClusterCertificateAuthority_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthority.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthority.java new file mode 100644 index 000000000000..37634ee59c18 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthority.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_GetClusterCertificateAuthority_sync] +import com.google.cloud.redis.cluster.v1beta1.CertificateAuthority; +import com.google.cloud.redis.cluster.v1beta1.CertificateAuthorityName; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest; + +public class SyncGetClusterCertificateAuthority { + + public static void main(String[] args) throws Exception { + syncGetClusterCertificateAuthority(); + } + + public static void syncGetClusterCertificateAuthority() 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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + GetClusterCertificateAuthorityRequest request = + GetClusterCertificateAuthorityRequest.newBuilder() + .setName( + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + CertificateAuthority response = + cloudRedisClusterClient.getClusterCertificateAuthority(request); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_GetClusterCertificateAuthority_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthorityCertificateauthorityname.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthorityCertificateauthorityname.java new file mode 100644 index 000000000000..e67f36496d00 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthorityCertificateauthorityname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_GetClusterCertificateAuthority_Certificateauthorityname_sync] +import com.google.cloud.redis.cluster.v1beta1.CertificateAuthority; +import com.google.cloud.redis.cluster.v1beta1.CertificateAuthorityName; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; + +public class SyncGetClusterCertificateAuthorityCertificateauthorityname { + + public static void main(String[] args) throws Exception { + syncGetClusterCertificateAuthorityCertificateauthorityname(); + } + + public static void syncGetClusterCertificateAuthorityCertificateauthorityname() 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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + CertificateAuthority response = cloudRedisClusterClient.getClusterCertificateAuthority(name); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_GetClusterCertificateAuthority_Certificateauthorityname_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthorityString.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthorityString.java new file mode 100644 index 000000000000..e3bdd83d5904 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getclustercertificateauthority/SyncGetClusterCertificateAuthorityString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_GetClusterCertificateAuthority_String_sync] +import com.google.cloud.redis.cluster.v1beta1.CertificateAuthority; +import com.google.cloud.redis.cluster.v1beta1.CertificateAuthorityName; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; + +public class SyncGetClusterCertificateAuthorityString { + + public static void main(String[] args) throws Exception { + syncGetClusterCertificateAuthorityString(); + } + + public static void syncGetClusterCertificateAuthorityString() 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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + String name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); + CertificateAuthority response = cloudRedisClusterClient.getClusterCertificateAuthority(name); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_GetClusterCertificateAuthority_String_sync] diff --git a/java-retail/README.md b/java-retail/README.md index acb7a8a8b057..76ea0c4e8be3 100644 --- a/java-retail/README.md +++ b/java-retail/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-retail.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-retail/2.46.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-retail/2.47.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-retail/google-cloud-retail/pom.xml b/java-retail/google-cloud-retail/pom.xml index f250e2f42610..f9daa8885f83 100644 --- a/java-retail/google-cloud-retail/pom.xml +++ b/java-retail/google-cloud-retail/pom.xml @@ -115,5 +115,10 @@ testlib test + + com.google.api.grpc + grpc-google-common-protos + test + diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceClient.java index fce03c837551..f6cf6ef3f419 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceClient.java @@ -55,6 +55,7 @@ * .setDeviceType("deviceType781190832") * .setDataset("dataset1443214456") * .setMaxSuggestions(618824852) + * .setEnableAttributeSuggestions(true) * .setEntity("entity-1298275357") * .build(); * CompleteQueryResponse response = completionServiceClient.completeQuery(request); @@ -263,6 +264,7 @@ public final OperationsClient getHttpJsonOperationsClient() { * .setDeviceType("deviceType781190832") * .setDataset("dataset1443214456") * .setMaxSuggestions(618824852) + * .setEnableAttributeSuggestions(true) * .setEntity("entity-1298275357") * .build(); * CompleteQueryResponse response = completionServiceClient.completeQuery(request); @@ -301,6 +303,7 @@ public final CompleteQueryResponse completeQuery(CompleteQueryRequest request) { * .setDeviceType("deviceType781190832") * .setDataset("dataset1443214456") * .setMaxSuggestions(618824852) + * .setEnableAttributeSuggestions(true) * .setEntity("entity-1298275357") * .build(); * ApiFuture future = diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java index d4d0829436a8..2e893c7ae4da 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java @@ -167,6 +167,23 @@ * * * + *

PurgeProducts + *

Permanently deletes all selected [Product][google.cloud.retail.v2.Product]s under a branch. + *

This process is asynchronous. If the request is valid, the removal will be enqueued and processed offline. Depending on the number of [Product][google.cloud.retail.v2.Product]s, this operation could take hours to complete. Before the operation completes, some [Product][google.cloud.retail.v2.Product]s may still be returned by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + *

Depending on the number of [Product][google.cloud.retail.v2.Product]s, this operation could take hours to complete. To get a sample of [Product][google.cloud.retail.v2.Product]s that would be deleted, set [PurgeProductsRequest.force][google.cloud.retail.v2.PurgeProductsRequest.force] to false. + * + *

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

+ *
    + *
  • purgeProductsAsync(PurgeProductsRequest request) + *

+ *

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

+ *
    + *
  • purgeProductsOperationCallable() + *

  • purgeProductsCallable() + *

+ * + * + * *

ImportProducts *

Bulk import of multiple [Product][google.cloud.retail.v2.Product]s. *

Request processing may be synchronous. Non-existing items are created. @@ -211,7 +228,7 @@ * * *

AddFulfillmentPlaces - *

It is recommended to use the [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] method instead of [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. + *

We recommend that you use the [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] method instead of the [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces] method. [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. *

Incrementally adds place IDs to [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2.Product] to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the [Product][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. @@ -235,7 +252,7 @@ * * *

RemoveFulfillmentPlaces - *

It is recommended to use the [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] method instead of [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. + *

We recommend that you use the [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] method instead of the [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces] method. [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. *

Incrementally removes place IDs from a [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2.Product] to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the [Product][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. @@ -1142,6 +1159,137 @@ public final UnaryCallable deleteProductCallable() return stub.deleteProductCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes all selected [Product][google.cloud.retail.v2.Product]s under a branch. + * + *

This process is asynchronous. If the request is valid, the removal will be enqueued and + * processed offline. Depending on the number of [Product][google.cloud.retail.v2.Product]s, this + * operation could take hours to complete. Before the operation completes, some + * [Product][google.cloud.retail.v2.Product]s may still be returned by + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * + *

Depending on the number of [Product][google.cloud.retail.v2.Product]s, this operation could + * take hours to complete. To get a sample of [Product][google.cloud.retail.v2.Product]s that + * would be deleted, set + * [PurgeProductsRequest.force][google.cloud.retail.v2.PurgeProductsRequest.force] to false. + * + *

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 (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
+   *   PurgeProductsRequest request =
+   *       PurgeProductsRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setForce(true)
+   *           .build();
+   *   PurgeProductsResponse response = productServiceClient.purgeProductsAsync(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 purgeProductsAsync( + PurgeProductsRequest request) { + return purgeProductsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes all selected [Product][google.cloud.retail.v2.Product]s under a branch. + * + *

This process is asynchronous. If the request is valid, the removal will be enqueued and + * processed offline. Depending on the number of [Product][google.cloud.retail.v2.Product]s, this + * operation could take hours to complete. Before the operation completes, some + * [Product][google.cloud.retail.v2.Product]s may still be returned by + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * + *

Depending on the number of [Product][google.cloud.retail.v2.Product]s, this operation could + * take hours to complete. To get a sample of [Product][google.cloud.retail.v2.Product]s that + * would be deleted, set + * [PurgeProductsRequest.force][google.cloud.retail.v2.PurgeProductsRequest.force] to false. + * + *

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 (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
+   *   PurgeProductsRequest request =
+   *       PurgeProductsRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       productServiceClient.purgeProductsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   PurgeProductsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + purgeProductsOperationCallable() { + return stub.purgeProductsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes all selected [Product][google.cloud.retail.v2.Product]s under a branch. + * + *

This process is asynchronous. If the request is valid, the removal will be enqueued and + * processed offline. Depending on the number of [Product][google.cloud.retail.v2.Product]s, this + * operation could take hours to complete. Before the operation completes, some + * [Product][google.cloud.retail.v2.Product]s may still be returned by + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * + *

Depending on the number of [Product][google.cloud.retail.v2.Product]s, this operation could + * take hours to complete. To get a sample of [Product][google.cloud.retail.v2.Product]s that + * would be deleted, set + * [PurgeProductsRequest.force][google.cloud.retail.v2.PurgeProductsRequest.force] to false. + * + *

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 (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
+   *   PurgeProductsRequest request =
+   *       PurgeProductsRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       productServiceClient.purgeProductsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable purgeProductsCallable() { + return stub.purgeProductsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Bulk import of multiple [Product][google.cloud.retail.v2.Product]s. @@ -1597,10 +1745,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] - * method instead of - * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + * method instead of the + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces] + * method. * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -1659,10 +1808,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] - * method instead of - * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + * method instead of the + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces] + * method. * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -1720,10 +1870,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] - * method instead of - * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + * method instead of the + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces] + * method. * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -1781,10 +1932,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] - * method instead of - * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + * method instead of the + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces] + * method. * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -1842,10 +1994,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] - * method instead of - * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + * method instead of the + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces] + * method. * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -1902,10 +2055,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] - * method instead of - * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + * method instead of the + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces] + * method. * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -1964,10 +2118,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] - * method instead of - * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + * method instead of the + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces] + * method. * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -2025,10 +2180,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] - * method instead of - * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + * method instead of the + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces] + * method. * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -2086,10 +2242,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] - * method instead of - * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + * method instead of the + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces] + * method. * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -2149,10 +2306,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] - * method instead of - * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + * method instead of the + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces] + * method. * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceSettings.java index f9cedcb644cf..a05a22390fa7 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceSettings.java @@ -104,6 +104,17 @@ public UnaryCallSettings deleteProductSettings() { return ((ProductServiceStubSettings) getStubSettings()).deleteProductSettings(); } + /** Returns the object with the settings used for calls to purgeProducts. */ + public UnaryCallSettings purgeProductsSettings() { + return ((ProductServiceStubSettings) getStubSettings()).purgeProductsSettings(); + } + + /** Returns the object with the settings used for calls to purgeProducts. */ + public OperationCallSettings + purgeProductsOperationSettings() { + return ((ProductServiceStubSettings) getStubSettings()).purgeProductsOperationSettings(); + } + /** Returns the object with the settings used for calls to importProducts. */ public UnaryCallSettings importProductsSettings() { return ((ProductServiceStubSettings) getStubSettings()).importProductsSettings(); @@ -321,6 +332,18 @@ public UnaryCallSettings.Builder deleteProductSetti return getStubSettingsBuilder().deleteProductSettings(); } + /** Returns the builder for the settings used for calls to purgeProducts. */ + public UnaryCallSettings.Builder purgeProductsSettings() { + return getStubSettingsBuilder().purgeProductsSettings(); + } + + /** Returns the builder for the settings used for calls to purgeProducts. */ + public OperationCallSettings.Builder< + PurgeProductsRequest, PurgeProductsResponse, PurgeProductsMetadata> + purgeProductsOperationSettings() { + return getStubSettingsBuilder().purgeProductsOperationSettings(); + } + /** Returns the builder for the settings used for calls to importProducts. */ public UnaryCallSettings.Builder importProductsSettings() { return getStubSettingsBuilder().importProductsSettings(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/gapic_metadata.json b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/gapic_metadata.json index 5dfd9bec5833..b4bfb76af5fa 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/gapic_metadata.json +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/gapic_metadata.json @@ -169,6 +169,9 @@ "ListProducts": { "methods": ["listProducts", "listProducts", "listProducts", "listProductsPagedCallable", "listProductsCallable"] }, + "PurgeProducts": { + "methods": ["purgeProductsAsync", "purgeProductsOperationCallable", "purgeProductsCallable"] + }, "RemoveFulfillmentPlaces": { "methods": ["removeFulfillmentPlacesAsync", "removeFulfillmentPlacesAsync", "removeFulfillmentPlacesAsync", "removeFulfillmentPlacesOperationCallable", "removeFulfillmentPlacesCallable"] }, diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/package-info.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/package-info.java index 41849e4202fa..49800e5fc2b1 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/package-info.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/package-info.java @@ -15,7 +15,7 @@ */ /** - * A client to Retail API + * A client to Vertex AI Search for Retail API * *

The interfaces provided are listed below, along with usage samples. * @@ -88,6 +88,7 @@ * .setDeviceType("deviceType781190832") * .setDataset("dataset1443214456") * .setMaxSuggestions(618824852) + * .setEnableAttributeSuggestions(true) * .setEntity("entity-1298275357") * .build(); * CompleteQueryResponse response = completionServiceClient.completeQuery(request); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/AnalyticsServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/AnalyticsServiceStubSettings.java index 7cbbad7412e5..28974b2e9b94 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/AnalyticsServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/AnalyticsServiceStubSettings.java @@ -243,7 +243,7 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "retry_policy_2_codes", + "retry_policy_3_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); @@ -265,7 +265,7 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/GrpcProductServiceStub.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/GrpcProductServiceStub.java index 5f9359b4b3ee..520441d77577 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/GrpcProductServiceStub.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/GrpcProductServiceStub.java @@ -41,6 +41,9 @@ import com.google.cloud.retail.v2.ListProductsRequest; import com.google.cloud.retail.v2.ListProductsResponse; import com.google.cloud.retail.v2.Product; +import com.google.cloud.retail.v2.PurgeProductsMetadata; +import com.google.cloud.retail.v2.PurgeProductsRequest; +import com.google.cloud.retail.v2.PurgeProductsResponse; import com.google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata; import com.google.cloud.retail.v2.RemoveFulfillmentPlacesRequest; import com.google.cloud.retail.v2.RemoveFulfillmentPlacesResponse; @@ -114,6 +117,16 @@ public class GrpcProductServiceStub extends ProductServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor + purgeProductsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2.ProductService/PurgeProducts") + .setRequestMarshaller( + ProtoUtils.marshaller(PurgeProductsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor importProductsMethodDescriptor = MethodDescriptor.newBuilder() @@ -180,6 +193,10 @@ public class GrpcProductServiceStub extends ProductServiceStub { listProductsPagedCallable; private final UnaryCallable updateProductCallable; private final UnaryCallable deleteProductCallable; + private final UnaryCallable purgeProductsCallable; + private final OperationCallable< + PurgeProductsRequest, PurgeProductsResponse, PurgeProductsMetadata> + purgeProductsOperationCallable; private final UnaryCallable importProductsCallable; private final OperationCallable importProductsOperationCallable; @@ -303,6 +320,16 @@ protected GrpcProductServiceStub( return builder.build(); }) .build(); + GrpcCallSettings purgeProductsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(purgeProductsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); GrpcCallSettings importProductsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(importProductsMethodDescriptor) @@ -384,6 +411,15 @@ protected GrpcProductServiceStub( this.deleteProductCallable = callableFactory.createUnaryCallable( deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); + this.purgeProductsCallable = + callableFactory.createUnaryCallable( + purgeProductsTransportSettings, settings.purgeProductsSettings(), clientContext); + this.purgeProductsOperationCallable = + callableFactory.createOperationCallable( + purgeProductsTransportSettings, + settings.purgeProductsOperationSettings(), + clientContext, + operationsStub); this.importProductsCallable = callableFactory.createUnaryCallable( importProductsTransportSettings, settings.importProductsSettings(), clientContext); @@ -485,6 +521,17 @@ public UnaryCallable deleteProductCallable() { return deleteProductCallable; } + @Override + public UnaryCallable purgeProductsCallable() { + return purgeProductsCallable; + } + + @Override + public OperationCallable + purgeProductsOperationCallable() { + return purgeProductsOperationCallable; + } + @Override public UnaryCallable importProductsCallable() { return importProductsCallable; diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonCompletionServiceStub.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonCompletionServiceStub.java index b8db5f60e434..83ab2d252692 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonCompletionServiceStub.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonCompletionServiceStub.java @@ -86,6 +86,10 @@ public class HttpJsonCompletionServiceStub extends CompletionServiceStub { ProtoRestSerializer.create(); serializer.putQueryParam(fields, "dataset", request.getDataset()); serializer.putQueryParam(fields, "deviceType", request.getDeviceType()); + serializer.putQueryParam( + fields, + "enableAttributeSuggestions", + request.getEnableAttributeSuggestions()); serializer.putQueryParam(fields, "entity", request.getEntity()); serializer.putQueryParam( fields, "languageCodes", request.getLanguageCodesList()); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonProductServiceStub.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonProductServiceStub.java index 5b93f1bac8d1..10ec02d0d463 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonProductServiceStub.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonProductServiceStub.java @@ -49,6 +49,9 @@ import com.google.cloud.retail.v2.ListProductsRequest; import com.google.cloud.retail.v2.ListProductsResponse; import com.google.cloud.retail.v2.Product; +import com.google.cloud.retail.v2.PurgeProductsMetadata; +import com.google.cloud.retail.v2.PurgeProductsRequest; +import com.google.cloud.retail.v2.PurgeProductsResponse; import com.google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata; import com.google.cloud.retail.v2.RemoveFulfillmentPlacesRequest; import com.google.cloud.retail.v2.RemoveFulfillmentPlacesResponse; @@ -81,18 +84,20 @@ public class HttpJsonProductServiceStub extends ProductServiceStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() - .add(RemoveLocalInventoriesMetadata.getDescriptor()) - .add(AddLocalInventoriesMetadata.getDescriptor()) - .add(AddFulfillmentPlacesMetadata.getDescriptor()) .add(RemoveFulfillmentPlacesMetadata.getDescriptor()) + .add(PurgeProductsMetadata.getDescriptor()) .add(SetInventoryResponse.getDescriptor()) .add(AddLocalInventoriesResponse.getDescriptor()) .add(ImportProductsResponse.getDescriptor()) .add(RemoveFulfillmentPlacesResponse.getDescriptor()) - .add(RemoveLocalInventoriesResponse.getDescriptor()) - .add(ImportMetadata.getDescriptor()) .add(AddFulfillmentPlacesResponse.getDescriptor()) .add(SetInventoryMetadata.getDescriptor()) + .add(RemoveLocalInventoriesMetadata.getDescriptor()) + .add(AddLocalInventoriesMetadata.getDescriptor()) + .add(AddFulfillmentPlacesMetadata.getDescriptor()) + .add(PurgeProductsResponse.getDescriptor()) + .add(RemoveLocalInventoriesResponse.getDescriptor()) + .add(ImportMetadata.getDescriptor()) .build(); private static final ApiMethodDescriptor @@ -279,6 +284,46 @@ public class HttpJsonProductServiceStub extends ProductServiceStub { .build()) .build(); + private static final ApiMethodDescriptor + purgeProductsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2.ProductService/PurgeProducts") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*/locations/*/catalogs/*/branches/*}/products:purge", + 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( + (PurgeProductsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor importProductsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -527,6 +572,10 @@ public class HttpJsonProductServiceStub extends ProductServiceStub { listProductsPagedCallable; private final UnaryCallable updateProductCallable; private final UnaryCallable deleteProductCallable; + private final UnaryCallable purgeProductsCallable; + private final OperationCallable< + PurgeProductsRequest, PurgeProductsResponse, PurgeProductsMetadata> + purgeProductsOperationCallable; private final UnaryCallable importProductsCallable; private final OperationCallable importProductsOperationCallable; @@ -692,6 +741,17 @@ protected HttpJsonProductServiceStub( return builder.build(); }) .build(); + HttpJsonCallSettings purgeProductsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(purgeProductsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); HttpJsonCallSettings importProductsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(importProductsMethodDescriptor) @@ -781,6 +841,15 @@ protected HttpJsonProductServiceStub( this.deleteProductCallable = callableFactory.createUnaryCallable( deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); + this.purgeProductsCallable = + callableFactory.createUnaryCallable( + purgeProductsTransportSettings, settings.purgeProductsSettings(), clientContext); + this.purgeProductsOperationCallable = + callableFactory.createOperationCallable( + purgeProductsTransportSettings, + settings.purgeProductsOperationSettings(), + clientContext, + httpJsonOperationsStub); this.importProductsCallable = callableFactory.createUnaryCallable( importProductsTransportSettings, settings.importProductsSettings(), clientContext); @@ -856,6 +925,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(listProductsMethodDescriptor); methodDescriptors.add(updateProductMethodDescriptor); methodDescriptors.add(deleteProductMethodDescriptor); + methodDescriptors.add(purgeProductsMethodDescriptor); methodDescriptors.add(importProductsMethodDescriptor); methodDescriptors.add(setInventoryMethodDescriptor); methodDescriptors.add(addFulfillmentPlacesMethodDescriptor); @@ -899,6 +969,17 @@ public UnaryCallable deleteProductCallable() { return deleteProductCallable; } + @Override + public UnaryCallable purgeProductsCallable() { + return purgeProductsCallable; + } + + @Override + public OperationCallable + purgeProductsOperationCallable() { + return purgeProductsOperationCallable; + } + @Override public UnaryCallable importProductsCallable() { return importProductsCallable; diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ModelServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ModelServiceStubSettings.java index dc9565ce833d..7bf28aa5a0a0 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ModelServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ModelServiceStubSettings.java @@ -381,7 +381,7 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "retry_policy_2_codes", + "retry_policy_3_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); @@ -403,7 +403,7 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Model.class)) @@ -556,8 +556,8 @@ private static Builder initDefaults(Builder builder) { .tuneModelOperationSettings() .setInitialCallSettings( UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(TuneModelResponse.class)) diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStub.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStub.java index be75e7178177..79b4d94dd8d2 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStub.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStub.java @@ -36,6 +36,9 @@ import com.google.cloud.retail.v2.ListProductsRequest; import com.google.cloud.retail.v2.ListProductsResponse; import com.google.cloud.retail.v2.Product; +import com.google.cloud.retail.v2.PurgeProductsMetadata; +import com.google.cloud.retail.v2.PurgeProductsRequest; +import com.google.cloud.retail.v2.PurgeProductsResponse; import com.google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata; import com.google.cloud.retail.v2.RemoveFulfillmentPlacesRequest; import com.google.cloud.retail.v2.RemoveFulfillmentPlacesResponse; @@ -92,6 +95,15 @@ public UnaryCallable deleteProductCallable() { throw new UnsupportedOperationException("Not implemented: deleteProductCallable()"); } + public OperationCallable + purgeProductsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: purgeProductsOperationCallable()"); + } + + public UnaryCallable purgeProductsCallable() { + throw new UnsupportedOperationException("Not implemented: purgeProductsCallable()"); + } + public OperationCallable importProductsOperationCallable() { throw new UnsupportedOperationException("Not implemented: importProductsOperationCallable()"); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStubSettings.java index 6c06f27d381a..732f8852ff89 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStubSettings.java @@ -62,6 +62,9 @@ import com.google.cloud.retail.v2.ListProductsRequest; import com.google.cloud.retail.v2.ListProductsResponse; import com.google.cloud.retail.v2.Product; +import com.google.cloud.retail.v2.PurgeProductsMetadata; +import com.google.cloud.retail.v2.PurgeProductsRequest; +import com.google.cloud.retail.v2.PurgeProductsResponse; import com.google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata; import com.google.cloud.retail.v2.RemoveFulfillmentPlacesRequest; import com.google.cloud.retail.v2.RemoveFulfillmentPlacesResponse; @@ -133,6 +136,10 @@ public class ProductServiceStubSettings extends StubSettings updateProductSettings; private final UnaryCallSettings deleteProductSettings; + private final UnaryCallSettings purgeProductsSettings; + private final OperationCallSettings< + PurgeProductsRequest, PurgeProductsResponse, PurgeProductsMetadata> + purgeProductsOperationSettings; private final UnaryCallSettings importProductsSettings; private final OperationCallSettings importProductsOperationSettings; @@ -244,6 +251,17 @@ public UnaryCallSettings deleteProductSettings() { return deleteProductSettings; } + /** Returns the object with the settings used for calls to purgeProducts. */ + public UnaryCallSettings purgeProductsSettings() { + return purgeProductsSettings; + } + + /** Returns the object with the settings used for calls to purgeProducts. */ + public OperationCallSettings + purgeProductsOperationSettings() { + return purgeProductsOperationSettings; + } + /** Returns the object with the settings used for calls to importProducts. */ public UnaryCallSettings importProductsSettings() { return importProductsSettings; @@ -435,6 +453,8 @@ protected ProductServiceStubSettings(Builder settingsBuilder) throws IOException listProductsSettings = settingsBuilder.listProductsSettings().build(); updateProductSettings = settingsBuilder.updateProductSettings().build(); deleteProductSettings = settingsBuilder.deleteProductSettings().build(); + purgeProductsSettings = settingsBuilder.purgeProductsSettings().build(); + purgeProductsOperationSettings = settingsBuilder.purgeProductsOperationSettings().build(); importProductsSettings = settingsBuilder.importProductsSettings().build(); importProductsOperationSettings = settingsBuilder.importProductsOperationSettings().build(); setInventorySettings = settingsBuilder.setInventorySettings().build(); @@ -463,6 +483,10 @@ public static class Builder extends StubSettings.Builder updateProductSettings; private final UnaryCallSettings.Builder deleteProductSettings; + private final UnaryCallSettings.Builder purgeProductsSettings; + private final OperationCallSettings.Builder< + PurgeProductsRequest, PurgeProductsResponse, PurgeProductsMetadata> + purgeProductsOperationSettings; private final UnaryCallSettings.Builder importProductsSettings; private final OperationCallSettings.Builder< @@ -503,12 +527,12 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "retry_policy_1_codes", + "retry_policy_2_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); definitions.put( - "retry_policy_3_codes", + "retry_policy_4_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); @@ -530,7 +554,7 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PurgeProductsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(PurgeProductsMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); builder .importProductsOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(ImportProductsResponse.class)) @@ -735,8 +794,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(SetInventoryResponse.class)) @@ -759,8 +818,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( @@ -785,8 +844,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( @@ -811,8 +870,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( @@ -837,8 +896,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( @@ -903,6 +962,18 @@ public UnaryCallSettings.Builder deleteProductSetti return deleteProductSettings; } + /** Returns the builder for the settings used for calls to purgeProducts. */ + public UnaryCallSettings.Builder purgeProductsSettings() { + return purgeProductsSettings; + } + + /** Returns the builder for the settings used for calls to purgeProducts. */ + public OperationCallSettings.Builder< + PurgeProductsRequest, PurgeProductsResponse, PurgeProductsMetadata> + purgeProductsOperationSettings() { + return purgeProductsOperationSettings; + } + /** Returns the builder for the settings used for calls to importProducts. */ public UnaryCallSettings.Builder importProductsSettings() { return importProductsSettings; diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/UserEventServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/UserEventServiceStubSettings.java index 8f97528771ea..b199104e8771 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/UserEventServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/UserEventServiceStubSettings.java @@ -312,17 +312,17 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "retry_policy_0_codes", + "retry_policy_1_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); definitions.put( - "retry_policy_1_codes", + "retry_policy_2_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); definitions.put( - "retry_policy_4_codes", + "retry_policy_5_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); @@ -339,12 +339,12 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(PurgeUserEventsResponse.class)) @@ -496,8 +496,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(ImportUserEventsResponse.class)) @@ -520,8 +520,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(RejoinUserEventsResponse.class)) diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/BranchServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/BranchServiceClient.java new file mode 100644 index 000000000000..b87c9221aecc --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/BranchServiceClient.java @@ -0,0 +1,468 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2alpha.stub.BranchServiceStub; +import com.google.cloud.retail.v2alpha.stub.BranchServiceStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for [Branch][google.cloud.retail.v2alpha.Branch] Management + * + *

[Branch][google.cloud.retail.v2alpha.Branch]es are automatically created when a + * [Catalog][google.cloud.retail.v2alpha.Catalog] is created. There are fixed three branches in each + * catalog, and may use [ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches] + * method to get the details of all branches. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BranchServiceClient branchServiceClient = BranchServiceClient.create()) {
+ *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+ *   ListBranchesResponse response = branchServiceClient.listBranches(parent);
+ * }
+ * }
+ * + *

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

ListBranches

Lists all [Branch][google.cloud.retail.v2alpha.Branch]s under the specified parent [Catalog][google.cloud.retail.v2alpha.Catalog].

+ *

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

+ *
    + *
  • listBranches(ListBranchesRequest request) + *

+ *

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

+ *
    + *
  • listBranches(CatalogName parent) + *

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

+ *
    + *
  • listBranchesCallable() + *

+ *

GetBranch

Retrieves a [Branch][google.cloud.retail.v2alpha.Branch].

+ *

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

+ *
    + *
  • getBranch(GetBranchRequest request) + *

+ *

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

+ *
    + *
  • getBranch(BranchName name) + *

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

+ *
    + *
  • getBranchCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of BranchServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BranchServiceSettings branchServiceSettings =
+ *     BranchServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * BranchServiceClient branchServiceClient = BranchServiceClient.create(branchServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BranchServiceSettings branchServiceSettings =
+ *     BranchServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * BranchServiceClient branchServiceClient = BranchServiceClient.create(branchServiceSettings);
+ * }
+ * + *

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BranchServiceSettings branchServiceSettings =
+ *     BranchServiceSettings.newHttpJsonBuilder().build();
+ * BranchServiceClient branchServiceClient = BranchServiceClient.create(branchServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class BranchServiceClient implements BackgroundResource { + private final BranchServiceSettings settings; + private final BranchServiceStub stub; + + /** Constructs an instance of BranchServiceClient with default settings. */ + public static final BranchServiceClient create() throws IOException { + return create(BranchServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of BranchServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final BranchServiceClient create(BranchServiceSettings settings) + throws IOException { + return new BranchServiceClient(settings); + } + + /** + * Constructs an instance of BranchServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(BranchServiceSettings). + */ + public static final BranchServiceClient create(BranchServiceStub stub) { + return new BranchServiceClient(stub); + } + + /** + * Constructs an instance of BranchServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected BranchServiceClient(BranchServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((BranchServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected BranchServiceClient(BranchServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final BranchServiceSettings getSettings() { + return settings; + } + + public BranchServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [Branch][google.cloud.retail.v2alpha.Branch]s under the specified parent + * [Catalog][google.cloud.retail.v2alpha.Catalog]. + * + *

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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) {
+   *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+   *   ListBranchesResponse response = branchServiceClient.listBranches(parent);
+   * }
+   * }
+ * + * @param parent Required. The parent catalog resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBranchesResponse listBranches(CatalogName parent) { + ListBranchesRequest request = + ListBranchesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBranches(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [Branch][google.cloud.retail.v2alpha.Branch]s under the specified parent + * [Catalog][google.cloud.retail.v2alpha.Catalog]. + * + *

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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) {
+   *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
+   *   ListBranchesResponse response = branchServiceClient.listBranches(parent);
+   * }
+   * }
+ * + * @param parent Required. The parent catalog resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBranchesResponse listBranches(String parent) { + ListBranchesRequest request = ListBranchesRequest.newBuilder().setParent(parent).build(); + return listBranches(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [Branch][google.cloud.retail.v2alpha.Branch]s under the specified parent + * [Catalog][google.cloud.retail.v2alpha.Catalog]. + * + *

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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) {
+   *   ListBranchesRequest request =
+   *       ListBranchesRequest.newBuilder()
+   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+   *           .setView(BranchView.forNumber(0))
+   *           .build();
+   *   ListBranchesResponse response = branchServiceClient.listBranches(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 ListBranchesResponse listBranches(ListBranchesRequest request) { + return listBranchesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [Branch][google.cloud.retail.v2alpha.Branch]s under the specified parent + * [Catalog][google.cloud.retail.v2alpha.Catalog]. + * + *

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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) {
+   *   ListBranchesRequest request =
+   *       ListBranchesRequest.newBuilder()
+   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+   *           .setView(BranchView.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       branchServiceClient.listBranchesCallable().futureCall(request);
+   *   // Do something.
+   *   ListBranchesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable listBranchesCallable() { + return stub.listBranchesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a [Branch][google.cloud.retail.v2alpha.Branch]. + * + *

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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) {
+   *   BranchName name = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
+   *   Branch response = branchServiceClient.getBranch(name);
+   * }
+   * }
+ * + * @param name Required. The name of the branch to retrieve. Format: + * `projects/*/locations/global/catalogs/default_catalog/branches/some_branch_id`. + *

"default_branch" can be used as a special branch_id, it returns the default branch that + * has been set for the catalog. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Branch getBranch(BranchName name) { + GetBranchRequest request = + GetBranchRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getBranch(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a [Branch][google.cloud.retail.v2alpha.Branch]. + * + *

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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) {
+   *   String name = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString();
+   *   Branch response = branchServiceClient.getBranch(name);
+   * }
+   * }
+ * + * @param name Required. The name of the branch to retrieve. Format: + * `projects/*/locations/global/catalogs/default_catalog/branches/some_branch_id`. + *

"default_branch" can be used as a special branch_id, it returns the default branch that + * has been set for the catalog. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Branch getBranch(String name) { + GetBranchRequest request = GetBranchRequest.newBuilder().setName(name).build(); + return getBranch(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a [Branch][google.cloud.retail.v2alpha.Branch]. + * + *

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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) {
+   *   GetBranchRequest request =
+   *       GetBranchRequest.newBuilder()
+   *           .setName(BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString())
+   *           .setView(BranchView.forNumber(0))
+   *           .build();
+   *   Branch response = branchServiceClient.getBranch(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 Branch getBranch(GetBranchRequest request) { + return getBranchCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a [Branch][google.cloud.retail.v2alpha.Branch]. + * + *

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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) {
+   *   GetBranchRequest request =
+   *       GetBranchRequest.newBuilder()
+   *           .setName(BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString())
+   *           .setView(BranchView.forNumber(0))
+   *           .build();
+   *   ApiFuture future = branchServiceClient.getBranchCallable().futureCall(request);
+   *   // Do something.
+   *   Branch response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getBranchCallable() { + return stub.getBranchCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/BranchServiceSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/BranchServiceSettings.java new file mode 100644 index 000000000000..c316556941d6 --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/BranchServiceSettings.java @@ -0,0 +1,213 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.retail.v2alpha.stub.BranchServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link BranchServiceClient}. + * + *

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

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

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of listBranches to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BranchServiceSettings.Builder branchServiceSettingsBuilder = BranchServiceSettings.newBuilder();
+ * branchServiceSettingsBuilder
+ *     .listBranchesSettings()
+ *     .setRetrySettings(
+ *         branchServiceSettingsBuilder
+ *             .listBranchesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * BranchServiceSettings branchServiceSettings = branchServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class BranchServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listBranches. */ + public UnaryCallSettings listBranchesSettings() { + return ((BranchServiceStubSettings) getStubSettings()).listBranchesSettings(); + } + + /** Returns the object with the settings used for calls to getBranch. */ + public UnaryCallSettings getBranchSettings() { + return ((BranchServiceStubSettings) getStubSettings()).getBranchSettings(); + } + + public static final BranchServiceSettings create(BranchServiceStubSettings stub) + throws IOException { + return new BranchServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return BranchServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return BranchServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return BranchServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return BranchServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return BranchServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return BranchServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return BranchServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return BranchServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected BranchServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for BranchServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(BranchServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(BranchServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(BranchServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(BranchServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(BranchServiceStubSettings.newHttpJsonBuilder()); + } + + public BranchServiceStubSettings.Builder getStubSettingsBuilder() { + return ((BranchServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listBranches. */ + public UnaryCallSettings.Builder + listBranchesSettings() { + return getStubSettingsBuilder().listBranchesSettings(); + } + + /** Returns the builder for the settings used for calls to getBranch. */ + public UnaryCallSettings.Builder getBranchSettings() { + return getStubSettingsBuilder().getBranchSettings(); + } + + @Override + public BranchServiceSettings build() throws IOException { + return new BranchServiceSettings(this); + } + } +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClient.java index 02d494bb2309..b6d5e1d83aed 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClient.java @@ -281,7 +281,7 @@ public final OperationsClient getHttpJsonOperationsClient() { * } * * @param parent Required. The parent Catalog of the resource. It must match this format: - * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID} + * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListMerchantCenterAccountLinksResponse listMerchantCenterAccountLinks( @@ -315,7 +315,7 @@ public final ListMerchantCenterAccountLinksResponse listMerchantCenterAccountLin * } * * @param parent Required. The parent Catalog of the resource. It must match this format: - * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID} + * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListMerchantCenterAccountLinksResponse listMerchantCenterAccountLinks( @@ -416,7 +416,7 @@ public final ListMerchantCenterAccountLinksResponse listMerchantCenterAccountLin * } * * @param parent Required. The branch resource where this MerchantCenterAccountLink will be - * created. Format: projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}} + * created. Format: `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}` * @param merchantCenterAccountLink Required. The * [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink] to * create. @@ -461,7 +461,7 @@ public final ListMerchantCenterAccountLinksResponse listMerchantCenterAccountLin * } * * @param parent Required. The branch resource where this MerchantCenterAccountLink will be - * created. Format: projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}} + * created. Format: `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}` * @param merchantCenterAccountLink Required. The * [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink] to * create. @@ -608,7 +608,7 @@ public final ListMerchantCenterAccountLinksResponse listMerchantCenterAccountLin * } * * @param name Required. Full resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteMerchantCenterAccountLink(MerchantCenterAccountLinkName name) { @@ -644,7 +644,7 @@ public final void deleteMerchantCenterAccountLink(MerchantCenterAccountLinkName * } * * @param name Required. Full resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteMerchantCenterAccountLink(String name) { diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java index 6447d8439cb7..21b0bb84d962 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java @@ -228,7 +228,7 @@ * * *

AddFulfillmentPlaces - *

It is recommended to use the [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] method instead of [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]. [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. + *

We recommend that you use the [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] method instead of the [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces] method. [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. *

Incrementally adds place IDs to [Product.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]. *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2alpha.Product] to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. @@ -252,7 +252,7 @@ * * *

RemoveFulfillmentPlaces - *

It is recommended to use the [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] method instead of [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. + *

We recommend that you use the [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] method instead of the [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces] method. [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. *

Incrementally removes place IDs from a [Product.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]. *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2alpha.Product] to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. @@ -1765,10 +1765,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] - * method instead of - * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]. + * method instead of the + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces] + * method. * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -1827,10 +1828,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] - * method instead of - * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]. + * method instead of the + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces] + * method. * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -1888,10 +1890,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] - * method instead of - * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]. + * method instead of the + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces] + * method. * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -1949,10 +1952,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] - * method instead of - * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]. + * method instead of the + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces] + * method. * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -2010,10 +2014,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] - * method instead of - * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]. + * method instead of the + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces] + * method. * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -2070,10 +2075,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] - * method instead of - * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. + * method instead of the + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces] + * method. * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -2132,10 +2138,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] - * method instead of - * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. + * method instead of the + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces] + * method. * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -2193,10 +2200,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] - * method instead of - * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. + * method instead of the + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces] + * method. * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -2254,10 +2262,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] - * method instead of - * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. + * method instead of the + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces] + * method. * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -2317,10 +2326,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] - * method instead of - * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. + * method instead of the + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces] + * method. * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProjectServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProjectServiceClient.java new file mode 100644 index 000000000000..597f1925c192 --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProjectServiceClient.java @@ -0,0 +1,1254 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2alpha.stub.ProjectServiceStub; +import com.google.cloud.retail.v2alpha.stub.ProjectServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for settings at Project level. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+ *   RetailProjectName name = RetailProjectName.of("[PROJECT]");
+ *   Project response = projectServiceClient.getProject(name);
+ * }
+ * }
+ * + *

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

GetProject

Gets the project. + *

Throws `NOT_FOUND` if the project wasn't initialized for the Retail API service.

+ *

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

+ *
    + *
  • getProject(GetProjectRequest request) + *

+ *

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

+ *
    + *
  • getProject(RetailProjectName name) + *

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

+ *
    + *
  • getProjectCallable() + *

+ *

AcceptTerms

Accepts service terms for this project. By making requests to this API, you agree to the terms of service linked below. https://cloud.google.com/retail/data-use-terms

+ *

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

+ *
    + *
  • acceptTerms(AcceptTermsRequest request) + *

+ *

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

+ *
    + *
  • acceptTerms(RetailProjectName project) + *

  • acceptTerms(String project) + *

+ *

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

+ *
    + *
  • acceptTermsCallable() + *

+ *

EnrollSolution

The method enrolls a solution of type [Retail Search][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_SEARCH] into a project. + *

The [Recommendations AI solution type][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION] is enrolled by default when your project enables Retail API, so you don't need to call the enrollSolution method for recommendations.

+ *

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

+ *
    + *
  • enrollSolutionAsync(EnrollSolutionRequest request) + *

+ *

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

+ *
    + *
  • enrollSolutionOperationCallable() + *

  • enrollSolutionCallable() + *

+ *

ListEnrolledSolutions

Lists all the retail API solutions the project has enrolled.

+ *

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

+ *
    + *
  • listEnrolledSolutions(ListEnrolledSolutionsRequest request) + *

+ *

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

+ *
    + *
  • listEnrolledSolutions(ProjectName parent) + *

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

+ *
    + *
  • listEnrolledSolutionsCallable() + *

+ *

GetLoggingConfig

Gets the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of the requested project.

+ *

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

+ *
    + *
  • getLoggingConfig(GetLoggingConfigRequest request) + *

+ *

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

+ *
    + *
  • getLoggingConfig(LoggingConfigName name) + *

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

+ *
    + *
  • getLoggingConfigCallable() + *

+ *

UpdateLoggingConfig

Updates the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of the requested project.

+ *

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

+ *
    + *
  • updateLoggingConfig(UpdateLoggingConfigRequest request) + *

+ *

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

+ *
    + *
  • updateLoggingConfig(LoggingConfig loggingConfig, 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.

+ *
    + *
  • updateLoggingConfigCallable() + *

+ *

GetAlertConfig

Get the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] of the requested project.

+ *

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

+ *
    + *
  • getAlertConfig(GetAlertConfigRequest request) + *

+ *

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

+ *
    + *
  • getAlertConfig(AlertConfigName name) + *

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

+ *
    + *
  • getAlertConfigCallable() + *

+ *

UpdateAlertConfig

Update the alert config of the requested project.

+ *

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

+ *
    + *
  • updateAlertConfig(UpdateAlertConfigRequest request) + *

+ *

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

+ *
    + *
  • updateAlertConfig(AlertConfig alertConfig, 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.

+ *
    + *
  • updateAlertConfigCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of ProjectServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProjectServiceSettings projectServiceSettings =
+ *     ProjectServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ProjectServiceClient projectServiceClient = ProjectServiceClient.create(projectServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProjectServiceSettings projectServiceSettings =
+ *     ProjectServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ProjectServiceClient projectServiceClient = ProjectServiceClient.create(projectServiceSettings);
+ * }
+ * + *

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProjectServiceSettings projectServiceSettings =
+ *     ProjectServiceSettings.newHttpJsonBuilder().build();
+ * ProjectServiceClient projectServiceClient = ProjectServiceClient.create(projectServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ProjectServiceClient implements BackgroundResource { + private final ProjectServiceSettings settings; + private final ProjectServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of ProjectServiceClient with default settings. */ + public static final ProjectServiceClient create() throws IOException { + return create(ProjectServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ProjectServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ProjectServiceClient create(ProjectServiceSettings settings) + throws IOException { + return new ProjectServiceClient(settings); + } + + /** + * Constructs an instance of ProjectServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ProjectServiceSettings). + */ + public static final ProjectServiceClient create(ProjectServiceStub stub) { + return new ProjectServiceClient(stub); + } + + /** + * Constructs an instance of ProjectServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected ProjectServiceClient(ProjectServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ProjectServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected ProjectServiceClient(ProjectServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final ProjectServiceSettings getSettings() { + return settings; + } + + public ProjectServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the project. + * + *

Throws `NOT_FOUND` if the project wasn't initialized for the Retail API service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   RetailProjectName name = RetailProjectName.of("[PROJECT]");
+   *   Project response = projectServiceClient.getProject(name);
+   * }
+   * }
+ * + * @param name Required. Full resource name of the project. Format: + * `projects/{project_number_or_id}/retailProject` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Project getProject(RetailProjectName name) { + GetProjectRequest request = + GetProjectRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getProject(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the project. + * + *

Throws `NOT_FOUND` if the project wasn't initialized for the Retail API service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   String name = RetailProjectName.of("[PROJECT]").toString();
+   *   Project response = projectServiceClient.getProject(name);
+   * }
+   * }
+ * + * @param name Required. Full resource name of the project. Format: + * `projects/{project_number_or_id}/retailProject` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Project getProject(String name) { + GetProjectRequest request = GetProjectRequest.newBuilder().setName(name).build(); + return getProject(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the project. + * + *

Throws `NOT_FOUND` if the project wasn't initialized for the Retail API service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   GetProjectRequest request =
+   *       GetProjectRequest.newBuilder()
+   *           .setName(RetailProjectName.of("[PROJECT]").toString())
+   *           .build();
+   *   Project response = projectServiceClient.getProject(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 Project getProject(GetProjectRequest request) { + return getProjectCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the project. + * + *

Throws `NOT_FOUND` if the project wasn't initialized for the Retail API service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   GetProjectRequest request =
+   *       GetProjectRequest.newBuilder()
+   *           .setName(RetailProjectName.of("[PROJECT]").toString())
+   *           .build();
+   *   ApiFuture future = projectServiceClient.getProjectCallable().futureCall(request);
+   *   // Do something.
+   *   Project response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getProjectCallable() { + return stub.getProjectCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts service terms for this project. By making requests to this API, you agree to the terms + * of service linked below. https://cloud.google.com/retail/data-use-terms + * + *

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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   RetailProjectName project = RetailProjectName.of("[PROJECT]");
+   *   Project response = projectServiceClient.acceptTerms(project);
+   * }
+   * }
+ * + * @param project Required. Full resource name of the project. Format: + * `projects/{project_number_or_id}/retailProject` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Project acceptTerms(RetailProjectName project) { + AcceptTermsRequest request = + AcceptTermsRequest.newBuilder() + .setProject(project == null ? null : project.toString()) + .build(); + return acceptTerms(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts service terms for this project. By making requests to this API, you agree to the terms + * of service linked below. https://cloud.google.com/retail/data-use-terms + * + *

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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   String project = RetailProjectName.of("[PROJECT]").toString();
+   *   Project response = projectServiceClient.acceptTerms(project);
+   * }
+   * }
+ * + * @param project Required. Full resource name of the project. Format: + * `projects/{project_number_or_id}/retailProject` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Project acceptTerms(String project) { + AcceptTermsRequest request = AcceptTermsRequest.newBuilder().setProject(project).build(); + return acceptTerms(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts service terms for this project. By making requests to this API, you agree to the terms + * of service linked below. https://cloud.google.com/retail/data-use-terms + * + *

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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   AcceptTermsRequest request =
+   *       AcceptTermsRequest.newBuilder()
+   *           .setProject(RetailProjectName.of("[PROJECT]").toString())
+   *           .build();
+   *   Project response = projectServiceClient.acceptTerms(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 Project acceptTerms(AcceptTermsRequest request) { + return acceptTermsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts service terms for this project. By making requests to this API, you agree to the terms + * of service linked below. https://cloud.google.com/retail/data-use-terms + * + *

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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   AcceptTermsRequest request =
+   *       AcceptTermsRequest.newBuilder()
+   *           .setProject(RetailProjectName.of("[PROJECT]").toString())
+   *           .build();
+   *   ApiFuture future = projectServiceClient.acceptTermsCallable().futureCall(request);
+   *   // Do something.
+   *   Project response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable acceptTermsCallable() { + return stub.acceptTermsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * The method enrolls a solution of type [Retail + * Search][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_SEARCH] into a project. + * + *

The [Recommendations AI solution + * type][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION] is enrolled by + * default when your project enables Retail API, so you don't need to call the enrollSolution + * method for recommendations. + * + *

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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   EnrollSolutionRequest request =
+   *       EnrollSolutionRequest.newBuilder()
+   *           .setProject(ProjectName.of("[PROJECT]").toString())
+   *           .setSolution(SolutionType.forNumber(0))
+   *           .build();
+   *   EnrollSolutionResponse response = projectServiceClient.enrollSolutionAsync(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 enrollSolutionAsync( + EnrollSolutionRequest request) { + return enrollSolutionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * The method enrolls a solution of type [Retail + * Search][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_SEARCH] into a project. + * + *

The [Recommendations AI solution + * type][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION] is enrolled by + * default when your project enables Retail API, so you don't need to call the enrollSolution + * method for recommendations. + * + *

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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   EnrollSolutionRequest request =
+   *       EnrollSolutionRequest.newBuilder()
+   *           .setProject(ProjectName.of("[PROJECT]").toString())
+   *           .setSolution(SolutionType.forNumber(0))
+   *           .build();
+   *   OperationFuture future =
+   *       projectServiceClient.enrollSolutionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   EnrollSolutionResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + EnrollSolutionRequest, EnrollSolutionResponse, EnrollSolutionMetadata> + enrollSolutionOperationCallable() { + return stub.enrollSolutionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * The method enrolls a solution of type [Retail + * Search][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_SEARCH] into a project. + * + *

The [Recommendations AI solution + * type][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION] is enrolled by + * default when your project enables Retail API, so you don't need to call the enrollSolution + * method for recommendations. + * + *

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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   EnrollSolutionRequest request =
+   *       EnrollSolutionRequest.newBuilder()
+   *           .setProject(ProjectName.of("[PROJECT]").toString())
+   *           .setSolution(SolutionType.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       projectServiceClient.enrollSolutionCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable enrollSolutionCallable() { + return stub.enrollSolutionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the retail API solutions the project has enrolled. + * + *

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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   ListEnrolledSolutionsResponse response = projectServiceClient.listEnrolledSolutions(parent);
+   * }
+   * }
+ * + * @param parent Required. Full resource name of parent. Format: `projects/{project_number_or_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEnrolledSolutionsResponse listEnrolledSolutions(ProjectName parent) { + ListEnrolledSolutionsRequest request = + ListEnrolledSolutionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listEnrolledSolutions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the retail API solutions the project has enrolled. + * + *

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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   ListEnrolledSolutionsResponse response = projectServiceClient.listEnrolledSolutions(parent);
+   * }
+   * }
+ * + * @param parent Required. Full resource name of parent. Format: `projects/{project_number_or_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEnrolledSolutionsResponse listEnrolledSolutions(String parent) { + ListEnrolledSolutionsRequest request = + ListEnrolledSolutionsRequest.newBuilder().setParent(parent).build(); + return listEnrolledSolutions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the retail API solutions the project has enrolled. + * + *

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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   ListEnrolledSolutionsRequest request =
+   *       ListEnrolledSolutionsRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .build();
+   *   ListEnrolledSolutionsResponse response = projectServiceClient.listEnrolledSolutions(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 ListEnrolledSolutionsResponse listEnrolledSolutions( + ListEnrolledSolutionsRequest request) { + return listEnrolledSolutionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the retail API solutions the project has enrolled. + * + *

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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   ListEnrolledSolutionsRequest request =
+   *       ListEnrolledSolutionsRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       projectServiceClient.listEnrolledSolutionsCallable().futureCall(request);
+   *   // Do something.
+   *   ListEnrolledSolutionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + listEnrolledSolutionsCallable() { + return stub.listEnrolledSolutionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of the requested project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   LoggingConfigName name = LoggingConfigName.of("[PROJECT]");
+   *   LoggingConfig response = projectServiceClient.getLoggingConfig(name);
+   * }
+   * }
+ * + * @param name Required. Full LoggingConfig resource name. Format: + * projects/{project_number}/loggingConfig + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LoggingConfig getLoggingConfig(LoggingConfigName name) { + GetLoggingConfigRequest request = + GetLoggingConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getLoggingConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of the requested project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   String name = LoggingConfigName.of("[PROJECT]").toString();
+   *   LoggingConfig response = projectServiceClient.getLoggingConfig(name);
+   * }
+   * }
+ * + * @param name Required. Full LoggingConfig resource name. Format: + * projects/{project_number}/loggingConfig + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LoggingConfig getLoggingConfig(String name) { + GetLoggingConfigRequest request = GetLoggingConfigRequest.newBuilder().setName(name).build(); + return getLoggingConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of the requested project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   GetLoggingConfigRequest request =
+   *       GetLoggingConfigRequest.newBuilder()
+   *           .setName(LoggingConfigName.of("[PROJECT]").toString())
+   *           .build();
+   *   LoggingConfig response = projectServiceClient.getLoggingConfig(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 LoggingConfig getLoggingConfig(GetLoggingConfigRequest request) { + return getLoggingConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of the requested project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   GetLoggingConfigRequest request =
+   *       GetLoggingConfigRequest.newBuilder()
+   *           .setName(LoggingConfigName.of("[PROJECT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       projectServiceClient.getLoggingConfigCallable().futureCall(request);
+   *   // Do something.
+   *   LoggingConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLoggingConfigCallable() { + return stub.getLoggingConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of the requested + * project. + * + *

Sample code: + * + *

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

If the caller does not have permission to update the + * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a PERMISSION_DENIED error + * is returned. + *

If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update does not + * exist, a NOT_FOUND error is returned. + * @param updateMask Indicates which fields in the provided + * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The following are the + * only supported fields: + *

    + *
  • [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule] + *
  • [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules] + *
+ *

If not set, all supported fields are updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LoggingConfig updateLoggingConfig( + LoggingConfig loggingConfig, FieldMask updateMask) { + UpdateLoggingConfigRequest request = + UpdateLoggingConfigRequest.newBuilder() + .setLoggingConfig(loggingConfig) + .setUpdateMask(updateMask) + .build(); + return updateLoggingConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of the requested + * project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   UpdateLoggingConfigRequest request =
+   *       UpdateLoggingConfigRequest.newBuilder()
+   *           .setLoggingConfig(LoggingConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   LoggingConfig response = projectServiceClient.updateLoggingConfig(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 LoggingConfig updateLoggingConfig(UpdateLoggingConfigRequest request) { + return updateLoggingConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of the requested + * project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   UpdateLoggingConfigRequest request =
+   *       UpdateLoggingConfigRequest.newBuilder()
+   *           .setLoggingConfig(LoggingConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       projectServiceClient.updateLoggingConfigCallable().futureCall(request);
+   *   // Do something.
+   *   LoggingConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateLoggingConfigCallable() { + return stub.updateLoggingConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] of the requested project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   AlertConfigName name = AlertConfigName.of("[PROJECT]");
+   *   AlertConfig response = projectServiceClient.getAlertConfig(name);
+   * }
+   * }
+ * + * @param name Required. Full AlertConfig resource name. Format: + * projects/{project_number}/alertConfig + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AlertConfig getAlertConfig(AlertConfigName name) { + GetAlertConfigRequest request = + GetAlertConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAlertConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] of the requested project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   String name = AlertConfigName.of("[PROJECT]").toString();
+   *   AlertConfig response = projectServiceClient.getAlertConfig(name);
+   * }
+   * }
+ * + * @param name Required. Full AlertConfig resource name. Format: + * projects/{project_number}/alertConfig + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AlertConfig getAlertConfig(String name) { + GetAlertConfigRequest request = GetAlertConfigRequest.newBuilder().setName(name).build(); + return getAlertConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] of the requested project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   GetAlertConfigRequest request =
+   *       GetAlertConfigRequest.newBuilder()
+   *           .setName(AlertConfigName.of("[PROJECT]").toString())
+   *           .build();
+   *   AlertConfig response = projectServiceClient.getAlertConfig(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 AlertConfig getAlertConfig(GetAlertConfigRequest request) { + return getAlertConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] of the requested project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   GetAlertConfigRequest request =
+   *       GetAlertConfigRequest.newBuilder()
+   *           .setName(AlertConfigName.of("[PROJECT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       projectServiceClient.getAlertConfigCallable().futureCall(request);
+   *   // Do something.
+   *   AlertConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAlertConfigCallable() { + return stub.getAlertConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the alert config of the requested project. + * + *

Sample code: + * + *

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

If the caller does not have permission to update the + * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a PERMISSION_DENIED error is + * returned. + *

If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update does not exist, + * a NOT_FOUND error is returned. + * @param updateMask Indicates which fields in the provided + * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not set, all supported + * fields are updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AlertConfig updateAlertConfig(AlertConfig alertConfig, FieldMask updateMask) { + UpdateAlertConfigRequest request = + UpdateAlertConfigRequest.newBuilder() + .setAlertConfig(alertConfig) + .setUpdateMask(updateMask) + .build(); + return updateAlertConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the alert config of the requested project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   UpdateAlertConfigRequest request =
+   *       UpdateAlertConfigRequest.newBuilder()
+   *           .setAlertConfig(AlertConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   AlertConfig response = projectServiceClient.updateAlertConfig(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 AlertConfig updateAlertConfig(UpdateAlertConfigRequest request) { + return updateAlertConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the alert config of the requested project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+   *   UpdateAlertConfigRequest request =
+   *       UpdateAlertConfigRequest.newBuilder()
+   *           .setAlertConfig(AlertConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       projectServiceClient.updateAlertConfigCallable().futureCall(request);
+   *   // Do something.
+   *   AlertConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateAlertConfigCallable() { + return stub.updateAlertConfigCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProjectServiceSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProjectServiceSettings.java new file mode 100644 index 000000000000..471ae85bacc9 --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProjectServiceSettings.java @@ -0,0 +1,295 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.retail.v2alpha.stub.ProjectServiceStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ProjectServiceClient}. + * + *

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

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

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getProject to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProjectServiceSettings.Builder projectServiceSettingsBuilder =
+ *     ProjectServiceSettings.newBuilder();
+ * projectServiceSettingsBuilder
+ *     .getProjectSettings()
+ *     .setRetrySettings(
+ *         projectServiceSettingsBuilder
+ *             .getProjectSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ProjectServiceSettings projectServiceSettings = projectServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ProjectServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to getProject. */ + public UnaryCallSettings getProjectSettings() { + return ((ProjectServiceStubSettings) getStubSettings()).getProjectSettings(); + } + + /** Returns the object with the settings used for calls to acceptTerms. */ + public UnaryCallSettings acceptTermsSettings() { + return ((ProjectServiceStubSettings) getStubSettings()).acceptTermsSettings(); + } + + /** Returns the object with the settings used for calls to enrollSolution. */ + public UnaryCallSettings enrollSolutionSettings() { + return ((ProjectServiceStubSettings) getStubSettings()).enrollSolutionSettings(); + } + + /** Returns the object with the settings used for calls to enrollSolution. */ + public OperationCallSettings< + EnrollSolutionRequest, EnrollSolutionResponse, EnrollSolutionMetadata> + enrollSolutionOperationSettings() { + return ((ProjectServiceStubSettings) getStubSettings()).enrollSolutionOperationSettings(); + } + + /** Returns the object with the settings used for calls to listEnrolledSolutions. */ + public UnaryCallSettings + listEnrolledSolutionsSettings() { + return ((ProjectServiceStubSettings) getStubSettings()).listEnrolledSolutionsSettings(); + } + + /** Returns the object with the settings used for calls to getLoggingConfig. */ + public UnaryCallSettings getLoggingConfigSettings() { + return ((ProjectServiceStubSettings) getStubSettings()).getLoggingConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateLoggingConfig. */ + public UnaryCallSettings + updateLoggingConfigSettings() { + return ((ProjectServiceStubSettings) getStubSettings()).updateLoggingConfigSettings(); + } + + /** Returns the object with the settings used for calls to getAlertConfig. */ + public UnaryCallSettings getAlertConfigSettings() { + return ((ProjectServiceStubSettings) getStubSettings()).getAlertConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateAlertConfig. */ + public UnaryCallSettings updateAlertConfigSettings() { + return ((ProjectServiceStubSettings) getStubSettings()).updateAlertConfigSettings(); + } + + public static final ProjectServiceSettings create(ProjectServiceStubSettings stub) + throws IOException { + return new ProjectServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ProjectServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ProjectServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ProjectServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ProjectServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ProjectServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ProjectServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ProjectServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ProjectServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ProjectServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ProjectServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ProjectServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(ProjectServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ProjectServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ProjectServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(ProjectServiceStubSettings.newHttpJsonBuilder()); + } + + public ProjectServiceStubSettings.Builder getStubSettingsBuilder() { + return ((ProjectServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getProject. */ + public UnaryCallSettings.Builder getProjectSettings() { + return getStubSettingsBuilder().getProjectSettings(); + } + + /** Returns the builder for the settings used for calls to acceptTerms. */ + public UnaryCallSettings.Builder acceptTermsSettings() { + return getStubSettingsBuilder().acceptTermsSettings(); + } + + /** Returns the builder for the settings used for calls to enrollSolution. */ + public UnaryCallSettings.Builder enrollSolutionSettings() { + return getStubSettingsBuilder().enrollSolutionSettings(); + } + + /** Returns the builder for the settings used for calls to enrollSolution. */ + public OperationCallSettings.Builder< + EnrollSolutionRequest, EnrollSolutionResponse, EnrollSolutionMetadata> + enrollSolutionOperationSettings() { + return getStubSettingsBuilder().enrollSolutionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listEnrolledSolutions. */ + public UnaryCallSettings.Builder + listEnrolledSolutionsSettings() { + return getStubSettingsBuilder().listEnrolledSolutionsSettings(); + } + + /** Returns the builder for the settings used for calls to getLoggingConfig. */ + public UnaryCallSettings.Builder + getLoggingConfigSettings() { + return getStubSettingsBuilder().getLoggingConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateLoggingConfig. */ + public UnaryCallSettings.Builder + updateLoggingConfigSettings() { + return getStubSettingsBuilder().updateLoggingConfigSettings(); + } + + /** Returns the builder for the settings used for calls to getAlertConfig. */ + public UnaryCallSettings.Builder getAlertConfigSettings() { + return getStubSettingsBuilder().getAlertConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateAlertConfig. */ + public UnaryCallSettings.Builder + updateAlertConfigSettings() { + return getStubSettingsBuilder().updateAlertConfigSettings(); + } + + @Override + public ProjectServiceSettings build() throws IOException { + return new ProjectServiceSettings(this); + } + } +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/gapic_metadata.json b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/gapic_metadata.json index 3c65a87ce132..d1521064d72f 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/gapic_metadata.json +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/gapic_metadata.json @@ -17,6 +17,21 @@ } } }, + "BranchService": { + "clients": { + "grpc": { + "libraryClient": "BranchServiceClient", + "rpcs": { + "GetBranch": { + "methods": ["getBranch", "getBranch", "getBranch", "getBranchCallable"] + }, + "ListBranches": { + "methods": ["listBranches", "listBranches", "listBranches", "listBranchesCallable"] + } + } + } + } + }, "CatalogService": { "clients": { "grpc": { @@ -209,6 +224,39 @@ } } }, + "ProjectService": { + "clients": { + "grpc": { + "libraryClient": "ProjectServiceClient", + "rpcs": { + "AcceptTerms": { + "methods": ["acceptTerms", "acceptTerms", "acceptTerms", "acceptTermsCallable"] + }, + "EnrollSolution": { + "methods": ["enrollSolutionAsync", "enrollSolutionOperationCallable", "enrollSolutionCallable"] + }, + "GetAlertConfig": { + "methods": ["getAlertConfig", "getAlertConfig", "getAlertConfig", "getAlertConfigCallable"] + }, + "GetLoggingConfig": { + "methods": ["getLoggingConfig", "getLoggingConfig", "getLoggingConfig", "getLoggingConfigCallable"] + }, + "GetProject": { + "methods": ["getProject", "getProject", "getProject", "getProjectCallable"] + }, + "ListEnrolledSolutions": { + "methods": ["listEnrolledSolutions", "listEnrolledSolutions", "listEnrolledSolutions", "listEnrolledSolutionsCallable"] + }, + "UpdateAlertConfig": { + "methods": ["updateAlertConfig", "updateAlertConfig", "updateAlertConfigCallable"] + }, + "UpdateLoggingConfig": { + "methods": ["updateLoggingConfig", "updateLoggingConfig", "updateLoggingConfigCallable"] + } + } + } + } + }, "SearchService": { "clients": { "grpc": { diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/package-info.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/package-info.java index 3ea1e15e619e..60949825d664 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/package-info.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/package-info.java @@ -15,7 +15,7 @@ */ /** - * A client to Retail API + * A client to Vertex AI Search for Retail API * *

The interfaces provided are listed below, along with usage samples. * @@ -44,6 +44,29 @@ * } * } * + *

======================= BranchServiceClient ======================= + * + *

Service Description: Service for [Branch][google.cloud.retail.v2alpha.Branch] Management + * + *

[Branch][google.cloud.retail.v2alpha.Branch]es are automatically created when a + * [Catalog][google.cloud.retail.v2alpha.Catalog] is created. There are fixed three branches in each + * catalog, and may use [ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches] + * method to get the details of all branches. + * + *

Sample for BranchServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BranchServiceClient branchServiceClient = BranchServiceClient.create()) {
+ *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+ *   ListBranchesResponse response = branchServiceClient.listBranches(parent);
+ * }
+ * }
+ * *

======================= CatalogServiceClient ======================= * *

Service Description: Service for managing catalog configuration. @@ -215,6 +238,24 @@ * } * } * + *

======================= ProjectServiceClient ======================= + * + *

Service Description: Service for settings at Project level. + * + *

Sample for ProjectServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) {
+ *   RetailProjectName name = RetailProjectName.of("[PROJECT]");
+ *   Project response = projectServiceClient.getProject(name);
+ * }
+ * }
+ * *

======================= SearchServiceClient ======================= * *

Service Description: Service for search. diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/AnalyticsServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/AnalyticsServiceStubSettings.java index e3e10d9b621b..08589b9c7c89 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/AnalyticsServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/AnalyticsServiceStubSettings.java @@ -244,7 +244,7 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "retry_policy_2_codes", + "retry_policy_4_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); @@ -266,7 +266,7 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/BranchServiceStub.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/BranchServiceStub.java new file mode 100644 index 000000000000..7ce6447d9e78 --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/BranchServiceStub.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2alpha.Branch; +import com.google.cloud.retail.v2alpha.GetBranchRequest; +import com.google.cloud.retail.v2alpha.ListBranchesRequest; +import com.google.cloud.retail.v2alpha.ListBranchesResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the BranchService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class BranchServiceStub implements BackgroundResource { + + public UnaryCallable listBranchesCallable() { + throw new UnsupportedOperationException("Not implemented: listBranchesCallable()"); + } + + public UnaryCallable getBranchCallable() { + throw new UnsupportedOperationException("Not implemented: getBranchCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/BranchServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/BranchServiceStubSettings.java new file mode 100644 index 000000000000..66d308ae78f5 --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/BranchServiceStubSettings.java @@ -0,0 +1,356 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.retail.v2alpha.Branch; +import com.google.cloud.retail.v2alpha.GetBranchRequest; +import com.google.cloud.retail.v2alpha.ListBranchesRequest; +import com.google.cloud.retail.v2alpha.ListBranchesResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link BranchServiceStub}. + * + *

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

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

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of listBranches to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BranchServiceStubSettings.Builder branchServiceSettingsBuilder =
+ *     BranchServiceStubSettings.newBuilder();
+ * branchServiceSettingsBuilder
+ *     .listBranchesSettings()
+ *     .setRetrySettings(
+ *         branchServiceSettingsBuilder
+ *             .listBranchesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * BranchServiceStubSettings branchServiceSettings = branchServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class BranchServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings listBranchesSettings; + private final UnaryCallSettings getBranchSettings; + + /** Returns the object with the settings used for calls to listBranches. */ + public UnaryCallSettings listBranchesSettings() { + return listBranchesSettings; + } + + /** Returns the object with the settings used for calls to getBranch. */ + public UnaryCallSettings getBranchSettings() { + return getBranchSettings; + } + + public BranchServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcBranchServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonBranchServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "retail.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "retail.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(BranchServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(BranchServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return BranchServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected BranchServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listBranchesSettings = settingsBuilder.listBranchesSettings().build(); + getBranchSettings = settingsBuilder.getBranchSettings().build(); + } + + /** Builder for BranchServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + listBranchesSettings; + private final UnaryCallSettings.Builder getBranchSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_3_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(30000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_3_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listBranchesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getBranchSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listBranchesSettings, getBranchSettings); + initDefaults(this); + } + + protected Builder(BranchServiceStubSettings settings) { + super(settings); + + listBranchesSettings = settings.listBranchesSettings.toBuilder(); + getBranchSettings = settings.getBranchSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listBranchesSettings, getBranchSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listBranchesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + builder + .getBranchSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listBranches. */ + public UnaryCallSettings.Builder + listBranchesSettings() { + return listBranchesSettings; + } + + /** Returns the builder for the settings used for calls to getBranch. */ + public UnaryCallSettings.Builder getBranchSettings() { + return getBranchSettings; + } + + @Override + public BranchServiceStubSettings build() throws IOException { + return new BranchServiceStubSettings(this); + } + } +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcBranchServiceCallableFactory.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcBranchServiceCallableFactory.java new file mode 100644 index 000000000000..9904f3fc0df0 --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcBranchServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the BranchService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcBranchServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcBranchServiceStub.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcBranchServiceStub.java new file mode 100644 index 000000000000..411963e11e49 --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcBranchServiceStub.java @@ -0,0 +1,191 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2alpha.Branch; +import com.google.cloud.retail.v2alpha.GetBranchRequest; +import com.google.cloud.retail.v2alpha.ListBranchesRequest; +import com.google.cloud.retail.v2alpha.ListBranchesResponse; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the BranchService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcBranchServiceStub extends BranchServiceStub { + private static final MethodDescriptor + listBranchesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.BranchService/ListBranches") + .setRequestMarshaller(ProtoUtils.marshaller(ListBranchesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBranchesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getBranchMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.BranchService/GetBranch") + .setRequestMarshaller(ProtoUtils.marshaller(GetBranchRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Branch.getDefaultInstance())) + .build(); + + private final UnaryCallable listBranchesCallable; + private final UnaryCallable getBranchCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcBranchServiceStub create(BranchServiceStubSettings settings) + throws IOException { + return new GrpcBranchServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcBranchServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcBranchServiceStub(BranchServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcBranchServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcBranchServiceStub( + BranchServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcBranchServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcBranchServiceStub(BranchServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcBranchServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcBranchServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcBranchServiceStub( + BranchServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listBranchesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listBranchesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getBranchTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBranchMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listBranchesCallable = + callableFactory.createUnaryCallable( + listBranchesTransportSettings, settings.listBranchesSettings(), clientContext); + this.getBranchCallable = + callableFactory.createUnaryCallable( + getBranchTransportSettings, settings.getBranchSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listBranchesCallable() { + return listBranchesCallable; + } + + @Override + public UnaryCallable getBranchCallable() { + return getBranchCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcProjectServiceCallableFactory.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcProjectServiceCallableFactory.java new file mode 100644 index 000000000000..e8e4a06417dc --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcProjectServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ProjectService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcProjectServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcProjectServiceStub.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcProjectServiceStub.java new file mode 100644 index 000000000000..7ed7d8800208 --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcProjectServiceStub.java @@ -0,0 +1,408 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2alpha.AcceptTermsRequest; +import com.google.cloud.retail.v2alpha.AlertConfig; +import com.google.cloud.retail.v2alpha.EnrollSolutionMetadata; +import com.google.cloud.retail.v2alpha.EnrollSolutionRequest; +import com.google.cloud.retail.v2alpha.EnrollSolutionResponse; +import com.google.cloud.retail.v2alpha.GetAlertConfigRequest; +import com.google.cloud.retail.v2alpha.GetLoggingConfigRequest; +import com.google.cloud.retail.v2alpha.GetProjectRequest; +import com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest; +import com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse; +import com.google.cloud.retail.v2alpha.LoggingConfig; +import com.google.cloud.retail.v2alpha.Project; +import com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest; +import com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ProjectService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcProjectServiceStub extends ProjectServiceStub { + private static final MethodDescriptor getProjectMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/GetProject") + .setRequestMarshaller(ProtoUtils.marshaller(GetProjectRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Project.getDefaultInstance())) + .build(); + + private static final MethodDescriptor acceptTermsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/AcceptTerms") + .setRequestMarshaller(ProtoUtils.marshaller(AcceptTermsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Project.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + enrollSolutionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/EnrollSolution") + .setRequestMarshaller( + ProtoUtils.marshaller(EnrollSolutionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listEnrolledSolutionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/ListEnrolledSolutions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListEnrolledSolutionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEnrolledSolutionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getLoggingConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/GetLoggingConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetLoggingConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(LoggingConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateLoggingConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/UpdateLoggingConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateLoggingConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(LoggingConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAlertConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/GetAlertConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAlertConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AlertConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateAlertConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/UpdateAlertConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAlertConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AlertConfig.getDefaultInstance())) + .build(); + + private final UnaryCallable getProjectCallable; + private final UnaryCallable acceptTermsCallable; + private final UnaryCallable enrollSolutionCallable; + private final OperationCallable< + EnrollSolutionRequest, EnrollSolutionResponse, EnrollSolutionMetadata> + enrollSolutionOperationCallable; + private final UnaryCallable + listEnrolledSolutionsCallable; + private final UnaryCallable getLoggingConfigCallable; + private final UnaryCallable + updateLoggingConfigCallable; + private final UnaryCallable getAlertConfigCallable; + private final UnaryCallable updateAlertConfigCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcProjectServiceStub create(ProjectServiceStubSettings settings) + throws IOException { + return new GrpcProjectServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcProjectServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcProjectServiceStub( + ProjectServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcProjectServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcProjectServiceStub( + ProjectServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcProjectServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcProjectServiceStub(ProjectServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcProjectServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcProjectServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcProjectServiceStub( + ProjectServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings getProjectTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProjectMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings acceptTermsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(acceptTermsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("project", String.valueOf(request.getProject())); + return builder.build(); + }) + .build(); + GrpcCallSettings enrollSolutionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(enrollSolutionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("project", String.valueOf(request.getProject())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listEnrolledSolutionsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listEnrolledSolutionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLoggingConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLoggingConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateLoggingConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateLoggingConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "logging_config.name", + String.valueOf(request.getLoggingConfig().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getAlertConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAlertConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateAlertConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAlertConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "alert_config.name", String.valueOf(request.getAlertConfig().getName())); + return builder.build(); + }) + .build(); + + this.getProjectCallable = + callableFactory.createUnaryCallable( + getProjectTransportSettings, settings.getProjectSettings(), clientContext); + this.acceptTermsCallable = + callableFactory.createUnaryCallable( + acceptTermsTransportSettings, settings.acceptTermsSettings(), clientContext); + this.enrollSolutionCallable = + callableFactory.createUnaryCallable( + enrollSolutionTransportSettings, settings.enrollSolutionSettings(), clientContext); + this.enrollSolutionOperationCallable = + callableFactory.createOperationCallable( + enrollSolutionTransportSettings, + settings.enrollSolutionOperationSettings(), + clientContext, + operationsStub); + this.listEnrolledSolutionsCallable = + callableFactory.createUnaryCallable( + listEnrolledSolutionsTransportSettings, + settings.listEnrolledSolutionsSettings(), + clientContext); + this.getLoggingConfigCallable = + callableFactory.createUnaryCallable( + getLoggingConfigTransportSettings, settings.getLoggingConfigSettings(), clientContext); + this.updateLoggingConfigCallable = + callableFactory.createUnaryCallable( + updateLoggingConfigTransportSettings, + settings.updateLoggingConfigSettings(), + clientContext); + this.getAlertConfigCallable = + callableFactory.createUnaryCallable( + getAlertConfigTransportSettings, settings.getAlertConfigSettings(), clientContext); + this.updateAlertConfigCallable = + callableFactory.createUnaryCallable( + updateAlertConfigTransportSettings, + settings.updateAlertConfigSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getProjectCallable() { + return getProjectCallable; + } + + @Override + public UnaryCallable acceptTermsCallable() { + return acceptTermsCallable; + } + + @Override + public UnaryCallable enrollSolutionCallable() { + return enrollSolutionCallable; + } + + @Override + public OperationCallable + enrollSolutionOperationCallable() { + return enrollSolutionOperationCallable; + } + + @Override + public UnaryCallable + listEnrolledSolutionsCallable() { + return listEnrolledSolutionsCallable; + } + + @Override + public UnaryCallable getLoggingConfigCallable() { + return getLoggingConfigCallable; + } + + @Override + public UnaryCallable updateLoggingConfigCallable() { + return updateLoggingConfigCallable; + } + + @Override + public UnaryCallable getAlertConfigCallable() { + return getAlertConfigCallable; + } + + @Override + public UnaryCallable updateAlertConfigCallable() { + return updateAlertConfigCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonBranchServiceCallableFactory.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonBranchServiceCallableFactory.java new file mode 100644 index 000000000000..28a18b7b15a5 --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonBranchServiceCallableFactory.java @@ -0,0 +1,103 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the BranchService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonBranchServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonBranchServiceStub.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonBranchServiceStub.java new file mode 100644 index 000000000000..6e08c43d53f3 --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonBranchServiceStub.java @@ -0,0 +1,257 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2alpha.Branch; +import com.google.cloud.retail.v2alpha.GetBranchRequest; +import com.google.cloud.retail.v2alpha.ListBranchesRequest; +import com.google.cloud.retail.v2alpha.ListBranchesResponse; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the BranchService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonBranchServiceStub extends BranchServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + listBranchesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.BranchService/ListBranches") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{parent=projects/*/locations/*/catalogs/*}/branches", + 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, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListBranchesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getBranchMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.BranchService/GetBranch") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{name=projects/*/locations/*/catalogs/*/branches/*}", + 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, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Branch.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable listBranchesCallable; + private final UnaryCallable getBranchCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonBranchServiceStub create(BranchServiceStubSettings settings) + throws IOException { + return new HttpJsonBranchServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonBranchServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonBranchServiceStub( + BranchServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonBranchServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonBranchServiceStub( + BranchServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonBranchServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonBranchServiceStub( + BranchServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonBranchServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonBranchServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonBranchServiceStub( + BranchServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings listBranchesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listBranchesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getBranchTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getBranchMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listBranchesCallable = + callableFactory.createUnaryCallable( + listBranchesTransportSettings, settings.listBranchesSettings(), clientContext); + this.getBranchCallable = + callableFactory.createUnaryCallable( + getBranchTransportSettings, settings.getBranchSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listBranchesMethodDescriptor); + methodDescriptors.add(getBranchMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable listBranchesCallable() { + return listBranchesCallable; + } + + @Override + public UnaryCallable getBranchCallable() { + return getBranchCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonProjectServiceCallableFactory.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonProjectServiceCallableFactory.java new file mode 100644 index 000000000000..69268857c4d2 --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonProjectServiceCallableFactory.java @@ -0,0 +1,103 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the ProjectService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonProjectServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonProjectServiceStub.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonProjectServiceStub.java new file mode 100644 index 000000000000..29f1129c2ddb --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonProjectServiceStub.java @@ -0,0 +1,705 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.stub; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2alpha.AcceptTermsRequest; +import com.google.cloud.retail.v2alpha.AlertConfig; +import com.google.cloud.retail.v2alpha.EnrollSolutionMetadata; +import com.google.cloud.retail.v2alpha.EnrollSolutionRequest; +import com.google.cloud.retail.v2alpha.EnrollSolutionResponse; +import com.google.cloud.retail.v2alpha.GetAlertConfigRequest; +import com.google.cloud.retail.v2alpha.GetLoggingConfigRequest; +import com.google.cloud.retail.v2alpha.GetProjectRequest; +import com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest; +import com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse; +import com.google.cloud.retail.v2alpha.LoggingConfig; +import com.google.cloud.retail.v2alpha.Project; +import com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest; +import com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the ProjectService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonProjectServiceStub extends ProjectServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(EnrollSolutionMetadata.getDescriptor()) + .add(EnrollSolutionResponse.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor getProjectMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/GetProject") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{name=projects/*/retailProject}", + 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(Project.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + acceptTermsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/AcceptTerms") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{project=projects/*/retailProject}:acceptTerms", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "project", request.getProject()); + 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().clearProject().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Project.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + enrollSolutionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/EnrollSolution") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{project=projects/*}:enrollSolution", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "project", request.getProject()); + 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().clearProject().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (EnrollSolutionRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + ListEnrolledSolutionsRequest, ListEnrolledSolutionsResponse> + listEnrolledSolutionsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/ListEnrolledSolutions") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{parent=projects/*}:enrolledSolutions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListEnrolledSolutionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLoggingConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/GetLoggingConfig") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{name=projects/*/loggingConfig}", + 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(LoggingConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateLoggingConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/UpdateLoggingConfig") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{loggingConfig.name=projects/*/loggingConfig}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "loggingConfig.name", request.getLoggingConfig().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("loggingConfig", request.getLoggingConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(LoggingConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getAlertConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/GetAlertConfig") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{name=projects/*/alertConfig}", + 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(AlertConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateAlertConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.ProjectService/UpdateAlertConfig") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{alertConfig.name=projects/*/alertConfig}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "alertConfig.name", request.getAlertConfig().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("alertConfig", request.getAlertConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AlertConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable getProjectCallable; + private final UnaryCallable acceptTermsCallable; + private final UnaryCallable enrollSolutionCallable; + private final OperationCallable< + EnrollSolutionRequest, EnrollSolutionResponse, EnrollSolutionMetadata> + enrollSolutionOperationCallable; + private final UnaryCallable + listEnrolledSolutionsCallable; + private final UnaryCallable getLoggingConfigCallable; + private final UnaryCallable + updateLoggingConfigCallable; + private final UnaryCallable getAlertConfigCallable; + private final UnaryCallable updateAlertConfigCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonProjectServiceStub create(ProjectServiceStubSettings settings) + throws IOException { + return new HttpJsonProjectServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonProjectServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonProjectServiceStub( + ProjectServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonProjectServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonProjectServiceStub( + ProjectServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonProjectServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonProjectServiceStub( + ProjectServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonProjectServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonProjectServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonProjectServiceStub( + ProjectServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet( + "/v2alpha/{name=projects/*/locations/*/catalogs/*/branches/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v2alpha/{name=projects/*/locations/*/catalogs/*/branches/*/places/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v2alpha/{name=projects/*/locations/*/catalogs/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v2alpha/{name=projects/*/locations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v2alpha/{name=projects/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v2alpha/{name=projects/*/locations/*/catalogs/*}/operations") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v2alpha/{name=projects/*/locations/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v2alpha/{name=projects/*}/operations") + .build()) + .build()) + .build()); + + HttpJsonCallSettings getProjectTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getProjectMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings acceptTermsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(acceptTermsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("project", String.valueOf(request.getProject())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings enrollSolutionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(enrollSolutionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("project", String.valueOf(request.getProject())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listEnrolledSolutionsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listEnrolledSolutionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLoggingConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLoggingConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateLoggingConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateLoggingConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "logging_config.name", + String.valueOf(request.getLoggingConfig().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getAlertConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAlertConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateAlertConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAlertConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "alert_config.name", String.valueOf(request.getAlertConfig().getName())); + return builder.build(); + }) + .build(); + + this.getProjectCallable = + callableFactory.createUnaryCallable( + getProjectTransportSettings, settings.getProjectSettings(), clientContext); + this.acceptTermsCallable = + callableFactory.createUnaryCallable( + acceptTermsTransportSettings, settings.acceptTermsSettings(), clientContext); + this.enrollSolutionCallable = + callableFactory.createUnaryCallable( + enrollSolutionTransportSettings, settings.enrollSolutionSettings(), clientContext); + this.enrollSolutionOperationCallable = + callableFactory.createOperationCallable( + enrollSolutionTransportSettings, + settings.enrollSolutionOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listEnrolledSolutionsCallable = + callableFactory.createUnaryCallable( + listEnrolledSolutionsTransportSettings, + settings.listEnrolledSolutionsSettings(), + clientContext); + this.getLoggingConfigCallable = + callableFactory.createUnaryCallable( + getLoggingConfigTransportSettings, settings.getLoggingConfigSettings(), clientContext); + this.updateLoggingConfigCallable = + callableFactory.createUnaryCallable( + updateLoggingConfigTransportSettings, + settings.updateLoggingConfigSettings(), + clientContext); + this.getAlertConfigCallable = + callableFactory.createUnaryCallable( + getAlertConfigTransportSettings, settings.getAlertConfigSettings(), clientContext); + this.updateAlertConfigCallable = + callableFactory.createUnaryCallable( + updateAlertConfigTransportSettings, + settings.updateAlertConfigSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getProjectMethodDescriptor); + methodDescriptors.add(acceptTermsMethodDescriptor); + methodDescriptors.add(enrollSolutionMethodDescriptor); + methodDescriptors.add(listEnrolledSolutionsMethodDescriptor); + methodDescriptors.add(getLoggingConfigMethodDescriptor); + methodDescriptors.add(updateLoggingConfigMethodDescriptor); + methodDescriptors.add(getAlertConfigMethodDescriptor); + methodDescriptors.add(updateAlertConfigMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable getProjectCallable() { + return getProjectCallable; + } + + @Override + public UnaryCallable acceptTermsCallable() { + return acceptTermsCallable; + } + + @Override + public UnaryCallable enrollSolutionCallable() { + return enrollSolutionCallable; + } + + @Override + public OperationCallable + enrollSolutionOperationCallable() { + return enrollSolutionOperationCallable; + } + + @Override + public UnaryCallable + listEnrolledSolutionsCallable() { + return listEnrolledSolutionsCallable; + } + + @Override + public UnaryCallable getLoggingConfigCallable() { + return getLoggingConfigCallable; + } + + @Override + public UnaryCallable updateLoggingConfigCallable() { + return updateLoggingConfigCallable; + } + + @Override + public UnaryCallable getAlertConfigCallable() { + return getAlertConfigCallable; + } + + @Override + public UnaryCallable updateAlertConfigCallable() { + return updateAlertConfigCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java index 0574a7133321..665cb8f7caaa 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java @@ -382,7 +382,7 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "retry_policy_2_codes", + "retry_policy_4_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); @@ -404,7 +404,7 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Model.class)) @@ -557,8 +557,8 @@ private static Builder initDefaults(Builder builder) { .tuneModelOperationSettings() .setInitialCallSettings( UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(TuneModelResponse.class)) diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java index d33f9ee591c7..421ec3708760 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java @@ -528,12 +528,12 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "retry_policy_1_codes", + "retry_policy_3_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); definitions.put( - "retry_policy_3_codes", + "retry_policy_5_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); @@ -555,7 +555,7 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(PurgeProductsResponse.class)) @@ -771,8 +771,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(ImportProductsResponse.class)) @@ -795,8 +795,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(SetInventoryResponse.class)) @@ -819,8 +819,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( @@ -845,8 +845,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( @@ -871,8 +871,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( @@ -897,8 +897,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProjectServiceStub.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProjectServiceStub.java new file mode 100644 index 000000000000..e345944843dc --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProjectServiceStub.java @@ -0,0 +1,99 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2alpha.AcceptTermsRequest; +import com.google.cloud.retail.v2alpha.AlertConfig; +import com.google.cloud.retail.v2alpha.EnrollSolutionMetadata; +import com.google.cloud.retail.v2alpha.EnrollSolutionRequest; +import com.google.cloud.retail.v2alpha.EnrollSolutionResponse; +import com.google.cloud.retail.v2alpha.GetAlertConfigRequest; +import com.google.cloud.retail.v2alpha.GetLoggingConfigRequest; +import com.google.cloud.retail.v2alpha.GetProjectRequest; +import com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest; +import com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse; +import com.google.cloud.retail.v2alpha.LoggingConfig; +import com.google.cloud.retail.v2alpha.Project; +import com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest; +import com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ProjectService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ProjectServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable getProjectCallable() { + throw new UnsupportedOperationException("Not implemented: getProjectCallable()"); + } + + public UnaryCallable acceptTermsCallable() { + throw new UnsupportedOperationException("Not implemented: acceptTermsCallable()"); + } + + public OperationCallable + enrollSolutionOperationCallable() { + throw new UnsupportedOperationException("Not implemented: enrollSolutionOperationCallable()"); + } + + public UnaryCallable enrollSolutionCallable() { + throw new UnsupportedOperationException("Not implemented: enrollSolutionCallable()"); + } + + public UnaryCallable + listEnrolledSolutionsCallable() { + throw new UnsupportedOperationException("Not implemented: listEnrolledSolutionsCallable()"); + } + + public UnaryCallable getLoggingConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getLoggingConfigCallable()"); + } + + public UnaryCallable updateLoggingConfigCallable() { + throw new UnsupportedOperationException("Not implemented: updateLoggingConfigCallable()"); + } + + public UnaryCallable getAlertConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getAlertConfigCallable()"); + } + + public UnaryCallable updateAlertConfigCallable() { + throw new UnsupportedOperationException("Not implemented: updateAlertConfigCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProjectServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProjectServiceStubSettings.java new file mode 100644 index 000000000000..1fd382a9ae04 --- /dev/null +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProjectServiceStubSettings.java @@ -0,0 +1,565 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.retail.v2alpha.AcceptTermsRequest; +import com.google.cloud.retail.v2alpha.AlertConfig; +import com.google.cloud.retail.v2alpha.EnrollSolutionMetadata; +import com.google.cloud.retail.v2alpha.EnrollSolutionRequest; +import com.google.cloud.retail.v2alpha.EnrollSolutionResponse; +import com.google.cloud.retail.v2alpha.GetAlertConfigRequest; +import com.google.cloud.retail.v2alpha.GetLoggingConfigRequest; +import com.google.cloud.retail.v2alpha.GetProjectRequest; +import com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest; +import com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse; +import com.google.cloud.retail.v2alpha.LoggingConfig; +import com.google.cloud.retail.v2alpha.Project; +import com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest; +import com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ProjectServiceStub}. + * + *

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

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

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getProject to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProjectServiceStubSettings.Builder projectServiceSettingsBuilder =
+ *     ProjectServiceStubSettings.newBuilder();
+ * projectServiceSettingsBuilder
+ *     .getProjectSettings()
+ *     .setRetrySettings(
+ *         projectServiceSettingsBuilder
+ *             .getProjectSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ProjectServiceStubSettings projectServiceSettings = projectServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ProjectServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings getProjectSettings; + private final UnaryCallSettings acceptTermsSettings; + private final UnaryCallSettings enrollSolutionSettings; + private final OperationCallSettings< + EnrollSolutionRequest, EnrollSolutionResponse, EnrollSolutionMetadata> + enrollSolutionOperationSettings; + private final UnaryCallSettings + listEnrolledSolutionsSettings; + private final UnaryCallSettings getLoggingConfigSettings; + private final UnaryCallSettings + updateLoggingConfigSettings; + private final UnaryCallSettings getAlertConfigSettings; + private final UnaryCallSettings updateAlertConfigSettings; + + /** Returns the object with the settings used for calls to getProject. */ + public UnaryCallSettings getProjectSettings() { + return getProjectSettings; + } + + /** Returns the object with the settings used for calls to acceptTerms. */ + public UnaryCallSettings acceptTermsSettings() { + return acceptTermsSettings; + } + + /** Returns the object with the settings used for calls to enrollSolution. */ + public UnaryCallSettings enrollSolutionSettings() { + return enrollSolutionSettings; + } + + /** Returns the object with the settings used for calls to enrollSolution. */ + public OperationCallSettings< + EnrollSolutionRequest, EnrollSolutionResponse, EnrollSolutionMetadata> + enrollSolutionOperationSettings() { + return enrollSolutionOperationSettings; + } + + /** Returns the object with the settings used for calls to listEnrolledSolutions. */ + public UnaryCallSettings + listEnrolledSolutionsSettings() { + return listEnrolledSolutionsSettings; + } + + /** Returns the object with the settings used for calls to getLoggingConfig. */ + public UnaryCallSettings getLoggingConfigSettings() { + return getLoggingConfigSettings; + } + + /** Returns the object with the settings used for calls to updateLoggingConfig. */ + public UnaryCallSettings + updateLoggingConfigSettings() { + return updateLoggingConfigSettings; + } + + /** Returns the object with the settings used for calls to getAlertConfig. */ + public UnaryCallSettings getAlertConfigSettings() { + return getAlertConfigSettings; + } + + /** Returns the object with the settings used for calls to updateAlertConfig. */ + public UnaryCallSettings updateAlertConfigSettings() { + return updateAlertConfigSettings; + } + + public ProjectServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcProjectServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonProjectServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "retail.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "retail.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ProjectServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ProjectServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ProjectServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ProjectServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getProjectSettings = settingsBuilder.getProjectSettings().build(); + acceptTermsSettings = settingsBuilder.acceptTermsSettings().build(); + enrollSolutionSettings = settingsBuilder.enrollSolutionSettings().build(); + enrollSolutionOperationSettings = settingsBuilder.enrollSolutionOperationSettings().build(); + listEnrolledSolutionsSettings = settingsBuilder.listEnrolledSolutionsSettings().build(); + getLoggingConfigSettings = settingsBuilder.getLoggingConfigSettings().build(); + updateLoggingConfigSettings = settingsBuilder.updateLoggingConfigSettings().build(); + getAlertConfigSettings = settingsBuilder.getAlertConfigSettings().build(); + updateAlertConfigSettings = settingsBuilder.updateAlertConfigSettings().build(); + } + + /** Builder for ProjectServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder getProjectSettings; + private final UnaryCallSettings.Builder acceptTermsSettings; + private final UnaryCallSettings.Builder + enrollSolutionSettings; + private final OperationCallSettings.Builder< + EnrollSolutionRequest, EnrollSolutionResponse, EnrollSolutionMetadata> + enrollSolutionOperationSettings; + private final UnaryCallSettings.Builder< + ListEnrolledSolutionsRequest, ListEnrolledSolutionsResponse> + listEnrolledSolutionsSettings; + private final UnaryCallSettings.Builder + getLoggingConfigSettings; + private final UnaryCallSettings.Builder + updateLoggingConfigSettings; + private final UnaryCallSettings.Builder + getAlertConfigSettings; + private final UnaryCallSettings.Builder + updateAlertConfigSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_3_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(30000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_3_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + getProjectSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + acceptTermsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + enrollSolutionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + enrollSolutionOperationSettings = OperationCallSettings.newBuilder(); + listEnrolledSolutionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getLoggingConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateLoggingConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getAlertConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAlertConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getProjectSettings, + acceptTermsSettings, + enrollSolutionSettings, + listEnrolledSolutionsSettings, + getLoggingConfigSettings, + updateLoggingConfigSettings, + getAlertConfigSettings, + updateAlertConfigSettings); + initDefaults(this); + } + + protected Builder(ProjectServiceStubSettings settings) { + super(settings); + + getProjectSettings = settings.getProjectSettings.toBuilder(); + acceptTermsSettings = settings.acceptTermsSettings.toBuilder(); + enrollSolutionSettings = settings.enrollSolutionSettings.toBuilder(); + enrollSolutionOperationSettings = settings.enrollSolutionOperationSettings.toBuilder(); + listEnrolledSolutionsSettings = settings.listEnrolledSolutionsSettings.toBuilder(); + getLoggingConfigSettings = settings.getLoggingConfigSettings.toBuilder(); + updateLoggingConfigSettings = settings.updateLoggingConfigSettings.toBuilder(); + getAlertConfigSettings = settings.getAlertConfigSettings.toBuilder(); + updateAlertConfigSettings = settings.updateAlertConfigSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getProjectSettings, + acceptTermsSettings, + enrollSolutionSettings, + listEnrolledSolutionsSettings, + getLoggingConfigSettings, + updateLoggingConfigSettings, + getAlertConfigSettings, + updateAlertConfigSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getProjectSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + builder + .acceptTermsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + builder + .enrollSolutionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + builder + .listEnrolledSolutionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + builder + .getLoggingConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + builder + .updateLoggingConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + builder + .getAlertConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + builder + .updateAlertConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + builder + .enrollSolutionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(EnrollSolutionResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(EnrollSolutionMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getProject. */ + public UnaryCallSettings.Builder getProjectSettings() { + return getProjectSettings; + } + + /** Returns the builder for the settings used for calls to acceptTerms. */ + public UnaryCallSettings.Builder acceptTermsSettings() { + return acceptTermsSettings; + } + + /** Returns the builder for the settings used for calls to enrollSolution. */ + public UnaryCallSettings.Builder enrollSolutionSettings() { + return enrollSolutionSettings; + } + + /** Returns the builder for the settings used for calls to enrollSolution. */ + public OperationCallSettings.Builder< + EnrollSolutionRequest, EnrollSolutionResponse, EnrollSolutionMetadata> + enrollSolutionOperationSettings() { + return enrollSolutionOperationSettings; + } + + /** Returns the builder for the settings used for calls to listEnrolledSolutions. */ + public UnaryCallSettings.Builder + listEnrolledSolutionsSettings() { + return listEnrolledSolutionsSettings; + } + + /** Returns the builder for the settings used for calls to getLoggingConfig. */ + public UnaryCallSettings.Builder + getLoggingConfigSettings() { + return getLoggingConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateLoggingConfig. */ + public UnaryCallSettings.Builder + updateLoggingConfigSettings() { + return updateLoggingConfigSettings; + } + + /** Returns the builder for the settings used for calls to getAlertConfig. */ + public UnaryCallSettings.Builder getAlertConfigSettings() { + return getAlertConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateAlertConfig. */ + public UnaryCallSettings.Builder + updateAlertConfigSettings() { + return updateAlertConfigSettings; + } + + @Override + public ProjectServiceStubSettings build() throws IOException { + return new ProjectServiceStubSettings(this); + } + } +} diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java index cda802309310..029443a433a2 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java @@ -313,17 +313,17 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "retry_policy_0_codes", + "retry_policy_1_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); definitions.put( - "retry_policy_1_codes", + "retry_policy_3_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); definitions.put( - "retry_policy_4_codes", + "retry_policy_6_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); @@ -340,12 +340,12 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(PurgeUserEventsResponse.class)) @@ -497,8 +497,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(ImportUserEventsResponse.class)) @@ -521,8 +521,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(RejoinUserEventsResponse.class)) diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceClient.java index e3509457186a..1519e0bff183 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceClient.java @@ -55,6 +55,7 @@ * .setDeviceType("deviceType781190832") * .setDataset("dataset1443214456") * .setMaxSuggestions(618824852) + * .setEnableAttributeSuggestions(true) * .setEntity("entity-1298275357") * .build(); * CompleteQueryResponse response = completionServiceClient.completeQuery(request); @@ -264,6 +265,7 @@ public final OperationsClient getHttpJsonOperationsClient() { * .setDeviceType("deviceType781190832") * .setDataset("dataset1443214456") * .setMaxSuggestions(618824852) + * .setEnableAttributeSuggestions(true) * .setEntity("entity-1298275357") * .build(); * CompleteQueryResponse response = completionServiceClient.completeQuery(request); @@ -302,6 +304,7 @@ public final CompleteQueryResponse completeQuery(CompleteQueryRequest request) { * .setDeviceType("deviceType781190832") * .setDataset("dataset1443214456") * .setMaxSuggestions(618824852) + * .setEnableAttributeSuggestions(true) * .setEntity("entity-1298275357") * .build(); * ApiFuture future = diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java index f7d3f0686750..f468cc0a8a67 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java @@ -167,6 +167,23 @@ * * * + *

PurgeProducts + *

Permanently deletes all selected [Product][google.cloud.retail.v2beta.Product]s under a branch. + *

This process is asynchronous. If the request is valid, the removal will be enqueued and processed offline. Depending on the number of [Product][google.cloud.retail.v2beta.Product]s, this operation could take hours to complete. Before the operation completes, some [Product][google.cloud.retail.v2beta.Product]s may still be returned by [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + *

Depending on the number of [Product][google.cloud.retail.v2beta.Product]s, this operation could take hours to complete. To get a sample of [Product][google.cloud.retail.v2beta.Product]s that would be deleted, set [PurgeProductsRequest.force][google.cloud.retail.v2beta.PurgeProductsRequest.force] to false. + * + *

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

+ *
    + *
  • purgeProductsAsync(PurgeProductsRequest request) + *

+ *

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

+ *
    + *
  • purgeProductsOperationCallable() + *

  • purgeProductsCallable() + *

+ * + * + * *

ImportProducts *

Bulk import of multiple [Product][google.cloud.retail.v2beta.Product]s. *

Request processing may be synchronous. Non-existing items are created. @@ -211,7 +228,7 @@ * * *

AddFulfillmentPlaces - *

It is recommended to use the [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] method instead of [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]. [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. + *

We recommend that you use the [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] method instead of the [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces] method. [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. *

Incrementally adds place IDs to [Product.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]. *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2beta.Product] to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the [Product][google.cloud.retail.v2beta.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. @@ -235,7 +252,7 @@ * * *

RemoveFulfillmentPlaces - *

It is recommended to use the [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] method instead of [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. + *

We recommend that you use the [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] method instead of the [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces] method. [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. *

Incrementally removes place IDs from a [Product.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]. *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2beta.Product] to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the [Product][google.cloud.retail.v2beta.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. @@ -1147,6 +1164,137 @@ public final UnaryCallable deleteProductCallable() return stub.deleteProductCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes all selected [Product][google.cloud.retail.v2beta.Product]s under a branch. + * + *

This process is asynchronous. If the request is valid, the removal will be enqueued and + * processed offline. Depending on the number of [Product][google.cloud.retail.v2beta.Product]s, + * this operation could take hours to complete. Before the operation completes, some + * [Product][google.cloud.retail.v2beta.Product]s may still be returned by + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * + *

Depending on the number of [Product][google.cloud.retail.v2beta.Product]s, this operation + * could take hours to complete. To get a sample of [Product][google.cloud.retail.v2beta.Product]s + * that would be deleted, set + * [PurgeProductsRequest.force][google.cloud.retail.v2beta.PurgeProductsRequest.force] to false. + * + *

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 (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
+   *   PurgeProductsRequest request =
+   *       PurgeProductsRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setForce(true)
+   *           .build();
+   *   PurgeProductsResponse response = productServiceClient.purgeProductsAsync(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 purgeProductsAsync( + PurgeProductsRequest request) { + return purgeProductsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes all selected [Product][google.cloud.retail.v2beta.Product]s under a branch. + * + *

This process is asynchronous. If the request is valid, the removal will be enqueued and + * processed offline. Depending on the number of [Product][google.cloud.retail.v2beta.Product]s, + * this operation could take hours to complete. Before the operation completes, some + * [Product][google.cloud.retail.v2beta.Product]s may still be returned by + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * + *

Depending on the number of [Product][google.cloud.retail.v2beta.Product]s, this operation + * could take hours to complete. To get a sample of [Product][google.cloud.retail.v2beta.Product]s + * that would be deleted, set + * [PurgeProductsRequest.force][google.cloud.retail.v2beta.PurgeProductsRequest.force] to false. + * + *

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 (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
+   *   PurgeProductsRequest request =
+   *       PurgeProductsRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       productServiceClient.purgeProductsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   PurgeProductsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + purgeProductsOperationCallable() { + return stub.purgeProductsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes all selected [Product][google.cloud.retail.v2beta.Product]s under a branch. + * + *

This process is asynchronous. If the request is valid, the removal will be enqueued and + * processed offline. Depending on the number of [Product][google.cloud.retail.v2beta.Product]s, + * this operation could take hours to complete. Before the operation completes, some + * [Product][google.cloud.retail.v2beta.Product]s may still be returned by + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * + *

Depending on the number of [Product][google.cloud.retail.v2beta.Product]s, this operation + * could take hours to complete. To get a sample of [Product][google.cloud.retail.v2beta.Product]s + * that would be deleted, set + * [PurgeProductsRequest.force][google.cloud.retail.v2beta.PurgeProductsRequest.force] to false. + * + *

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 (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
+   *   PurgeProductsRequest request =
+   *       PurgeProductsRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       productServiceClient.purgeProductsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable purgeProductsCallable() { + return stub.purgeProductsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Bulk import of multiple [Product][google.cloud.retail.v2beta.Product]s. @@ -1606,10 +1754,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] - * method instead of - * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]. + * method instead of the + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces] + * method. * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -1668,10 +1817,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] - * method instead of - * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]. + * method instead of the + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces] + * method. * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -1729,10 +1879,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] - * method instead of - * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]. + * method instead of the + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces] + * method. * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -1790,10 +1941,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] - * method instead of - * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]. + * method instead of the + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces] + * method. * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -1851,10 +2003,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] - * method instead of - * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]. + * method instead of the + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces] + * method. * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -1911,10 +2064,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] - * method instead of - * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + * method instead of the + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces] + * method. * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -1973,10 +2127,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] - * method instead of - * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + * method instead of the + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces] + * method. * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -2034,10 +2189,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] - * method instead of - * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + * method instead of the + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces] + * method. * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -2095,10 +2251,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] - * method instead of - * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + * method instead of the + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces] + * method. * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. @@ -2158,10 +2315,11 @@ public final UnaryCallable setInventoryCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * It is recommended to use the + * We recommend that you use the * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] - * method instead of - * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + * method instead of the + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces] + * method. * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] * achieves the same results but provides more fine-grained control over ingesting local inventory * data. diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceSettings.java index f889f8473261..b1c5ba48b463 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceSettings.java @@ -105,6 +105,17 @@ public UnaryCallSettings deleteProductSettings() { return ((ProductServiceStubSettings) getStubSettings()).deleteProductSettings(); } + /** Returns the object with the settings used for calls to purgeProducts. */ + public UnaryCallSettings purgeProductsSettings() { + return ((ProductServiceStubSettings) getStubSettings()).purgeProductsSettings(); + } + + /** Returns the object with the settings used for calls to purgeProducts. */ + public OperationCallSettings + purgeProductsOperationSettings() { + return ((ProductServiceStubSettings) getStubSettings()).purgeProductsOperationSettings(); + } + /** Returns the object with the settings used for calls to importProducts. */ public UnaryCallSettings importProductsSettings() { return ((ProductServiceStubSettings) getStubSettings()).importProductsSettings(); @@ -322,6 +333,18 @@ public UnaryCallSettings.Builder deleteProductSetti return getStubSettingsBuilder().deleteProductSettings(); } + /** Returns the builder for the settings used for calls to purgeProducts. */ + public UnaryCallSettings.Builder purgeProductsSettings() { + return getStubSettingsBuilder().purgeProductsSettings(); + } + + /** Returns the builder for the settings used for calls to purgeProducts. */ + public OperationCallSettings.Builder< + PurgeProductsRequest, PurgeProductsResponse, PurgeProductsMetadata> + purgeProductsOperationSettings() { + return getStubSettingsBuilder().purgeProductsOperationSettings(); + } + /** Returns the builder for the settings used for calls to importProducts. */ public UnaryCallSettings.Builder importProductsSettings() { return getStubSettingsBuilder().importProductsSettings(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/gapic_metadata.json b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/gapic_metadata.json index d16e2d0a9153..6a740ef5d9a7 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/gapic_metadata.json +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/gapic_metadata.json @@ -172,6 +172,9 @@ "ListProducts": { "methods": ["listProducts", "listProducts", "listProducts", "listProductsPagedCallable", "listProductsCallable"] }, + "PurgeProducts": { + "methods": ["purgeProductsAsync", "purgeProductsOperationCallable", "purgeProductsCallable"] + }, "RemoveFulfillmentPlaces": { "methods": ["removeFulfillmentPlacesAsync", "removeFulfillmentPlacesAsync", "removeFulfillmentPlacesAsync", "removeFulfillmentPlacesOperationCallable", "removeFulfillmentPlacesCallable"] }, diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/package-info.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/package-info.java index 804cd5f18e18..47e39fd1fd64 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/package-info.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/package-info.java @@ -15,7 +15,7 @@ */ /** - * A client to Retail API + * A client to Vertex AI Search for Retail API * *

The interfaces provided are listed below, along with usage samples. * @@ -88,6 +88,7 @@ * .setDeviceType("deviceType781190832") * .setDataset("dataset1443214456") * .setMaxSuggestions(618824852) + * .setEnableAttributeSuggestions(true) * .setEntity("entity-1298275357") * .build(); * CompleteQueryResponse response = completionServiceClient.completeQuery(request); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/AnalyticsServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/AnalyticsServiceStubSettings.java index 2f0aef17e00a..dc04ed4774a5 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/AnalyticsServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/AnalyticsServiceStubSettings.java @@ -244,7 +244,7 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "retry_policy_2_codes", + "retry_policy_3_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); @@ -266,7 +266,7 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/GrpcProductServiceStub.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/GrpcProductServiceStub.java index 2014921f8cf4..518e695d97ce 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/GrpcProductServiceStub.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/GrpcProductServiceStub.java @@ -42,6 +42,9 @@ import com.google.cloud.retail.v2beta.ListProductsRequest; import com.google.cloud.retail.v2beta.ListProductsResponse; import com.google.cloud.retail.v2beta.Product; +import com.google.cloud.retail.v2beta.PurgeProductsMetadata; +import com.google.cloud.retail.v2beta.PurgeProductsRequest; +import com.google.cloud.retail.v2beta.PurgeProductsResponse; import com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesMetadata; import com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest; import com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesResponse; @@ -116,6 +119,16 @@ public class GrpcProductServiceStub extends ProductServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor + purgeProductsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2beta.ProductService/PurgeProducts") + .setRequestMarshaller( + ProtoUtils.marshaller(PurgeProductsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor importProductsMethodDescriptor = MethodDescriptor.newBuilder() @@ -183,6 +196,10 @@ public class GrpcProductServiceStub extends ProductServiceStub { listProductsPagedCallable; private final UnaryCallable updateProductCallable; private final UnaryCallable deleteProductCallable; + private final UnaryCallable purgeProductsCallable; + private final OperationCallable< + PurgeProductsRequest, PurgeProductsResponse, PurgeProductsMetadata> + purgeProductsOperationCallable; private final UnaryCallable importProductsCallable; private final OperationCallable importProductsOperationCallable; @@ -306,6 +323,16 @@ protected GrpcProductServiceStub( return builder.build(); }) .build(); + GrpcCallSettings purgeProductsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(purgeProductsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); GrpcCallSettings importProductsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(importProductsMethodDescriptor) @@ -387,6 +414,15 @@ protected GrpcProductServiceStub( this.deleteProductCallable = callableFactory.createUnaryCallable( deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); + this.purgeProductsCallable = + callableFactory.createUnaryCallable( + purgeProductsTransportSettings, settings.purgeProductsSettings(), clientContext); + this.purgeProductsOperationCallable = + callableFactory.createOperationCallable( + purgeProductsTransportSettings, + settings.purgeProductsOperationSettings(), + clientContext, + operationsStub); this.importProductsCallable = callableFactory.createUnaryCallable( importProductsTransportSettings, settings.importProductsSettings(), clientContext); @@ -488,6 +524,17 @@ public UnaryCallable deleteProductCallable() { return deleteProductCallable; } + @Override + public UnaryCallable purgeProductsCallable() { + return purgeProductsCallable; + } + + @Override + public OperationCallable + purgeProductsOperationCallable() { + return purgeProductsOperationCallable; + } + @Override public UnaryCallable importProductsCallable() { return importProductsCallable; diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonCompletionServiceStub.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonCompletionServiceStub.java index 23a2038d4633..dab57f394a94 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonCompletionServiceStub.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonCompletionServiceStub.java @@ -88,6 +88,10 @@ public class HttpJsonCompletionServiceStub extends CompletionServiceStub { ProtoRestSerializer.create(); serializer.putQueryParam(fields, "dataset", request.getDataset()); serializer.putQueryParam(fields, "deviceType", request.getDeviceType()); + serializer.putQueryParam( + fields, + "enableAttributeSuggestions", + request.getEnableAttributeSuggestions()); serializer.putQueryParam(fields, "entity", request.getEntity()); serializer.putQueryParam( fields, "languageCodes", request.getLanguageCodesList()); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonProductServiceStub.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonProductServiceStub.java index 119270b93993..0e683dfdb2bd 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonProductServiceStub.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonProductServiceStub.java @@ -50,6 +50,9 @@ import com.google.cloud.retail.v2beta.ListProductsRequest; import com.google.cloud.retail.v2beta.ListProductsResponse; import com.google.cloud.retail.v2beta.Product; +import com.google.cloud.retail.v2beta.PurgeProductsMetadata; +import com.google.cloud.retail.v2beta.PurgeProductsRequest; +import com.google.cloud.retail.v2beta.PurgeProductsResponse; import com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesMetadata; import com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest; import com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesResponse; @@ -88,10 +91,12 @@ public class HttpJsonProductServiceStub extends ProductServiceStub { .add(AddFulfillmentPlacesMetadata.getDescriptor()) .add(ImportProductsResponse.getDescriptor()) .add(SetInventoryResponse.getDescriptor()) + .add(SetInventoryMetadata.getDescriptor()) .add(AddLocalInventoriesMetadata.getDescriptor()) .add(RemoveFulfillmentPlacesMetadata.getDescriptor()) + .add(PurgeProductsResponse.getDescriptor()) + .add(PurgeProductsMetadata.getDescriptor()) .add(AddFulfillmentPlacesResponse.getDescriptor()) - .add(SetInventoryMetadata.getDescriptor()) .add(RemoveFulfillmentPlacesResponse.getDescriptor()) .add(AddLocalInventoriesResponse.getDescriptor()) .add(RemoveLocalInventoriesMetadata.getDescriptor()) @@ -281,6 +286,46 @@ public class HttpJsonProductServiceStub extends ProductServiceStub { .build()) .build(); + private static final ApiMethodDescriptor + purgeProductsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2beta.ProductService/PurgeProducts") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta/{parent=projects/*/locations/*/catalogs/*/branches/*}/products:purge", + 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( + (PurgeProductsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor importProductsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -530,6 +575,10 @@ public class HttpJsonProductServiceStub extends ProductServiceStub { listProductsPagedCallable; private final UnaryCallable updateProductCallable; private final UnaryCallable deleteProductCallable; + private final UnaryCallable purgeProductsCallable; + private final OperationCallable< + PurgeProductsRequest, PurgeProductsResponse, PurgeProductsMetadata> + purgeProductsOperationCallable; private final UnaryCallable importProductsCallable; private final OperationCallable importProductsOperationCallable; @@ -696,6 +745,17 @@ protected HttpJsonProductServiceStub( return builder.build(); }) .build(); + HttpJsonCallSettings purgeProductsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(purgeProductsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); HttpJsonCallSettings importProductsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(importProductsMethodDescriptor) @@ -785,6 +845,15 @@ protected HttpJsonProductServiceStub( this.deleteProductCallable = callableFactory.createUnaryCallable( deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); + this.purgeProductsCallable = + callableFactory.createUnaryCallable( + purgeProductsTransportSettings, settings.purgeProductsSettings(), clientContext); + this.purgeProductsOperationCallable = + callableFactory.createOperationCallable( + purgeProductsTransportSettings, + settings.purgeProductsOperationSettings(), + clientContext, + httpJsonOperationsStub); this.importProductsCallable = callableFactory.createUnaryCallable( importProductsTransportSettings, settings.importProductsSettings(), clientContext); @@ -860,6 +929,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(listProductsMethodDescriptor); methodDescriptors.add(updateProductMethodDescriptor); methodDescriptors.add(deleteProductMethodDescriptor); + methodDescriptors.add(purgeProductsMethodDescriptor); methodDescriptors.add(importProductsMethodDescriptor); methodDescriptors.add(setInventoryMethodDescriptor); methodDescriptors.add(addFulfillmentPlacesMethodDescriptor); @@ -903,6 +973,17 @@ public UnaryCallable deleteProductCallable() { return deleteProductCallable; } + @Override + public UnaryCallable purgeProductsCallable() { + return purgeProductsCallable; + } + + @Override + public OperationCallable + purgeProductsOperationCallable() { + return purgeProductsOperationCallable; + } + @Override public UnaryCallable importProductsCallable() { return importProductsCallable; diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ModelServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ModelServiceStubSettings.java index 92be1cda5a02..21e50cd77eb4 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ModelServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ModelServiceStubSettings.java @@ -382,7 +382,7 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "retry_policy_2_codes", + "retry_policy_3_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); @@ -404,7 +404,7 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Model.class)) @@ -557,8 +557,8 @@ private static Builder initDefaults(Builder builder) { .tuneModelOperationSettings() .setInitialCallSettings( UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(TuneModelResponse.class)) diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStub.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStub.java index ae43c312ea41..c416b3bfe53b 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStub.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStub.java @@ -37,6 +37,9 @@ import com.google.cloud.retail.v2beta.ListProductsRequest; import com.google.cloud.retail.v2beta.ListProductsResponse; import com.google.cloud.retail.v2beta.Product; +import com.google.cloud.retail.v2beta.PurgeProductsMetadata; +import com.google.cloud.retail.v2beta.PurgeProductsRequest; +import com.google.cloud.retail.v2beta.PurgeProductsResponse; import com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesMetadata; import com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest; import com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesResponse; @@ -94,6 +97,15 @@ public UnaryCallable deleteProductCallable() { throw new UnsupportedOperationException("Not implemented: deleteProductCallable()"); } + public OperationCallable + purgeProductsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: purgeProductsOperationCallable()"); + } + + public UnaryCallable purgeProductsCallable() { + throw new UnsupportedOperationException("Not implemented: purgeProductsCallable()"); + } + public OperationCallable importProductsOperationCallable() { throw new UnsupportedOperationException("Not implemented: importProductsOperationCallable()"); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStubSettings.java index ba9730f5c487..a89dfbc76b18 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStubSettings.java @@ -62,6 +62,9 @@ import com.google.cloud.retail.v2beta.ListProductsRequest; import com.google.cloud.retail.v2beta.ListProductsResponse; import com.google.cloud.retail.v2beta.Product; +import com.google.cloud.retail.v2beta.PurgeProductsMetadata; +import com.google.cloud.retail.v2beta.PurgeProductsRequest; +import com.google.cloud.retail.v2beta.PurgeProductsResponse; import com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesMetadata; import com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest; import com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesResponse; @@ -134,6 +137,10 @@ public class ProductServiceStubSettings extends StubSettings updateProductSettings; private final UnaryCallSettings deleteProductSettings; + private final UnaryCallSettings purgeProductsSettings; + private final OperationCallSettings< + PurgeProductsRequest, PurgeProductsResponse, PurgeProductsMetadata> + purgeProductsOperationSettings; private final UnaryCallSettings importProductsSettings; private final OperationCallSettings importProductsOperationSettings; @@ -245,6 +252,17 @@ public UnaryCallSettings deleteProductSettings() { return deleteProductSettings; } + /** Returns the object with the settings used for calls to purgeProducts. */ + public UnaryCallSettings purgeProductsSettings() { + return purgeProductsSettings; + } + + /** Returns the object with the settings used for calls to purgeProducts. */ + public OperationCallSettings + purgeProductsOperationSettings() { + return purgeProductsOperationSettings; + } + /** Returns the object with the settings used for calls to importProducts. */ public UnaryCallSettings importProductsSettings() { return importProductsSettings; @@ -436,6 +454,8 @@ protected ProductServiceStubSettings(Builder settingsBuilder) throws IOException listProductsSettings = settingsBuilder.listProductsSettings().build(); updateProductSettings = settingsBuilder.updateProductSettings().build(); deleteProductSettings = settingsBuilder.deleteProductSettings().build(); + purgeProductsSettings = settingsBuilder.purgeProductsSettings().build(); + purgeProductsOperationSettings = settingsBuilder.purgeProductsOperationSettings().build(); importProductsSettings = settingsBuilder.importProductsSettings().build(); importProductsOperationSettings = settingsBuilder.importProductsOperationSettings().build(); setInventorySettings = settingsBuilder.setInventorySettings().build(); @@ -464,6 +484,10 @@ public static class Builder extends StubSettings.Builder updateProductSettings; private final UnaryCallSettings.Builder deleteProductSettings; + private final UnaryCallSettings.Builder purgeProductsSettings; + private final OperationCallSettings.Builder< + PurgeProductsRequest, PurgeProductsResponse, PurgeProductsMetadata> + purgeProductsOperationSettings; private final UnaryCallSettings.Builder importProductsSettings; private final OperationCallSettings.Builder< @@ -504,12 +528,12 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "retry_policy_1_codes", + "retry_policy_2_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); definitions.put( - "retry_policy_3_codes", + "retry_policy_4_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); @@ -531,7 +555,7 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PurgeProductsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(PurgeProductsMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); builder .importProductsOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(ImportProductsResponse.class)) @@ -736,8 +795,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(SetInventoryResponse.class)) @@ -760,8 +819,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( @@ -786,8 +845,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( @@ -812,8 +871,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( @@ -838,8 +897,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( @@ -904,6 +963,18 @@ public UnaryCallSettings.Builder deleteProductSetti return deleteProductSettings; } + /** Returns the builder for the settings used for calls to purgeProducts. */ + public UnaryCallSettings.Builder purgeProductsSettings() { + return purgeProductsSettings; + } + + /** Returns the builder for the settings used for calls to purgeProducts. */ + public OperationCallSettings.Builder< + PurgeProductsRequest, PurgeProductsResponse, PurgeProductsMetadata> + purgeProductsOperationSettings() { + return purgeProductsOperationSettings; + } + /** Returns the builder for the settings used for calls to importProducts. */ public UnaryCallSettings.Builder importProductsSettings() { return importProductsSettings; diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/UserEventServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/UserEventServiceStubSettings.java index 08b8989f973d..f3d5a590f7a7 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/UserEventServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/UserEventServiceStubSettings.java @@ -313,17 +313,17 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "retry_policy_0_codes", + "retry_policy_1_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); definitions.put( - "retry_policy_1_codes", + "retry_policy_2_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); definitions.put( - "retry_policy_4_codes", + "retry_policy_5_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); @@ -340,12 +340,12 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(PurgeUserEventsResponse.class)) @@ -497,8 +497,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(ImportUserEventsResponse.class)) @@ -521,8 +521,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(RejoinUserEventsResponse.class)) diff --git a/java-retail/google-cloud-retail/src/main/resources/META-INF/native-image/com.google.cloud.retail.v2/reflect-config.json b/java-retail/google-cloud-retail/src/main/resources/META-INF/native-image/com.google.cloud.retail.v2/reflect-config.json index 3c0f2563c0f2..4b703302480e 100644 --- a/java-retail/google-cloud-retail/src/main/resources/META-INF/native-image/com.google.cloud.retail.v2/reflect-config.json +++ b/java-retail/google-cloud-retail/src/main/resources/META-INF/native-image/com.google.cloud.retail.v2/reflect-config.json @@ -683,6 +683,96 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2.CatalogAttribute$FacetConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.CatalogAttribute$FacetConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.CatalogAttribute$FacetConfig$IgnoredFacetValues", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.CatalogAttribute$FacetConfig$IgnoredFacetValues$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.CatalogAttribute$FacetConfig$MergedFacet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.CatalogAttribute$FacetConfig$MergedFacet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.CatalogAttribute$FacetConfig$MergedFacetValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.CatalogAttribute$FacetConfig$MergedFacetValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.CatalogAttribute$FacetConfig$RerankConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.CatalogAttribute$FacetConfig$RerankConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2.CatalogAttribute$IndexableOption", "queryAllDeclaredConstructors": true, @@ -1835,6 +1925,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2.Model$ContextProductsType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2.Model$DataState", "queryAllDeclaredConstructors": true, @@ -1844,6 +1943,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2.Model$FrequentlyBoughtTogetherFeaturesConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.Model$FrequentlyBoughtTogetherFeaturesConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.Model$ModelFeaturesConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.Model$ModelFeaturesConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2.Model$PeriodicTuningState", "queryAllDeclaredConstructors": true, @@ -2231,6 +2366,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2.PurgeProductsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.PurgeProductsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.PurgeProductsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.PurgeProductsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.PurgeProductsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.PurgeProductsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2.PurgeUserEventsRequest", "queryAllDeclaredConstructors": true, @@ -2609,6 +2798,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2.Rule$ForceReturnFacetAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.Rule$ForceReturnFacetAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.Rule$ForceReturnFacetAction$FacetPositionAdjustment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.Rule$ForceReturnFacetAction$FacetPositionAdjustment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2.Rule$IgnoreAction", "queryAllDeclaredConstructors": true, @@ -2663,6 +2888,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2.Rule$RemoveFacetAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2.Rule$RemoveFacetAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2.Rule$ReplacementAction", "queryAllDeclaredConstructors": true, diff --git a/java-retail/google-cloud-retail/src/main/resources/META-INF/native-image/com.google.cloud.retail.v2alpha/reflect-config.json b/java-retail/google-cloud-retail/src/main/resources/META-INF/native-image/com.google.cloud.retail.v2alpha/reflect-config.json index b84c64d03a15..4ddb74374bb3 100644 --- a/java-retail/google-cloud-retail/src/main/resources/META-INF/native-image/com.google.cloud.retail.v2alpha/reflect-config.json +++ b/java-retail/google-cloud-retail/src/main/resources/META-INF/native-image/com.google.cloud.retail.v2alpha/reflect-config.json @@ -395,6 +395,96 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.location.GetLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.AcceptTermsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.AcceptTermsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2alpha.AddCatalogAttributeRequest", "queryAllDeclaredConstructors": true, @@ -539,6 +629,69 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2alpha.AlertConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.AlertConfig$AlertPolicy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.AlertConfig$AlertPolicy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.AlertConfig$AlertPolicy$EnrollStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.AlertConfig$AlertPolicy$Recipient", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.AlertConfig$AlertPolicy$Recipient$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.AlertConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2alpha.AttributeConfigLevel", "queryAllDeclaredConstructors": true, @@ -657,7 +810,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Catalog", + "name": "com.google.cloud.retail.v2alpha.Branch", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -666,7 +819,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Catalog$Builder", + "name": "com.google.cloud.retail.v2alpha.Branch$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -675,7 +828,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CatalogAttribute", + "name": "com.google.cloud.retail.v2alpha.Branch$ProductCountStatistic", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -684,7 +837,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$AttributeType", + "name": "com.google.cloud.retail.v2alpha.Branch$ProductCountStatistic$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -693,7 +846,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$Builder", + "name": "com.google.cloud.retail.v2alpha.Branch$ProductCountStatistic$ProductCountScope", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -702,7 +855,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$DynamicFacetableOption", + "name": "com.google.cloud.retail.v2alpha.Branch$QualityMetric", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -711,7 +864,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$ExactSearchableOption", + "name": "com.google.cloud.retail.v2alpha.Branch$QualityMetric$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -720,7 +873,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$IndexableOption", + "name": "com.google.cloud.retail.v2alpha.BranchView", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -729,7 +882,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$RetrievableOption", + "name": "com.google.cloud.retail.v2alpha.Catalog", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -738,7 +891,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$SearchableOption", + "name": "com.google.cloud.retail.v2alpha.Catalog$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -747,7 +900,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CollectUserEventRequest", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -756,7 +909,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CollectUserEventRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$AttributeType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -765,7 +918,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ColorInfo", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -774,7 +927,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ColorInfo$Builder", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$DynamicFacetableOption", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -783,7 +936,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompleteQueryRequest", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$ExactSearchableOption", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -792,7 +945,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompleteQueryRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$FacetConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -801,7 +954,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$FacetConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -810,7 +963,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse$AttributeResult", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$FacetConfig$IgnoredFacetValues", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -819,7 +972,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse$AttributeResult$Builder", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$FacetConfig$IgnoredFacetValues$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -828,7 +981,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse$Builder", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$FacetConfig$MergedFacet", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -837,7 +990,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse$CompletionResult", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$FacetConfig$MergedFacet$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -846,7 +999,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse$CompletionResult$Builder", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$FacetConfig$MergedFacetValue", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -855,7 +1008,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse$RecentSearchResult", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$FacetConfig$MergedFacetValue$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -864,7 +1017,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse$RecentSearchResult$Builder", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$FacetConfig$RerankConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -873,7 +1026,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompletionConfig", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$FacetConfig$RerankConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -882,7 +1035,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompletionConfig$Builder", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$IndexableOption", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -891,7 +1044,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompletionDataInputConfig", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$RetrievableOption", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -900,7 +1053,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompletionDataInputConfig$Builder", + "name": "com.google.cloud.retail.v2alpha.CatalogAttribute$SearchableOption", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -909,7 +1062,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompletionDetail", + "name": "com.google.cloud.retail.v2alpha.CollectUserEventRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -918,7 +1071,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CompletionDetail$Builder", + "name": "com.google.cloud.retail.v2alpha.CollectUserEventRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -927,7 +1080,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Condition", + "name": "com.google.cloud.retail.v2alpha.ColorInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -936,7 +1089,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Condition$Builder", + "name": "com.google.cloud.retail.v2alpha.ColorInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -945,7 +1098,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Condition$QueryTerm", + "name": "com.google.cloud.retail.v2alpha.CompleteQueryRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -954,7 +1107,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Condition$QueryTerm$Builder", + "name": "com.google.cloud.retail.v2alpha.CompleteQueryRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -963,7 +1116,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Condition$TimeRange", + "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -972,7 +1125,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Condition$TimeRange$Builder", + "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse$AttributeResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -981,7 +1134,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Control", + "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse$AttributeResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -990,7 +1143,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Control$Builder", + "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -999,7 +1152,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CreateControlRequest", + "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse$CompletionResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1008,7 +1161,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CreateControlRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse$CompletionResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1017,7 +1170,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkMetadata", + "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse$RecentSearchResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1026,7 +1179,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkMetadata$Builder", + "name": "com.google.cloud.retail.v2alpha.CompleteQueryResponse$RecentSearchResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1035,7 +1188,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest", + "name": "com.google.cloud.retail.v2alpha.CompletionConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1044,7 +1197,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.CompletionConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1053,7 +1206,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CreateModelMetadata", + "name": "com.google.cloud.retail.v2alpha.CompletionDataInputConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1062,7 +1215,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CreateModelMetadata$Builder", + "name": "com.google.cloud.retail.v2alpha.CompletionDataInputConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1071,7 +1224,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CreateModelRequest", + "name": "com.google.cloud.retail.v2alpha.CompletionDetail", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1080,7 +1233,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CreateModelRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.CompletionDetail$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1089,7 +1242,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CreateProductRequest", + "name": "com.google.cloud.retail.v2alpha.Condition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1098,7 +1251,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CreateProductRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.Condition$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1107,7 +1260,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CreateServingConfigRequest", + "name": "com.google.cloud.retail.v2alpha.Condition$QueryTerm", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1116,7 +1269,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CreateServingConfigRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.Condition$QueryTerm$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1125,7 +1278,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CustomAttribute", + "name": "com.google.cloud.retail.v2alpha.Condition$TimeRange", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1134,7 +1287,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.CustomAttribute$Builder", + "name": "com.google.cloud.retail.v2alpha.Condition$TimeRange$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1143,7 +1296,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.DeleteControlRequest", + "name": "com.google.cloud.retail.v2alpha.Control", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1152,7 +1305,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.DeleteControlRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.Control$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1161,7 +1314,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.DeleteMerchantCenterAccountLinkRequest", + "name": "com.google.cloud.retail.v2alpha.CreateControlRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1170,7 +1323,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.DeleteMerchantCenterAccountLinkRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.CreateControlRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1179,7 +1332,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.DeleteModelRequest", + "name": "com.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1188,7 +1341,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.DeleteModelRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1197,7 +1350,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.DeleteProductRequest", + "name": "com.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1206,7 +1359,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.DeleteProductRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1215,7 +1368,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.DeleteServingConfigRequest", + "name": "com.google.cloud.retail.v2alpha.CreateModelMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1224,7 +1377,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.DeleteServingConfigRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.CreateModelMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1233,7 +1386,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ExperimentInfo", + "name": "com.google.cloud.retail.v2alpha.CreateModelRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1242,7 +1395,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ExperimentInfo$Builder", + "name": "com.google.cloud.retail.v2alpha.CreateModelRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1251,7 +1404,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ExperimentInfo$ServingConfigExperiment", + "name": "com.google.cloud.retail.v2alpha.CreateProductRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1260,7 +1413,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ExperimentInfo$ServingConfigExperiment$Builder", + "name": "com.google.cloud.retail.v2alpha.CreateProductRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1269,7 +1422,223 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ExportAnalyticsMetricsRequest", + "name": "com.google.cloud.retail.v2alpha.CreateServingConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.CreateServingConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.CustomAttribute", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.CustomAttribute$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.DeleteControlRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.DeleteControlRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.DeleteMerchantCenterAccountLinkRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.DeleteMerchantCenterAccountLinkRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.DeleteModelRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.DeleteModelRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.DeleteProductRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.DeleteProductRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.DeleteServingConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.DeleteServingConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.EnrollSolutionMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.EnrollSolutionMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.EnrollSolutionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.EnrollSolutionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.EnrollSolutionResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.EnrollSolutionResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.ExperimentInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.ExperimentInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.ExperimentInfo$ServingConfigExperiment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.ExperimentInfo$ServingConfigExperiment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.ExportAnalyticsMetricsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1296,7 +1665,259 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ExportAnalyticsMetricsResponse$Builder", + "name": "com.google.cloud.retail.v2alpha.ExportAnalyticsMetricsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.ExportErrorsConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.ExportErrorsConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.ExportMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.ExportMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.ExportProductsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.ExportProductsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.ExportUserEventsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.ExportUserEventsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.FulfillmentInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.FulfillmentInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GcsOutputResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GcsOutputResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GcsSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GcsSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GetAlertConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GetAlertConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GetAttributesConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GetAttributesConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GetBranchRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GetBranchRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GetCompletionConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GetCompletionConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GetControlRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GetControlRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GetDefaultBranchRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GetDefaultBranchRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GetDefaultBranchResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.GetDefaultBranchResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1305,7 +1926,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ExportErrorsConfig", + "name": "com.google.cloud.retail.v2alpha.GetLoggingConfigRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1314,7 +1935,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ExportErrorsConfig$Builder", + "name": "com.google.cloud.retail.v2alpha.GetLoggingConfigRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1323,7 +1944,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ExportMetadata", + "name": "com.google.cloud.retail.v2alpha.GetModelRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1332,7 +1953,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ExportMetadata$Builder", + "name": "com.google.cloud.retail.v2alpha.GetModelRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1341,7 +1962,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ExportProductsResponse", + "name": "com.google.cloud.retail.v2alpha.GetProductRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1350,7 +1971,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ExportProductsResponse$Builder", + "name": "com.google.cloud.retail.v2alpha.GetProductRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1359,7 +1980,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ExportUserEventsResponse", + "name": "com.google.cloud.retail.v2alpha.GetProjectRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1368,7 +1989,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ExportUserEventsResponse$Builder", + "name": "com.google.cloud.retail.v2alpha.GetProjectRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1377,7 +1998,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.FulfillmentInfo", + "name": "com.google.cloud.retail.v2alpha.GetServingConfigRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1386,7 +2007,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.FulfillmentInfo$Builder", + "name": "com.google.cloud.retail.v2alpha.GetServingConfigRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1395,7 +2016,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GcsOutputResult", + "name": "com.google.cloud.retail.v2alpha.Image", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1404,7 +2025,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GcsOutputResult$Builder", + "name": "com.google.cloud.retail.v2alpha.Image$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1413,7 +2034,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GcsSource", + "name": "com.google.cloud.retail.v2alpha.ImportCompletionDataRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1422,7 +2043,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GcsSource$Builder", + "name": "com.google.cloud.retail.v2alpha.ImportCompletionDataRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1431,7 +2052,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetAttributesConfigRequest", + "name": "com.google.cloud.retail.v2alpha.ImportCompletionDataResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1440,7 +2061,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetAttributesConfigRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.ImportCompletionDataResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1449,7 +2070,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetCompletionConfigRequest", + "name": "com.google.cloud.retail.v2alpha.ImportErrorsConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1458,7 +2079,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetCompletionConfigRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.ImportErrorsConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1467,7 +2088,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetControlRequest", + "name": "com.google.cloud.retail.v2alpha.ImportMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1476,7 +2097,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetControlRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.ImportMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1485,7 +2106,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetDefaultBranchRequest", + "name": "com.google.cloud.retail.v2alpha.ImportProductsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1494,7 +2115,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetDefaultBranchRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.ImportProductsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1503,7 +2124,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetDefaultBranchResponse", + "name": "com.google.cloud.retail.v2alpha.ImportProductsRequest$ReconciliationMode", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1512,7 +2133,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetDefaultBranchResponse$Builder", + "name": "com.google.cloud.retail.v2alpha.ImportProductsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1521,7 +2142,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetModelRequest", + "name": "com.google.cloud.retail.v2alpha.ImportProductsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1530,7 +2151,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetModelRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.ImportUserEventsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1539,7 +2160,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetProductRequest", + "name": "com.google.cloud.retail.v2alpha.ImportUserEventsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1548,7 +2169,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetProductRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.ImportUserEventsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1557,7 +2178,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetServingConfigRequest", + "name": "com.google.cloud.retail.v2alpha.ImportUserEventsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1566,7 +2187,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.GetServingConfigRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.Interval", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1575,7 +2196,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Image", + "name": "com.google.cloud.retail.v2alpha.Interval$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1584,7 +2205,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Image$Builder", + "name": "com.google.cloud.retail.v2alpha.ListBranchesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1593,7 +2214,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportCompletionDataRequest", + "name": "com.google.cloud.retail.v2alpha.ListBranchesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1602,7 +2223,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportCompletionDataRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.ListBranchesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1611,7 +2232,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportCompletionDataResponse", + "name": "com.google.cloud.retail.v2alpha.ListBranchesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1620,7 +2241,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportCompletionDataResponse$Builder", + "name": "com.google.cloud.retail.v2alpha.ListCatalogsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1629,7 +2250,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportErrorsConfig", + "name": "com.google.cloud.retail.v2alpha.ListCatalogsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1638,7 +2259,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportErrorsConfig$Builder", + "name": "com.google.cloud.retail.v2alpha.ListCatalogsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1647,7 +2268,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportMetadata", + "name": "com.google.cloud.retail.v2alpha.ListCatalogsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1656,7 +2277,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportMetadata$Builder", + "name": "com.google.cloud.retail.v2alpha.ListControlsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1665,7 +2286,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportProductsRequest", + "name": "com.google.cloud.retail.v2alpha.ListControlsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1674,7 +2295,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportProductsRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.ListControlsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1683,7 +2304,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportProductsRequest$ReconciliationMode", + "name": "com.google.cloud.retail.v2alpha.ListControlsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1692,7 +2313,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportProductsResponse", + "name": "com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1701,7 +2322,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportProductsResponse$Builder", + "name": "com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1710,7 +2331,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportUserEventsRequest", + "name": "com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1719,7 +2340,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportUserEventsRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1728,7 +2349,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportUserEventsResponse", + "name": "com.google.cloud.retail.v2alpha.ListMerchantCenterAccountLinksRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1737,7 +2358,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ImportUserEventsResponse$Builder", + "name": "com.google.cloud.retail.v2alpha.ListMerchantCenterAccountLinksRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1746,7 +2367,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Interval", + "name": "com.google.cloud.retail.v2alpha.ListMerchantCenterAccountLinksResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1755,7 +2376,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Interval$Builder", + "name": "com.google.cloud.retail.v2alpha.ListMerchantCenterAccountLinksResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1764,7 +2385,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListCatalogsRequest", + "name": "com.google.cloud.retail.v2alpha.ListModelsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1773,7 +2394,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListCatalogsRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.ListModelsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1782,7 +2403,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListCatalogsResponse", + "name": "com.google.cloud.retail.v2alpha.ListModelsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1791,7 +2412,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListCatalogsResponse$Builder", + "name": "com.google.cloud.retail.v2alpha.ListModelsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1800,7 +2421,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListControlsRequest", + "name": "com.google.cloud.retail.v2alpha.ListProductsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1809,7 +2430,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListControlsRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.ListProductsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1818,7 +2439,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListControlsResponse", + "name": "com.google.cloud.retail.v2alpha.ListProductsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1827,7 +2448,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListControlsResponse$Builder", + "name": "com.google.cloud.retail.v2alpha.ListProductsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1836,7 +2457,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListMerchantCenterAccountLinksRequest", + "name": "com.google.cloud.retail.v2alpha.ListServingConfigsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1845,7 +2466,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListMerchantCenterAccountLinksRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.ListServingConfigsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1854,7 +2475,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListMerchantCenterAccountLinksResponse", + "name": "com.google.cloud.retail.v2alpha.ListServingConfigsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1863,7 +2484,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListMerchantCenterAccountLinksResponse$Builder", + "name": "com.google.cloud.retail.v2alpha.ListServingConfigsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1872,7 +2493,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListModelsRequest", + "name": "com.google.cloud.retail.v2alpha.LocalInventory", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1881,7 +2502,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListModelsRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.LocalInventory$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1890,7 +2511,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListModelsResponse", + "name": "com.google.cloud.retail.v2alpha.LoggingConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1899,7 +2520,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListModelsResponse$Builder", + "name": "com.google.cloud.retail.v2alpha.LoggingConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1908,7 +2529,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListProductsRequest", + "name": "com.google.cloud.retail.v2alpha.LoggingConfig$LogGenerationRule", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1917,7 +2538,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListProductsRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.LoggingConfig$LogGenerationRule$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1926,7 +2547,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListProductsResponse", + "name": "com.google.cloud.retail.v2alpha.LoggingConfig$LoggingLevel", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1935,7 +2556,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListProductsResponse$Builder", + "name": "com.google.cloud.retail.v2alpha.LoggingConfig$ServiceLogGenerationRule", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1944,7 +2565,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListServingConfigsRequest", + "name": "com.google.cloud.retail.v2alpha.LoggingConfig$ServiceLogGenerationRule$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1953,7 +2574,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListServingConfigsRequest$Builder", + "name": "com.google.cloud.retail.v2alpha.MerchantCenterAccountLink", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1962,7 +2583,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListServingConfigsResponse", + "name": "com.google.cloud.retail.v2alpha.MerchantCenterAccountLink$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1971,7 +2592,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.ListServingConfigsResponse$Builder", + "name": "com.google.cloud.retail.v2alpha.MerchantCenterAccountLink$MerchantCenterFeedFilter", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1980,7 +2601,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.LocalInventory", + "name": "com.google.cloud.retail.v2alpha.MerchantCenterAccountLink$MerchantCenterFeedFilter$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1989,7 +2610,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.LocalInventory$Builder", + "name": "com.google.cloud.retail.v2alpha.MerchantCenterAccountLink$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1998,7 +2619,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.MerchantCenterAccountLink", + "name": "com.google.cloud.retail.v2alpha.MerchantCenterFeedFilter", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2007,7 +2628,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.MerchantCenterAccountLink$Builder", + "name": "com.google.cloud.retail.v2alpha.MerchantCenterFeedFilter$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2016,7 +2637,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.MerchantCenterAccountLink$MerchantCenterFeedFilter", + "name": "com.google.cloud.retail.v2alpha.MerchantCenterLink", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2025,7 +2646,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.MerchantCenterAccountLink$MerchantCenterFeedFilter$Builder", + "name": "com.google.cloud.retail.v2alpha.MerchantCenterLink$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2034,7 +2655,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.MerchantCenterAccountLink$State", + "name": "com.google.cloud.retail.v2alpha.MerchantCenterLinkingConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2043,7 +2664,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.MerchantCenterFeedFilter", + "name": "com.google.cloud.retail.v2alpha.MerchantCenterLinkingConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2052,7 +2673,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.MerchantCenterFeedFilter$Builder", + "name": "com.google.cloud.retail.v2alpha.Model", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2061,7 +2682,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.MerchantCenterLink", + "name": "com.google.cloud.retail.v2alpha.Model$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2070,7 +2691,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.MerchantCenterLink$Builder", + "name": "com.google.cloud.retail.v2alpha.Model$ContextProductsType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2079,7 +2700,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.MerchantCenterLinkingConfig", + "name": "com.google.cloud.retail.v2alpha.Model$DataState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2088,7 +2709,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.MerchantCenterLinkingConfig$Builder", + "name": "com.google.cloud.retail.v2alpha.Model$FrequentlyBoughtTogetherFeaturesConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2097,7 +2718,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Model", + "name": "com.google.cloud.retail.v2alpha.Model$FrequentlyBoughtTogetherFeaturesConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2106,7 +2727,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Model$Builder", + "name": "com.google.cloud.retail.v2alpha.Model$ModelFeaturesConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2115,7 +2736,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.retail.v2alpha.Model$DataState", + "name": "com.google.cloud.retail.v2alpha.Model$ModelFeaturesConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2519,6 +3140,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2alpha.Project", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.Project$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2alpha.Promotion", "queryAllDeclaredConstructors": true, @@ -3005,6 +3644,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2alpha.Rule$ForceReturnFacetAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.Rule$ForceReturnFacetAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.Rule$ForceReturnFacetAction$FacetPositionAdjustment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.Rule$ForceReturnFacetAction$FacetPositionAdjustment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2alpha.Rule$IgnoreAction", "queryAllDeclaredConstructors": true, @@ -3059,6 +3734,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2alpha.Rule$RemoveFacetAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.Rule$RemoveFacetAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2alpha.Rule$ReplacementAction", "queryAllDeclaredConstructors": true, @@ -3590,6 +4283,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2alpha.UpdateAttributesConfigRequest", "queryAllDeclaredConstructors": true, @@ -3662,6 +4373,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2alpha.UpdateModelRequest", "queryAllDeclaredConstructors": true, diff --git a/java-retail/google-cloud-retail/src/main/resources/META-INF/native-image/com.google.cloud.retail.v2beta/reflect-config.json b/java-retail/google-cloud-retail/src/main/resources/META-INF/native-image/com.google.cloud.retail.v2beta/reflect-config.json index 580c11150355..508aaf805b69 100644 --- a/java-retail/google-cloud-retail/src/main/resources/META-INF/native-image/com.google.cloud.retail.v2beta/reflect-config.json +++ b/java-retail/google-cloud-retail/src/main/resources/META-INF/native-image/com.google.cloud.retail.v2beta/reflect-config.json @@ -719,6 +719,96 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2beta.CatalogAttribute$FacetConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.CatalogAttribute$FacetConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.CatalogAttribute$FacetConfig$IgnoredFacetValues", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.CatalogAttribute$FacetConfig$IgnoredFacetValues$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.CatalogAttribute$FacetConfig$MergedFacet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.CatalogAttribute$FacetConfig$MergedFacet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.CatalogAttribute$FacetConfig$MergedFacetValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.CatalogAttribute$FacetConfig$MergedFacetValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.CatalogAttribute$FacetConfig$RerankConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.CatalogAttribute$FacetConfig$RerankConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2beta.CatalogAttribute$IndexableOption", "queryAllDeclaredConstructors": true, @@ -1961,6 +2051,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2beta.Model$ContextProductsType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2beta.Model$DataState", "queryAllDeclaredConstructors": true, @@ -1970,6 +2069,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2beta.Model$FrequentlyBoughtTogetherFeaturesConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.Model$FrequentlyBoughtTogetherFeaturesConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.Model$ModelFeaturesConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.Model$ModelFeaturesConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2beta.Model$PeriodicTuningState", "queryAllDeclaredConstructors": true, @@ -2357,6 +2492,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2beta.PurgeProductsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.PurgeProductsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.PurgeProductsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.PurgeProductsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.PurgeProductsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.PurgeProductsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2beta.PurgeUserEventsRequest", "queryAllDeclaredConstructors": true, @@ -2735,6 +2924,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2beta.Rule$ForceReturnFacetAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.Rule$ForceReturnFacetAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.Rule$ForceReturnFacetAction$FacetPositionAdjustment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.Rule$ForceReturnFacetAction$FacetPositionAdjustment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2beta.Rule$IgnoreAction", "queryAllDeclaredConstructors": true, @@ -2789,6 +3014,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.retail.v2beta.Rule$RemoveFacetAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.retail.v2beta.Rule$RemoveFacetAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.retail.v2beta.Rule$ReplacementAction", "queryAllDeclaredConstructors": true, diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/CompletionServiceClientHttpJsonTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/CompletionServiceClientHttpJsonTest.java index dcee1bd1ce81..a0d78926dd1a 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/CompletionServiceClientHttpJsonTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/CompletionServiceClientHttpJsonTest.java @@ -95,6 +95,7 @@ public void completeQueryTest() throws Exception { .setDeviceType("deviceType781190832") .setDataset("dataset1443214456") .setMaxSuggestions(618824852) + .setEnableAttributeSuggestions(true) .setEntity("entity-1298275357") .build(); @@ -133,6 +134,7 @@ public void completeQueryExceptionTest() throws Exception { .setDeviceType("deviceType781190832") .setDataset("dataset1443214456") .setMaxSuggestions(618824852) + .setEnableAttributeSuggestions(true) .setEntity("entity-1298275357") .build(); client.completeQuery(request); diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/CompletionServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/CompletionServiceClientTest.java index e323dd7cd11c..f5f9c5d80bd4 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/CompletionServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/CompletionServiceClientTest.java @@ -100,6 +100,7 @@ public void completeQueryTest() throws Exception { .setDeviceType("deviceType781190832") .setDataset("dataset1443214456") .setMaxSuggestions(618824852) + .setEnableAttributeSuggestions(true) .setEntity("entity-1298275357") .build(); @@ -117,6 +118,8 @@ public void completeQueryTest() throws Exception { Assert.assertEquals(request.getDeviceType(), actualRequest.getDeviceType()); Assert.assertEquals(request.getDataset(), actualRequest.getDataset()); Assert.assertEquals(request.getMaxSuggestions(), actualRequest.getMaxSuggestions()); + Assert.assertEquals( + request.getEnableAttributeSuggestions(), actualRequest.getEnableAttributeSuggestions()); Assert.assertEquals(request.getEntity(), actualRequest.getEntity()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -139,6 +142,7 @@ public void completeQueryExceptionTest() throws Exception { .setDeviceType("deviceType781190832") .setDataset("dataset1443214456") .setMaxSuggestions(618824852) + .setEnableAttributeSuggestions(true) .setEntity("entity-1298275357") .build(); client.completeQuery(request); diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/MockProductServiceImpl.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/MockProductServiceImpl.java index cfa28d9178ec..9d71733ea74b 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/MockProductServiceImpl.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/MockProductServiceImpl.java @@ -163,6 +163,27 @@ public void deleteProduct(DeleteProductRequest request, StreamObserver re } } + @Override + public void purgeProducts( + PurgeProductsRequest 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 PurgeProducts, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + @Override public void importProducts( ImportProductsRequest request, StreamObserver responseObserver) { diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ModelServiceClientHttpJsonTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ModelServiceClientHttpJsonTest.java index aa741673bc4e..a2deed4de22c 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ModelServiceClientHttpJsonTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ModelServiceClientHttpJsonTest.java @@ -96,6 +96,7 @@ public void createModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -156,6 +157,7 @@ public void createModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -216,6 +218,7 @@ public void getModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -269,6 +272,7 @@ public void getModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -324,6 +328,7 @@ public void pauseModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -377,6 +382,7 @@ public void pauseModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -432,6 +438,7 @@ public void resumeModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -669,6 +676,7 @@ public void updateModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -684,6 +692,7 @@ public void updateModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -725,6 +734,7 @@ public void updateModelExceptionTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateModel(model, updateMask); diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ModelServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ModelServiceClientTest.java index b8f93a1a2545..a2a69b48a02b 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ModelServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ModelServiceClientTest.java @@ -100,6 +100,7 @@ public void createModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -158,6 +159,7 @@ public void createModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -216,6 +218,7 @@ public void getModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -263,6 +266,7 @@ public void getModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -310,6 +314,7 @@ public void pauseModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -357,6 +362,7 @@ public void pauseModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -404,6 +410,7 @@ public void resumeModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -607,6 +614,7 @@ public void updateModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ProductServiceClientHttpJsonTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ProductServiceClientHttpJsonTest.java index 1a61b6da4805..18d8c7250a33 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ProductServiceClientHttpJsonTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ProductServiceClientHttpJsonTest.java @@ -730,6 +730,67 @@ public void deleteProductExceptionTest2() throws Exception { } } + @Test + public void purgeProductsTest() throws Exception { + PurgeProductsResponse expectedResponse = + PurgeProductsResponse.newBuilder() + .setPurgeCount(575305851) + .addAllPurgeSample(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeProductsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent(BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + + PurgeProductsResponse actualResponse = client.purgeProductsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void purgeProductsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent( + BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + client.purgeProductsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + @Test public void importProductsTest() throws Exception { ImportProductsResponse expectedResponse = diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ProductServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ProductServiceClientTest.java index b68551c11e99..7e9884691f27 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ProductServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ProductServiceClientTest.java @@ -609,6 +609,66 @@ public void deleteProductExceptionTest2() throws Exception { } } + @Test + public void purgeProductsTest() throws Exception { + PurgeProductsResponse expectedResponse = + PurgeProductsResponse.newBuilder() + .setPurgeCount(575305851) + .addAllPurgeSample(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeProductsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProductService.addResponse(resultOperation); + + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent(BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + + PurgeProductsResponse actualResponse = client.purgeProductsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PurgeProductsRequest actualRequest = ((PurgeProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getForce(), actualRequest.getForce()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void purgeProductsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductService.addException(exception); + + try { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent( + BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + client.purgeProductsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void importProductsTest() throws Exception { ImportProductsResponse expectedResponse = diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ServingConfigServiceClientHttpJsonTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ServingConfigServiceClientHttpJsonTest.java index 15d65306be50..0d37127ac1dd 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ServingConfigServiceClientHttpJsonTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ServingConfigServiceClientHttpJsonTest.java @@ -100,6 +100,7 @@ public void createServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -168,6 +169,7 @@ public void createServingConfigTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -320,6 +322,7 @@ public void updateServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -345,6 +348,7 @@ public void updateServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -396,6 +400,7 @@ public void updateServingConfigExceptionTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -429,6 +434,7 @@ public void getServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -494,6 +500,7 @@ public void getServingConfigTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -659,6 +666,7 @@ public void addControlTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -724,6 +732,7 @@ public void addControlTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -789,6 +798,7 @@ public void removeControlTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -854,6 +864,7 @@ public void removeControlTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ServingConfigServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ServingConfigServiceClientTest.java index dd1b63c47854..03f3ce99e183 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ServingConfigServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ServingConfigServiceClientTest.java @@ -103,6 +103,7 @@ public void createServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -167,6 +168,7 @@ public void createServingConfigTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -301,6 +303,7 @@ public void updateServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -361,6 +364,7 @@ public void getServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -420,6 +424,7 @@ public void getServingConfigTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -565,6 +570,7 @@ public void addControlTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -624,6 +630,7 @@ public void addControlTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -681,6 +688,7 @@ public void removeControlTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -740,6 +748,7 @@ public void removeControlTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/AnalyticsServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/AnalyticsServiceClientTest.java index 7382c14d2707..3b389be2446d 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/AnalyticsServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/AnalyticsServiceClientTest.java @@ -46,6 +46,7 @@ @Generated("by gapic-generator-java") public class AnalyticsServiceClientTest { private static MockAnalyticsService mockAnalyticsService; + private static MockLocations mockLocations; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private AnalyticsServiceClient client; @@ -53,9 +54,11 @@ public class AnalyticsServiceClientTest { @BeforeClass public static void startStaticServer() { mockAnalyticsService = new MockAnalyticsService(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockAnalyticsService)); + UUID.randomUUID().toString(), + Arrays.asList(mockAnalyticsService, mockLocations)); mockServiceHelper.start(); } diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/BranchServiceClientHttpJsonTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/BranchServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..1259b27d034b --- /dev/null +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/BranchServiceClientHttpJsonTest.java @@ -0,0 +1,259 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.retail.v2alpha.stub.HttpJsonBranchServiceStub; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class BranchServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static BranchServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonBranchServiceStub.getMethodDescriptors(), + BranchServiceSettings.getDefaultEndpoint()); + BranchServiceSettings settings = + BranchServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + BranchServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = BranchServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listBranchesTest() throws Exception { + ListBranchesResponse expectedResponse = + ListBranchesResponse.newBuilder().addAllBranches(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + + ListBranchesResponse actualResponse = client.listBranches(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBranchesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + client.listBranches(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBranchesTest2() throws Exception { + ListBranchesResponse expectedResponse = + ListBranchesResponse.newBuilder().addAllBranches(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-6267/locations/location-6267/catalogs/catalog-6267"; + + ListBranchesResponse actualResponse = client.listBranches(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBranchesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-6267/locations/location-6267/catalogs/catalog-6267"; + client.listBranches(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBranchTest() throws Exception { + Branch expectedResponse = + Branch.newBuilder() + .setName(BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setDisplayName("displayName1714148973") + .setIsDefault(true) + .setLastProductImportTime(Timestamp.newBuilder().build()) + .addAllProductCountStats(new ArrayList()) + .addAllQualityMetrics(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + BranchName name = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"); + + Branch actualResponse = client.getBranch(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 getBranchExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BranchName name = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"); + client.getBranch(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBranchTest2() throws Exception { + Branch expectedResponse = + Branch.newBuilder() + .setName(BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setDisplayName("displayName1714148973") + .setIsDefault(true) + .setLastProductImportTime(Timestamp.newBuilder().build()) + .addAllProductCountStats(new ArrayList()) + .addAllQualityMetrics(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-8960/locations/location-8960/catalogs/catalog-8960/branches/branche-8960"; + + Branch actualResponse = client.getBranch(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 getBranchExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8960/locations/location-8960/catalogs/catalog-8960/branches/branche-8960"; + client.getBranch(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/BranchServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/BranchServiceClientTest.java new file mode 100644 index 000000000000..b73b7c64e064 --- /dev/null +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/BranchServiceClientTest.java @@ -0,0 +1,240 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class BranchServiceClientTest { + private static MockBranchService mockBranchService; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private BranchServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockBranchService = new MockBranchService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockBranchService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + BranchServiceSettings settings = + BranchServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = BranchServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listBranchesTest() throws Exception { + ListBranchesResponse expectedResponse = + ListBranchesResponse.newBuilder().addAllBranches(new ArrayList()).build(); + mockBranchService.addResponse(expectedResponse); + + CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + + ListBranchesResponse actualResponse = client.listBranches(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBranchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBranchesRequest actualRequest = ((ListBranchesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBranchesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBranchService.addException(exception); + + try { + CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + client.listBranches(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBranchesTest2() throws Exception { + ListBranchesResponse expectedResponse = + ListBranchesResponse.newBuilder().addAllBranches(new ArrayList()).build(); + mockBranchService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListBranchesResponse actualResponse = client.listBranches(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBranchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBranchesRequest actualRequest = ((ListBranchesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBranchesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBranchService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBranches(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBranchTest() throws Exception { + Branch expectedResponse = + Branch.newBuilder() + .setName(BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setDisplayName("displayName1714148973") + .setIsDefault(true) + .setLastProductImportTime(Timestamp.newBuilder().build()) + .addAllProductCountStats(new ArrayList()) + .addAllQualityMetrics(new ArrayList()) + .build(); + mockBranchService.addResponse(expectedResponse); + + BranchName name = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"); + + Branch actualResponse = client.getBranch(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBranchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBranchRequest actualRequest = ((GetBranchRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBranchExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBranchService.addException(exception); + + try { + BranchName name = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"); + client.getBranch(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBranchTest2() throws Exception { + Branch expectedResponse = + Branch.newBuilder() + .setName(BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setDisplayName("displayName1714148973") + .setIsDefault(true) + .setLastProductImportTime(Timestamp.newBuilder().build()) + .addAllProductCountStats(new ArrayList()) + .addAllQualityMetrics(new ArrayList()) + .build(); + mockBranchService.addResponse(expectedResponse); + + String name = "name3373707"; + + Branch actualResponse = client.getBranch(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBranchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBranchRequest actualRequest = ((GetBranchRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBranchExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBranchService.addException(exception); + + try { + String name = "name3373707"; + client.getBranch(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/CatalogServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/CatalogServiceClientTest.java index 8bb0a01917e6..61ea93a908d9 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/CatalogServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/CatalogServiceClientTest.java @@ -48,6 +48,7 @@ @Generated("by gapic-generator-java") public class CatalogServiceClientTest { private static MockCatalogService mockCatalogService; + private static MockLocations mockLocations; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private CatalogServiceClient client; @@ -55,9 +56,11 @@ public class CatalogServiceClientTest { @BeforeClass public static void startStaticServer() { mockCatalogService = new MockCatalogService(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockCatalogService)); + UUID.randomUUID().toString(), + Arrays.asList(mockCatalogService, mockLocations)); mockServiceHelper.start(); } diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/CompletionServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/CompletionServiceClientTest.java index d284e574d178..4cb8cf6613d7 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/CompletionServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/CompletionServiceClientTest.java @@ -47,6 +47,7 @@ @Generated("by gapic-generator-java") public class CompletionServiceClientTest { private static MockCompletionService mockCompletionService; + private static MockLocations mockLocations; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private CompletionServiceClient client; @@ -54,9 +55,11 @@ public class CompletionServiceClientTest { @BeforeClass public static void startStaticServer() { mockCompletionService = new MockCompletionService(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockCompletionService)); + UUID.randomUUID().toString(), + Arrays.asList(mockCompletionService, mockLocations)); mockServiceHelper.start(); } diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ControlServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ControlServiceClientTest.java index 0e55da8fffe3..c34e573e63ff 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ControlServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ControlServiceClientTest.java @@ -46,6 +46,7 @@ @Generated("by gapic-generator-java") public class ControlServiceClientTest { private static MockControlService mockControlService; + private static MockLocations mockLocations; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private ControlServiceClient client; @@ -53,9 +54,11 @@ public class ControlServiceClientTest { @BeforeClass public static void startStaticServer() { mockControlService = new MockControlService(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockControlService)); + UUID.randomUUID().toString(), + Arrays.asList(mockControlService, mockLocations)); mockServiceHelper.start(); } diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClientHttpJsonTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClientHttpJsonTest.java index fa1a2e5d1726..9f8885a75bd3 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClientHttpJsonTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClientHttpJsonTest.java @@ -181,6 +181,7 @@ public void createMerchantCenterAccountLinkTest() throws Exception { .setLanguageCode("languageCode-2092349083") .addAllFeedFilters(new ArrayList()) .setProjectId("projectId-894832108") + .setSource("source-896505829") .build(); Operation resultOperation = Operation.newBuilder() @@ -245,6 +246,7 @@ public void createMerchantCenterAccountLinkTest2() throws Exception { .setLanguageCode("languageCode-2092349083") .addAllFeedFilters(new ArrayList()) .setProjectId("projectId-894832108") + .setSource("source-896505829") .build(); Operation resultOperation = Operation.newBuilder() diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClientTest.java index 50f9bd37affb..83ee9b552c96 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClientTest.java @@ -45,6 +45,7 @@ @Generated("by gapic-generator-java") public class MerchantCenterAccountLinkServiceClientTest { + private static MockLocations mockLocations; private static MockMerchantCenterAccountLinkService mockMerchantCenterAccountLinkService; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; @@ -53,10 +54,11 @@ public class MerchantCenterAccountLinkServiceClientTest { @BeforeClass public static void startStaticServer() { mockMerchantCenterAccountLinkService = new MockMerchantCenterAccountLinkService(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( UUID.randomUUID().toString(), - Arrays.asList(mockMerchantCenterAccountLinkService)); + Arrays.asList(mockMerchantCenterAccountLinkService, mockLocations)); mockServiceHelper.start(); } @@ -177,6 +179,7 @@ public void createMerchantCenterAccountLinkTest() throws Exception { .setLanguageCode("languageCode-2092349083") .addAllFeedFilters(new ArrayList()) .setProjectId("projectId-894832108") + .setSource("source-896505829") .build(); Operation resultOperation = Operation.newBuilder() @@ -240,6 +243,7 @@ public void createMerchantCenterAccountLinkTest2() throws Exception { .setLanguageCode("languageCode-2092349083") .addAllFeedFilters(new ArrayList()) .setProjectId("projectId-894832108") + .setSource("source-896505829") .build(); Operation resultOperation = Operation.newBuilder() diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockBranchService.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockBranchService.java new file mode 100644 index 000000000000..0ecd18e9f903 --- /dev/null +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockBranchService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockBranchService implements MockGrpcService { + private final MockBranchServiceImpl serviceImpl; + + public MockBranchService() { + serviceImpl = new MockBranchServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockBranchServiceImpl.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockBranchServiceImpl.java new file mode 100644 index 000000000000..59e2c46be1fa --- /dev/null +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockBranchServiceImpl.java @@ -0,0 +1,101 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.retail.v2alpha.BranchServiceGrpc.BranchServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockBranchServiceImpl extends BranchServiceImplBase { + private List requests; + private Queue responses; + + public MockBranchServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listBranches( + ListBranchesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListBranchesResponse) { + requests.add(request); + responseObserver.onNext(((ListBranchesResponse) 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 ListBranches, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListBranchesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getBranch(GetBranchRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Branch) { + requests.add(request); + responseObserver.onNext(((Branch) 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 GetBranch, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Branch.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockLocations.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockLocations.java new file mode 100644 index 000000000000..b69c492f98ef --- /dev/null +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockLocationsImpl.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockLocationsImpl.java new file mode 100644 index 000000000000..1c620dbec672 --- /dev/null +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockLocationsImpl.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } +} diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockProjectService.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockProjectService.java new file mode 100644 index 000000000000..7a4d4c18c0cd --- /dev/null +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockProjectService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockProjectService implements MockGrpcService { + private final MockProjectServiceImpl serviceImpl; + + public MockProjectService() { + serviceImpl = new MockProjectServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockProjectServiceImpl.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockProjectServiceImpl.java new file mode 100644 index 000000000000..690d55a5ed28 --- /dev/null +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockProjectServiceImpl.java @@ -0,0 +1,228 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.retail.v2alpha.ProjectServiceGrpc.ProjectServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockProjectServiceImpl extends ProjectServiceImplBase { + private List requests; + private Queue responses; + + public MockProjectServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void getProject(GetProjectRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Project) { + requests.add(request); + responseObserver.onNext(((Project) 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 GetProject, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Project.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void acceptTerms(AcceptTermsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Project) { + requests.add(request); + responseObserver.onNext(((Project) 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 AcceptTerms, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Project.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void enrollSolution( + EnrollSolutionRequest 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 EnrollSolution, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listEnrolledSolutions( + ListEnrolledSolutionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListEnrolledSolutionsResponse) { + requests.add(request); + responseObserver.onNext(((ListEnrolledSolutionsResponse) 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 ListEnrolledSolutions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListEnrolledSolutionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLoggingConfig( + GetLoggingConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof LoggingConfig) { + requests.add(request); + responseObserver.onNext(((LoggingConfig) 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 GetLoggingConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + LoggingConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateLoggingConfig( + UpdateLoggingConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof LoggingConfig) { + requests.add(request); + responseObserver.onNext(((LoggingConfig) 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 UpdateLoggingConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + LoggingConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAlertConfig( + GetAlertConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AlertConfig) { + requests.add(request); + responseObserver.onNext(((AlertConfig) 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 GetAlertConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AlertConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAlertConfig( + UpdateAlertConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AlertConfig) { + requests.add(request); + responseObserver.onNext(((AlertConfig) 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 UpdateAlertConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AlertConfig.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientHttpJsonTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientHttpJsonTest.java index c6ff3fa18d44..b9d47bf40be3 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientHttpJsonTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientHttpJsonTest.java @@ -96,6 +96,7 @@ public void createModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -156,6 +157,7 @@ public void createModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -216,6 +218,7 @@ public void getModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -269,6 +272,7 @@ public void getModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -324,6 +328,7 @@ public void pauseModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -377,6 +382,7 @@ public void pauseModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -432,6 +438,7 @@ public void resumeModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -669,6 +676,7 @@ public void updateModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -684,6 +692,7 @@ public void updateModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -725,6 +734,7 @@ public void updateModelExceptionTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateModel(model, updateMask); diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientTest.java index 436704f6a4b7..ce7dd2a35048 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientTest.java @@ -50,6 +50,7 @@ @Generated("by gapic-generator-java") public class ModelServiceClientTest { + private static MockLocations mockLocations; private static MockModelService mockModelService; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; @@ -58,9 +59,11 @@ public class ModelServiceClientTest { @BeforeClass public static void startStaticServer() { mockModelService = new MockModelService(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockModelService)); + UUID.randomUUID().toString(), + Arrays.asList(mockModelService, mockLocations)); mockServiceHelper.start(); } @@ -100,6 +103,7 @@ public void createModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -158,6 +162,7 @@ public void createModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -216,6 +221,7 @@ public void getModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -263,6 +269,7 @@ public void getModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -310,6 +317,7 @@ public void pauseModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -357,6 +365,7 @@ public void pauseModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -404,6 +413,7 @@ public void resumeModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -607,6 +617,7 @@ public void updateModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/PredictionServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/PredictionServiceClientTest.java index 37b4b85ece7c..2c71f0680840 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/PredictionServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/PredictionServiceClientTest.java @@ -42,6 +42,7 @@ @Generated("by gapic-generator-java") public class PredictionServiceClientTest { + private static MockLocations mockLocations; private static MockPredictionService mockPredictionService; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; @@ -50,9 +51,11 @@ public class PredictionServiceClientTest { @BeforeClass public static void startStaticServer() { mockPredictionService = new MockPredictionService(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockPredictionService)); + UUID.randomUUID().toString(), + Arrays.asList(mockPredictionService, mockLocations)); mockServiceHelper.start(); } diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProductServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProductServiceClientTest.java index b3289903c913..251133dc3750 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProductServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProductServiceClientTest.java @@ -53,6 +53,7 @@ @Generated("by gapic-generator-java") public class ProductServiceClientTest { + private static MockLocations mockLocations; private static MockProductService mockProductService; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; @@ -61,9 +62,11 @@ public class ProductServiceClientTest { @BeforeClass public static void startStaticServer() { mockProductService = new MockProductService(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockProductService)); + UUID.randomUUID().toString(), + Arrays.asList(mockProductService, mockLocations)); mockServiceHelper.start(); } diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProjectServiceClientHttpJsonTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProjectServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..a94f9c06ccde --- /dev/null +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProjectServiceClientHttpJsonTest.java @@ -0,0 +1,701 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.retail.v2alpha.stub.HttpJsonProjectServiceStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ProjectServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static ProjectServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonProjectServiceStub.getMethodDescriptors(), + ProjectServiceSettings.getDefaultEndpoint()); + ProjectServiceSettings settings = + ProjectServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ProjectServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ProjectServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void getProjectTest() throws Exception { + Project expectedResponse = + Project.newBuilder() + .setName(RetailProjectName.of("[PROJECT]").toString()) + .addAllEnrolledSolutions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + RetailProjectName name = RetailProjectName.of("[PROJECT]"); + + Project actualResponse = client.getProject(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 getProjectExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RetailProjectName name = RetailProjectName.of("[PROJECT]"); + client.getProject(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProjectTest2() throws Exception { + Project expectedResponse = + Project.newBuilder() + .setName(RetailProjectName.of("[PROJECT]").toString()) + .addAllEnrolledSolutions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4503/retailProject"; + + Project actualResponse = client.getProject(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 getProjectExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4503/retailProject"; + client.getProject(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void acceptTermsTest() throws Exception { + Project expectedResponse = + Project.newBuilder() + .setName(RetailProjectName.of("[PROJECT]").toString()) + .addAllEnrolledSolutions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + RetailProjectName project = RetailProjectName.of("[PROJECT]"); + + Project actualResponse = client.acceptTerms(project); + 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 acceptTermsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RetailProjectName project = RetailProjectName.of("[PROJECT]"); + client.acceptTerms(project); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void acceptTermsTest2() throws Exception { + Project expectedResponse = + Project.newBuilder() + .setName(RetailProjectName.of("[PROJECT]").toString()) + .addAllEnrolledSolutions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String project = "projects/project-5109/retailProject"; + + Project actualResponse = client.acceptTerms(project); + 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 acceptTermsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String project = "projects/project-5109/retailProject"; + client.acceptTerms(project); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void enrollSolutionTest() throws Exception { + EnrollSolutionResponse expectedResponse = + EnrollSolutionResponse.newBuilder().setEnrolledSolution(SolutionType.forNumber(0)).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("enrollSolutionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + EnrollSolutionRequest request = + EnrollSolutionRequest.newBuilder() + .setProject(ProjectName.of("[PROJECT]").toString()) + .setSolution(SolutionType.forNumber(0)) + .build(); + + EnrollSolutionResponse actualResponse = client.enrollSolutionAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void enrollSolutionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + EnrollSolutionRequest request = + EnrollSolutionRequest.newBuilder() + .setProject(ProjectName.of("[PROJECT]").toString()) + .setSolution(SolutionType.forNumber(0)) + .build(); + client.enrollSolutionAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listEnrolledSolutionsTest() throws Exception { + ListEnrolledSolutionsResponse expectedResponse = + ListEnrolledSolutionsResponse.newBuilder() + .addAllEnrolledSolutions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListEnrolledSolutionsResponse actualResponse = client.listEnrolledSolutions(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listEnrolledSolutionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listEnrolledSolutions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEnrolledSolutionsTest2() throws Exception { + ListEnrolledSolutionsResponse expectedResponse = + ListEnrolledSolutionsResponse.newBuilder() + .addAllEnrolledSolutions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-2353"; + + ListEnrolledSolutionsResponse actualResponse = client.listEnrolledSolutions(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listEnrolledSolutionsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-2353"; + client.listEnrolledSolutions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLoggingConfigTest() throws Exception { + LoggingConfig expectedResponse = + LoggingConfig.newBuilder() + .setName(LoggingConfigName.of("[PROJECT]").toString()) + .setDefaultLogGenerationRule(LoggingConfig.LogGenerationRule.newBuilder().build()) + .addAllServiceLogGenerationRules( + new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + LoggingConfigName name = LoggingConfigName.of("[PROJECT]"); + + LoggingConfig actualResponse = client.getLoggingConfig(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 getLoggingConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LoggingConfigName name = LoggingConfigName.of("[PROJECT]"); + client.getLoggingConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLoggingConfigTest2() throws Exception { + LoggingConfig expectedResponse = + LoggingConfig.newBuilder() + .setName(LoggingConfigName.of("[PROJECT]").toString()) + .setDefaultLogGenerationRule(LoggingConfig.LogGenerationRule.newBuilder().build()) + .addAllServiceLogGenerationRules( + new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-1650/loggingConfig"; + + LoggingConfig actualResponse = client.getLoggingConfig(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 getLoggingConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-1650/loggingConfig"; + client.getLoggingConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateLoggingConfigTest() throws Exception { + LoggingConfig expectedResponse = + LoggingConfig.newBuilder() + .setName(LoggingConfigName.of("[PROJECT]").toString()) + .setDefaultLogGenerationRule(LoggingConfig.LogGenerationRule.newBuilder().build()) + .addAllServiceLogGenerationRules( + new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + LoggingConfig loggingConfig = + LoggingConfig.newBuilder() + .setName(LoggingConfigName.of("[PROJECT]").toString()) + .setDefaultLogGenerationRule(LoggingConfig.LogGenerationRule.newBuilder().build()) + .addAllServiceLogGenerationRules( + new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + LoggingConfig actualResponse = client.updateLoggingConfig(loggingConfig, 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 updateLoggingConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LoggingConfig loggingConfig = + LoggingConfig.newBuilder() + .setName(LoggingConfigName.of("[PROJECT]").toString()) + .setDefaultLogGenerationRule(LoggingConfig.LogGenerationRule.newBuilder().build()) + .addAllServiceLogGenerationRules( + new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateLoggingConfig(loggingConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAlertConfigTest() throws Exception { + AlertConfig expectedResponse = + AlertConfig.newBuilder() + .setName(AlertConfigName.of("[PROJECT]").toString()) + .addAllAlertPolicies(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + AlertConfigName name = AlertConfigName.of("[PROJECT]"); + + AlertConfig actualResponse = client.getAlertConfig(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 getAlertConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AlertConfigName name = AlertConfigName.of("[PROJECT]"); + client.getAlertConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAlertConfigTest2() throws Exception { + AlertConfig expectedResponse = + AlertConfig.newBuilder() + .setName(AlertConfigName.of("[PROJECT]").toString()) + .addAllAlertPolicies(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-5457/alertConfig"; + + AlertConfig actualResponse = client.getAlertConfig(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 getAlertConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-5457/alertConfig"; + client.getAlertConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAlertConfigTest() throws Exception { + AlertConfig expectedResponse = + AlertConfig.newBuilder() + .setName(AlertConfigName.of("[PROJECT]").toString()) + .addAllAlertPolicies(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + AlertConfig alertConfig = + AlertConfig.newBuilder() + .setName(AlertConfigName.of("[PROJECT]").toString()) + .addAllAlertPolicies(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AlertConfig actualResponse = client.updateAlertConfig(alertConfig, 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 updateAlertConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AlertConfig alertConfig = + AlertConfig.newBuilder() + .setName(AlertConfigName.of("[PROJECT]").toString()) + .addAllAlertPolicies(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAlertConfig(alertConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProjectServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProjectServiceClientTest.java new file mode 100644 index 000000000000..39f925784c2d --- /dev/null +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProjectServiceClientTest.java @@ -0,0 +1,619 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.FieldMask; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ProjectServiceClientTest { + private static MockLocations mockLocations; + private static MockProjectService mockProjectService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ProjectServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockProjectService = new MockProjectService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockProjectService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ProjectServiceSettings settings = + ProjectServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ProjectServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getProjectTest() throws Exception { + Project expectedResponse = + Project.newBuilder() + .setName(RetailProjectName.of("[PROJECT]").toString()) + .addAllEnrolledSolutions(new ArrayList()) + .build(); + mockProjectService.addResponse(expectedResponse); + + RetailProjectName name = RetailProjectName.of("[PROJECT]"); + + Project actualResponse = client.getProject(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProjectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProjectRequest actualRequest = ((GetProjectRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProjectExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProjectService.addException(exception); + + try { + RetailProjectName name = RetailProjectName.of("[PROJECT]"); + client.getProject(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProjectTest2() throws Exception { + Project expectedResponse = + Project.newBuilder() + .setName(RetailProjectName.of("[PROJECT]").toString()) + .addAllEnrolledSolutions(new ArrayList()) + .build(); + mockProjectService.addResponse(expectedResponse); + + String name = "name3373707"; + + Project actualResponse = client.getProject(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProjectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProjectRequest actualRequest = ((GetProjectRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProjectExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProjectService.addException(exception); + + try { + String name = "name3373707"; + client.getProject(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void acceptTermsTest() throws Exception { + Project expectedResponse = + Project.newBuilder() + .setName(RetailProjectName.of("[PROJECT]").toString()) + .addAllEnrolledSolutions(new ArrayList()) + .build(); + mockProjectService.addResponse(expectedResponse); + + RetailProjectName project = RetailProjectName.of("[PROJECT]"); + + Project actualResponse = client.acceptTerms(project); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProjectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcceptTermsRequest actualRequest = ((AcceptTermsRequest) actualRequests.get(0)); + + Assert.assertEquals(project.toString(), actualRequest.getProject()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acceptTermsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProjectService.addException(exception); + + try { + RetailProjectName project = RetailProjectName.of("[PROJECT]"); + client.acceptTerms(project); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void acceptTermsTest2() throws Exception { + Project expectedResponse = + Project.newBuilder() + .setName(RetailProjectName.of("[PROJECT]").toString()) + .addAllEnrolledSolutions(new ArrayList()) + .build(); + mockProjectService.addResponse(expectedResponse); + + String project = "project-309310695"; + + Project actualResponse = client.acceptTerms(project); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProjectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcceptTermsRequest actualRequest = ((AcceptTermsRequest) actualRequests.get(0)); + + Assert.assertEquals(project, actualRequest.getProject()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acceptTermsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProjectService.addException(exception); + + try { + String project = "project-309310695"; + client.acceptTerms(project); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void enrollSolutionTest() throws Exception { + EnrollSolutionResponse expectedResponse = + EnrollSolutionResponse.newBuilder().setEnrolledSolution(SolutionType.forNumber(0)).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("enrollSolutionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProjectService.addResponse(resultOperation); + + EnrollSolutionRequest request = + EnrollSolutionRequest.newBuilder() + .setProject(ProjectName.of("[PROJECT]").toString()) + .setSolution(SolutionType.forNumber(0)) + .build(); + + EnrollSolutionResponse actualResponse = client.enrollSolutionAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProjectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + EnrollSolutionRequest actualRequest = ((EnrollSolutionRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getProject(), actualRequest.getProject()); + Assert.assertEquals(request.getSolution(), actualRequest.getSolution()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void enrollSolutionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProjectService.addException(exception); + + try { + EnrollSolutionRequest request = + EnrollSolutionRequest.newBuilder() + .setProject(ProjectName.of("[PROJECT]").toString()) + .setSolution(SolutionType.forNumber(0)) + .build(); + client.enrollSolutionAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listEnrolledSolutionsTest() throws Exception { + ListEnrolledSolutionsResponse expectedResponse = + ListEnrolledSolutionsResponse.newBuilder() + .addAllEnrolledSolutions(new ArrayList()) + .build(); + mockProjectService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListEnrolledSolutionsResponse actualResponse = client.listEnrolledSolutions(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProjectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEnrolledSolutionsRequest actualRequest = + ((ListEnrolledSolutionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEnrolledSolutionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProjectService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listEnrolledSolutions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEnrolledSolutionsTest2() throws Exception { + ListEnrolledSolutionsResponse expectedResponse = + ListEnrolledSolutionsResponse.newBuilder() + .addAllEnrolledSolutions(new ArrayList()) + .build(); + mockProjectService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListEnrolledSolutionsResponse actualResponse = client.listEnrolledSolutions(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProjectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEnrolledSolutionsRequest actualRequest = + ((ListEnrolledSolutionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEnrolledSolutionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProjectService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listEnrolledSolutions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLoggingConfigTest() throws Exception { + LoggingConfig expectedResponse = + LoggingConfig.newBuilder() + .setName(LoggingConfigName.of("[PROJECT]").toString()) + .setDefaultLogGenerationRule(LoggingConfig.LogGenerationRule.newBuilder().build()) + .addAllServiceLogGenerationRules( + new ArrayList()) + .build(); + mockProjectService.addResponse(expectedResponse); + + LoggingConfigName name = LoggingConfigName.of("[PROJECT]"); + + LoggingConfig actualResponse = client.getLoggingConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProjectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLoggingConfigRequest actualRequest = ((GetLoggingConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLoggingConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProjectService.addException(exception); + + try { + LoggingConfigName name = LoggingConfigName.of("[PROJECT]"); + client.getLoggingConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLoggingConfigTest2() throws Exception { + LoggingConfig expectedResponse = + LoggingConfig.newBuilder() + .setName(LoggingConfigName.of("[PROJECT]").toString()) + .setDefaultLogGenerationRule(LoggingConfig.LogGenerationRule.newBuilder().build()) + .addAllServiceLogGenerationRules( + new ArrayList()) + .build(); + mockProjectService.addResponse(expectedResponse); + + String name = "name3373707"; + + LoggingConfig actualResponse = client.getLoggingConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProjectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLoggingConfigRequest actualRequest = ((GetLoggingConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLoggingConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProjectService.addException(exception); + + try { + String name = "name3373707"; + client.getLoggingConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateLoggingConfigTest() throws Exception { + LoggingConfig expectedResponse = + LoggingConfig.newBuilder() + .setName(LoggingConfigName.of("[PROJECT]").toString()) + .setDefaultLogGenerationRule(LoggingConfig.LogGenerationRule.newBuilder().build()) + .addAllServiceLogGenerationRules( + new ArrayList()) + .build(); + mockProjectService.addResponse(expectedResponse); + + LoggingConfig loggingConfig = LoggingConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + LoggingConfig actualResponse = client.updateLoggingConfig(loggingConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProjectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateLoggingConfigRequest actualRequest = ((UpdateLoggingConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(loggingConfig, actualRequest.getLoggingConfig()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateLoggingConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProjectService.addException(exception); + + try { + LoggingConfig loggingConfig = LoggingConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateLoggingConfig(loggingConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAlertConfigTest() throws Exception { + AlertConfig expectedResponse = + AlertConfig.newBuilder() + .setName(AlertConfigName.of("[PROJECT]").toString()) + .addAllAlertPolicies(new ArrayList()) + .build(); + mockProjectService.addResponse(expectedResponse); + + AlertConfigName name = AlertConfigName.of("[PROJECT]"); + + AlertConfig actualResponse = client.getAlertConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProjectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAlertConfigRequest actualRequest = ((GetAlertConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAlertConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProjectService.addException(exception); + + try { + AlertConfigName name = AlertConfigName.of("[PROJECT]"); + client.getAlertConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAlertConfigTest2() throws Exception { + AlertConfig expectedResponse = + AlertConfig.newBuilder() + .setName(AlertConfigName.of("[PROJECT]").toString()) + .addAllAlertPolicies(new ArrayList()) + .build(); + mockProjectService.addResponse(expectedResponse); + + String name = "name3373707"; + + AlertConfig actualResponse = client.getAlertConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProjectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAlertConfigRequest actualRequest = ((GetAlertConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAlertConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProjectService.addException(exception); + + try { + String name = "name3373707"; + client.getAlertConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAlertConfigTest() throws Exception { + AlertConfig expectedResponse = + AlertConfig.newBuilder() + .setName(AlertConfigName.of("[PROJECT]").toString()) + .addAllAlertPolicies(new ArrayList()) + .build(); + mockProjectService.addResponse(expectedResponse); + + AlertConfig alertConfig = AlertConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AlertConfig actualResponse = client.updateAlertConfig(alertConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProjectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAlertConfigRequest actualRequest = ((UpdateAlertConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(alertConfig, actualRequest.getAlertConfig()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAlertConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProjectService.addException(exception); + + try { + AlertConfig alertConfig = AlertConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAlertConfig(alertConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/SearchServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/SearchServiceClientTest.java index 522400d627e1..d8e115bd37c3 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/SearchServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/SearchServiceClientTest.java @@ -44,6 +44,7 @@ @Generated("by gapic-generator-java") public class SearchServiceClientTest { + private static MockLocations mockLocations; private static MockSearchService mockSearchService; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; @@ -52,9 +53,11 @@ public class SearchServiceClientTest { @BeforeClass public static void startStaticServer() { mockSearchService = new MockSearchService(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockSearchService)); + UUID.randomUUID().toString(), + Arrays.asList(mockSearchService, mockLocations)); mockServiceHelper.start(); } diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClientHttpJsonTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClientHttpJsonTest.java index ec6faa4c4919..4c0909e96154 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClientHttpJsonTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClientHttpJsonTest.java @@ -100,6 +100,7 @@ public void createServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -168,6 +169,7 @@ public void createServingConfigTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -320,6 +322,7 @@ public void updateServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -345,6 +348,7 @@ public void updateServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -396,6 +400,7 @@ public void updateServingConfigExceptionTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -429,6 +434,7 @@ public void getServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -494,6 +500,7 @@ public void getServingConfigTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -659,6 +666,7 @@ public void addControlTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -724,6 +732,7 @@ public void addControlTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -789,6 +798,7 @@ public void removeControlTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -854,6 +864,7 @@ public void removeControlTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClientTest.java index b004599894b8..88efc748b311 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClientTest.java @@ -45,6 +45,7 @@ @Generated("by gapic-generator-java") public class ServingConfigServiceClientTest { + private static MockLocations mockLocations; private static MockServiceHelper mockServiceHelper; private static MockServingConfigService mockServingConfigService; private LocalChannelProvider channelProvider; @@ -53,9 +54,11 @@ public class ServingConfigServiceClientTest { @BeforeClass public static void startStaticServer() { mockServingConfigService = new MockServingConfigService(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockServingConfigService)); + UUID.randomUUID().toString(), + Arrays.asList(mockServingConfigService, mockLocations)); mockServiceHelper.start(); } @@ -103,6 +106,7 @@ public void createServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -167,6 +171,7 @@ public void createServingConfigTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -301,6 +306,7 @@ public void updateServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -361,6 +367,7 @@ public void getServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -420,6 +427,7 @@ public void getServingConfigTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -565,6 +573,7 @@ public void addControlTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -624,6 +633,7 @@ public void addControlTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -681,6 +691,7 @@ public void removeControlTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -740,6 +751,7 @@ public void removeControlTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/UserEventServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/UserEventServiceClientTest.java index 268be5cb1e8f..edb1dddb505e 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/UserEventServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/UserEventServiceClientTest.java @@ -49,6 +49,7 @@ @Generated("by gapic-generator-java") public class UserEventServiceClientTest { + private static MockLocations mockLocations; private static MockServiceHelper mockServiceHelper; private static MockUserEventService mockUserEventService; private LocalChannelProvider channelProvider; @@ -57,9 +58,11 @@ public class UserEventServiceClientTest { @BeforeClass public static void startStaticServer() { mockUserEventService = new MockUserEventService(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockUserEventService)); + UUID.randomUUID().toString(), + Arrays.asList(mockUserEventService, mockLocations)); mockServiceHelper.start(); } diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CompletionServiceClientHttpJsonTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CompletionServiceClientHttpJsonTest.java index 93410ee17103..372bc6484f06 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CompletionServiceClientHttpJsonTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CompletionServiceClientHttpJsonTest.java @@ -95,6 +95,7 @@ public void completeQueryTest() throws Exception { .setDeviceType("deviceType781190832") .setDataset("dataset1443214456") .setMaxSuggestions(618824852) + .setEnableAttributeSuggestions(true) .setEntity("entity-1298275357") .build(); @@ -133,6 +134,7 @@ public void completeQueryExceptionTest() throws Exception { .setDeviceType("deviceType781190832") .setDataset("dataset1443214456") .setMaxSuggestions(618824852) + .setEnableAttributeSuggestions(true) .setEntity("entity-1298275357") .build(); client.completeQuery(request); diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CompletionServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CompletionServiceClientTest.java index f73755d30910..0e7273bc6ed7 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CompletionServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CompletionServiceClientTest.java @@ -100,6 +100,7 @@ public void completeQueryTest() throws Exception { .setDeviceType("deviceType781190832") .setDataset("dataset1443214456") .setMaxSuggestions(618824852) + .setEnableAttributeSuggestions(true) .setEntity("entity-1298275357") .build(); @@ -117,6 +118,8 @@ public void completeQueryTest() throws Exception { Assert.assertEquals(request.getDeviceType(), actualRequest.getDeviceType()); Assert.assertEquals(request.getDataset(), actualRequest.getDataset()); Assert.assertEquals(request.getMaxSuggestions(), actualRequest.getMaxSuggestions()); + Assert.assertEquals( + request.getEnableAttributeSuggestions(), actualRequest.getEnableAttributeSuggestions()); Assert.assertEquals(request.getEntity(), actualRequest.getEntity()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -139,6 +142,7 @@ public void completeQueryExceptionTest() throws Exception { .setDeviceType("deviceType781190832") .setDataset("dataset1443214456") .setMaxSuggestions(618824852) + .setEnableAttributeSuggestions(true) .setEntity("entity-1298275357") .build(); client.completeQuery(request); diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/MockProductServiceImpl.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/MockProductServiceImpl.java index e828c6d74f4b..687c1cc309a2 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/MockProductServiceImpl.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/MockProductServiceImpl.java @@ -163,6 +163,27 @@ public void deleteProduct(DeleteProductRequest request, StreamObserver re } } + @Override + public void purgeProducts( + PurgeProductsRequest 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 PurgeProducts, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + @Override public void importProducts( ImportProductsRequest request, StreamObserver responseObserver) { diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ModelServiceClientHttpJsonTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ModelServiceClientHttpJsonTest.java index d57daa80ffc2..255801c17a65 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ModelServiceClientHttpJsonTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ModelServiceClientHttpJsonTest.java @@ -96,6 +96,7 @@ public void createModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -156,6 +157,7 @@ public void createModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -216,6 +218,7 @@ public void getModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -269,6 +272,7 @@ public void getModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -324,6 +328,7 @@ public void pauseModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -377,6 +382,7 @@ public void pauseModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -432,6 +438,7 @@ public void resumeModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -669,6 +676,7 @@ public void updateModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -684,6 +692,7 @@ public void updateModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -725,6 +734,7 @@ public void updateModelExceptionTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateModel(model, updateMask); diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ModelServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ModelServiceClientTest.java index ddb88218baa9..df8c56edd76d 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ModelServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ModelServiceClientTest.java @@ -100,6 +100,7 @@ public void createModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -158,6 +159,7 @@ public void createModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -216,6 +218,7 @@ public void getModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -263,6 +266,7 @@ public void getModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -310,6 +314,7 @@ public void pauseModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -357,6 +362,7 @@ public void pauseModelTest2() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -404,6 +410,7 @@ public void resumeModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); @@ -607,6 +614,7 @@ public void updateModelTest() throws Exception { .setTuningOperation("tuningOperation-1269747150") .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) .addAllServingConfigLists(new ArrayList()) + .setModelFeaturesConfig(Model.ModelFeaturesConfig.newBuilder().build()) .build(); mockModelService.addResponse(expectedResponse); diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientHttpJsonTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientHttpJsonTest.java index 0e9375725d7a..fada361350bb 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientHttpJsonTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientHttpJsonTest.java @@ -730,6 +730,67 @@ public void deleteProductExceptionTest2() throws Exception { } } + @Test + public void purgeProductsTest() throws Exception { + PurgeProductsResponse expectedResponse = + PurgeProductsResponse.newBuilder() + .setPurgeCount(575305851) + .addAllPurgeSample(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeProductsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent(BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + + PurgeProductsResponse actualResponse = client.purgeProductsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void purgeProductsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent( + BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + client.purgeProductsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + @Test public void importProductsTest() throws Exception { ImportProductsResponse expectedResponse = diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientTest.java index 206bb369cf1e..222a45ce0cff 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientTest.java @@ -609,6 +609,66 @@ public void deleteProductExceptionTest2() throws Exception { } } + @Test + public void purgeProductsTest() throws Exception { + PurgeProductsResponse expectedResponse = + PurgeProductsResponse.newBuilder() + .setPurgeCount(575305851) + .addAllPurgeSample(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeProductsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProductService.addResponse(resultOperation); + + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent(BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + + PurgeProductsResponse actualResponse = client.purgeProductsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PurgeProductsRequest actualRequest = ((PurgeProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getForce(), actualRequest.getForce()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void purgeProductsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductService.addException(exception); + + try { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent( + BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + client.purgeProductsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void importProductsTest() throws Exception { ImportProductsResponse expectedResponse = diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientHttpJsonTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientHttpJsonTest.java index 59f871cb727c..436ca8ae5d94 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientHttpJsonTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientHttpJsonTest.java @@ -100,6 +100,7 @@ public void createServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -168,6 +169,7 @@ public void createServingConfigTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -320,6 +322,7 @@ public void updateServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -345,6 +348,7 @@ public void updateServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -396,6 +400,7 @@ public void updateServingConfigExceptionTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -429,6 +434,7 @@ public void getServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -494,6 +500,7 @@ public void getServingConfigTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -659,6 +666,7 @@ public void addControlTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -724,6 +732,7 @@ public void addControlTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -789,6 +798,7 @@ public void removeControlTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -854,6 +864,7 @@ public void removeControlTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); diff --git a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientTest.java b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientTest.java index 9722ae9493bb..ffa8e4053083 100644 --- a/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientTest.java +++ b/java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientTest.java @@ -103,6 +103,7 @@ public void createServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -167,6 +168,7 @@ public void createServingConfigTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -301,6 +303,7 @@ public void updateServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -361,6 +364,7 @@ public void getServingConfigTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -420,6 +424,7 @@ public void getServingConfigTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -565,6 +570,7 @@ public void addControlTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -624,6 +630,7 @@ public void addControlTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -681,6 +688,7 @@ public void removeControlTest() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); @@ -740,6 +748,7 @@ public void removeControlTest2() throws Exception { .addAllIgnoreControlIds(new ArrayList()) .setDiversityLevel("diversityLevel578206123") .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413") + .setIgnoreRecsDenylist(true) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) .addAllSolutionTypes(new ArrayList()) .build(); diff --git a/java-retail/grpc-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductServiceGrpc.java b/java-retail/grpc-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductServiceGrpc.java index 408b6177c34d..f360592c618f 100644 --- a/java-retail/grpc-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductServiceGrpc.java +++ b/java-retail/grpc-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductServiceGrpc.java @@ -247,6 +247,48 @@ private ProductServiceGrpc() {} return getDeleteProductMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2.PurgeProductsRequest, com.google.longrunning.Operation> + getPurgeProductsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PurgeProducts", + requestType = com.google.cloud.retail.v2.PurgeProductsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2.PurgeProductsRequest, com.google.longrunning.Operation> + getPurgeProductsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2.PurgeProductsRequest, com.google.longrunning.Operation> + getPurgeProductsMethod; + if ((getPurgeProductsMethod = ProductServiceGrpc.getPurgeProductsMethod) == null) { + synchronized (ProductServiceGrpc.class) { + if ((getPurgeProductsMethod = ProductServiceGrpc.getPurgeProductsMethod) == null) { + ProductServiceGrpc.getPurgeProductsMethod = + getPurgeProductsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PurgeProducts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2.PurgeProductsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ProductServiceMethodDescriptorSupplier("PurgeProducts")) + .build(); + } + } + } + return getPurgeProductsMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.retail.v2.ImportProductsRequest, com.google.longrunning.Operation> getImportProductsMethod; @@ -643,6 +685,34 @@ default void deleteProduct( getDeleteProductMethod(), responseObserver); } + /** + * + * + *
+     * Permanently deletes all selected [Product][google.cloud.retail.v2.Product]s
+     * under a branch.
+     * This process is asynchronous. If the request is valid, the removal will be
+     * enqueued and processed offline. Depending on the number of
+     * [Product][google.cloud.retail.v2.Product]s, this operation could take hours
+     * to complete. Before the operation completes, some
+     * [Product][google.cloud.retail.v2.Product]s may still be returned by
+     * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
+     * or
+     * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+     * Depending on the number of [Product][google.cloud.retail.v2.Product]s, this
+     * operation could take hours to complete. To get a sample of
+     * [Product][google.cloud.retail.v2.Product]s that would be deleted, set
+     * [PurgeProductsRequest.force][google.cloud.retail.v2.PurgeProductsRequest.force]
+     * to false.
+     * 
+ */ + default void purgeProducts( + com.google.cloud.retail.v2.PurgeProductsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getPurgeProductsMethod(), responseObserver); + } + /** * * @@ -720,10 +790,11 @@ default void setInventory( * * *
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
-     * method instead of
-     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]
+     * method.
      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -758,10 +829,11 @@ default void addFulfillmentPlaces(
      *
      *
      * 
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
-     * method instead of
-     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]
+     * method.
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -980,6 +1052,36 @@ public void deleteProduct(
           responseObserver);
     }
 
+    /**
+     *
+     *
+     * 
+     * Permanently deletes all selected [Product][google.cloud.retail.v2.Product]s
+     * under a branch.
+     * This process is asynchronous. If the request is valid, the removal will be
+     * enqueued and processed offline. Depending on the number of
+     * [Product][google.cloud.retail.v2.Product]s, this operation could take hours
+     * to complete. Before the operation completes, some
+     * [Product][google.cloud.retail.v2.Product]s may still be returned by
+     * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
+     * or
+     * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+     * Depending on the number of [Product][google.cloud.retail.v2.Product]s, this
+     * operation could take hours to complete. To get a sample of
+     * [Product][google.cloud.retail.v2.Product]s that would be deleted, set
+     * [PurgeProductsRequest.force][google.cloud.retail.v2.PurgeProductsRequest.force]
+     * to false.
+     * 
+ */ + public void purgeProducts( + com.google.cloud.retail.v2.PurgeProductsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPurgeProductsMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1061,10 +1163,11 @@ public void setInventory( * * *
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
-     * method instead of
-     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]
+     * method.
      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1101,10 +1204,11 @@ public void addFulfillmentPlaces(
      *
      *
      * 
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
-     * method instead of
-     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]
+     * method.
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1299,6 +1403,33 @@ public com.google.protobuf.Empty deleteProduct(
           getChannel(), getDeleteProductMethod(), getCallOptions(), request);
     }
 
+    /**
+     *
+     *
+     * 
+     * Permanently deletes all selected [Product][google.cloud.retail.v2.Product]s
+     * under a branch.
+     * This process is asynchronous. If the request is valid, the removal will be
+     * enqueued and processed offline. Depending on the number of
+     * [Product][google.cloud.retail.v2.Product]s, this operation could take hours
+     * to complete. Before the operation completes, some
+     * [Product][google.cloud.retail.v2.Product]s may still be returned by
+     * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
+     * or
+     * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+     * Depending on the number of [Product][google.cloud.retail.v2.Product]s, this
+     * operation could take hours to complete. To get a sample of
+     * [Product][google.cloud.retail.v2.Product]s that would be deleted, set
+     * [PurgeProductsRequest.force][google.cloud.retail.v2.PurgeProductsRequest.force]
+     * to false.
+     * 
+ */ + public com.google.longrunning.Operation purgeProducts( + com.google.cloud.retail.v2.PurgeProductsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPurgeProductsMethod(), getCallOptions(), request); + } + /** * * @@ -1374,10 +1505,11 @@ public com.google.longrunning.Operation setInventory( * * *
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
-     * method instead of
-     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]
+     * method.
      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1411,10 +1543,11 @@ public com.google.longrunning.Operation addFulfillmentPlaces(
      *
      *
      * 
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
-     * method instead of
-     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]
+     * method.
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1601,6 +1734,33 @@ protected ProductServiceFutureStub build(
           getChannel().newCall(getDeleteProductMethod(), getCallOptions()), request);
     }
 
+    /**
+     *
+     *
+     * 
+     * Permanently deletes all selected [Product][google.cloud.retail.v2.Product]s
+     * under a branch.
+     * This process is asynchronous. If the request is valid, the removal will be
+     * enqueued and processed offline. Depending on the number of
+     * [Product][google.cloud.retail.v2.Product]s, this operation could take hours
+     * to complete. Before the operation completes, some
+     * [Product][google.cloud.retail.v2.Product]s may still be returned by
+     * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
+     * or
+     * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+     * Depending on the number of [Product][google.cloud.retail.v2.Product]s, this
+     * operation could take hours to complete. To get a sample of
+     * [Product][google.cloud.retail.v2.Product]s that would be deleted, set
+     * [PurgeProductsRequest.force][google.cloud.retail.v2.PurgeProductsRequest.force]
+     * to false.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + purgeProducts(com.google.cloud.retail.v2.PurgeProductsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPurgeProductsMethod(), getCallOptions()), request); + } + /** * * @@ -1676,10 +1836,11 @@ protected ProductServiceFutureStub build( * * *
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
-     * method instead of
-     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]
+     * method.
      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1713,10 +1874,11 @@ protected ProductServiceFutureStub build(
      *
      *
      * 
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
-     * method instead of
-     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]
+     * method.
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1822,12 +1984,13 @@ protected ProductServiceFutureStub build(
   private static final int METHODID_LIST_PRODUCTS = 2;
   private static final int METHODID_UPDATE_PRODUCT = 3;
   private static final int METHODID_DELETE_PRODUCT = 4;
-  private static final int METHODID_IMPORT_PRODUCTS = 5;
-  private static final int METHODID_SET_INVENTORY = 6;
-  private static final int METHODID_ADD_FULFILLMENT_PLACES = 7;
-  private static final int METHODID_REMOVE_FULFILLMENT_PLACES = 8;
-  private static final int METHODID_ADD_LOCAL_INVENTORIES = 9;
-  private static final int METHODID_REMOVE_LOCAL_INVENTORIES = 10;
+  private static final int METHODID_PURGE_PRODUCTS = 5;
+  private static final int METHODID_IMPORT_PRODUCTS = 6;
+  private static final int METHODID_SET_INVENTORY = 7;
+  private static final int METHODID_ADD_FULFILLMENT_PLACES = 8;
+  private static final int METHODID_REMOVE_FULFILLMENT_PLACES = 9;
+  private static final int METHODID_ADD_LOCAL_INVENTORIES = 10;
+  private static final int METHODID_REMOVE_LOCAL_INVENTORIES = 11;
 
   private static final class MethodHandlers
       implements io.grpc.stub.ServerCalls.UnaryMethod,
@@ -1872,6 +2035,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv
               (com.google.cloud.retail.v2.DeleteProductRequest) request,
               (io.grpc.stub.StreamObserver) responseObserver);
           break;
+        case METHODID_PURGE_PRODUCTS:
+          serviceImpl.purgeProducts(
+              (com.google.cloud.retail.v2.PurgeProductsRequest) request,
+              (io.grpc.stub.StreamObserver) responseObserver);
+          break;
         case METHODID_IMPORT_PRODUCTS:
           serviceImpl.importProducts(
               (com.google.cloud.retail.v2.ImportProductsRequest) request,
@@ -1951,6 +2119,12 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser
                 new MethodHandlers<
                     com.google.cloud.retail.v2.DeleteProductRequest, com.google.protobuf.Empty>(
                     service, METHODID_DELETE_PRODUCT)))
+        .addMethod(
+            getPurgeProductsMethod(),
+            io.grpc.stub.ServerCalls.asyncUnaryCall(
+                new MethodHandlers<
+                    com.google.cloud.retail.v2.PurgeProductsRequest,
+                    com.google.longrunning.Operation>(service, METHODID_PURGE_PRODUCTS)))
         .addMethod(
             getImportProductsMethod(),
             io.grpc.stub.ServerCalls.asyncUnaryCall(
@@ -2043,6 +2217,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
                       .addMethod(getListProductsMethod())
                       .addMethod(getUpdateProductMethod())
                       .addMethod(getDeleteProductMethod())
+                      .addMethod(getPurgeProductsMethod())
                       .addMethod(getImportProductsMethod())
                       .addMethod(getSetInventoryMethod())
                       .addMethod(getAddFulfillmentPlacesMethod())
diff --git a/java-retail/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BranchServiceGrpc.java b/java-retail/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BranchServiceGrpc.java
new file mode 100644
index 000000000000..4f90b15c36a8
--- /dev/null
+++ b/java-retail/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BranchServiceGrpc.java
@@ -0,0 +1,523 @@
+/*
+ * Copyright 2024 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.retail.v2alpha;
+
+import static io.grpc.MethodDescriptor.generateFullMethodName;
+
+/**
+ *
+ *
+ * 
+ * Service for [Branch][google.cloud.retail.v2alpha.Branch] Management
+ * [Branch][google.cloud.retail.v2alpha.Branch]es are automatically created when
+ * a [Catalog][google.cloud.retail.v2alpha.Catalog] is created. There are fixed
+ * three branches in each catalog, and may use
+ * [ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches] method
+ * to get the details of all branches.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/retail/v2alpha/branch_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class BranchServiceGrpc { + + private BranchServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.retail.v2alpha.BranchService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.ListBranchesRequest, + com.google.cloud.retail.v2alpha.ListBranchesResponse> + getListBranchesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBranches", + requestType = com.google.cloud.retail.v2alpha.ListBranchesRequest.class, + responseType = com.google.cloud.retail.v2alpha.ListBranchesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.ListBranchesRequest, + com.google.cloud.retail.v2alpha.ListBranchesResponse> + getListBranchesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.ListBranchesRequest, + com.google.cloud.retail.v2alpha.ListBranchesResponse> + getListBranchesMethod; + if ((getListBranchesMethod = BranchServiceGrpc.getListBranchesMethod) == null) { + synchronized (BranchServiceGrpc.class) { + if ((getListBranchesMethod = BranchServiceGrpc.getListBranchesMethod) == null) { + BranchServiceGrpc.getListBranchesMethod = + getListBranchesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBranches")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.ListBranchesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.ListBranchesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BranchServiceMethodDescriptorSupplier("ListBranches")) + .build(); + } + } + } + return getListBranchesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.GetBranchRequest, com.google.cloud.retail.v2alpha.Branch> + getGetBranchMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBranch", + requestType = com.google.cloud.retail.v2alpha.GetBranchRequest.class, + responseType = com.google.cloud.retail.v2alpha.Branch.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.GetBranchRequest, com.google.cloud.retail.v2alpha.Branch> + getGetBranchMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.GetBranchRequest, + com.google.cloud.retail.v2alpha.Branch> + getGetBranchMethod; + if ((getGetBranchMethod = BranchServiceGrpc.getGetBranchMethod) == null) { + synchronized (BranchServiceGrpc.class) { + if ((getGetBranchMethod = BranchServiceGrpc.getGetBranchMethod) == null) { + BranchServiceGrpc.getGetBranchMethod = + getGetBranchMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBranch")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.GetBranchRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.Branch.getDefaultInstance())) + .setSchemaDescriptor(new BranchServiceMethodDescriptorSupplier("GetBranch")) + .build(); + } + } + } + return getGetBranchMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static BranchServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BranchServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BranchServiceStub(channel, callOptions); + } + }; + return BranchServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static BranchServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BranchServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BranchServiceBlockingStub(channel, callOptions); + } + }; + return BranchServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static BranchServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BranchServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BranchServiceFutureStub(channel, callOptions); + } + }; + return BranchServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for [Branch][google.cloud.retail.v2alpha.Branch] Management
+   * [Branch][google.cloud.retail.v2alpha.Branch]es are automatically created when
+   * a [Catalog][google.cloud.retail.v2alpha.Catalog] is created. There are fixed
+   * three branches in each catalog, and may use
+   * [ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches] method
+   * to get the details of all branches.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists all [Branch][google.cloud.retail.v2alpha.Branch]s under the specified
+     * parent [Catalog][google.cloud.retail.v2alpha.Catalog].
+     * 
+ */ + default void listBranches( + com.google.cloud.retail.v2alpha.ListBranchesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListBranchesMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves a [Branch][google.cloud.retail.v2alpha.Branch].
+     * 
+ */ + default void getBranch( + com.google.cloud.retail.v2alpha.GetBranchRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBranchMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service BranchService. + * + *
+   * Service for [Branch][google.cloud.retail.v2alpha.Branch] Management
+   * [Branch][google.cloud.retail.v2alpha.Branch]es are automatically created when
+   * a [Catalog][google.cloud.retail.v2alpha.Catalog] is created. There are fixed
+   * three branches in each catalog, and may use
+   * [ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches] method
+   * to get the details of all branches.
+   * 
+ */ + public abstract static class BranchServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return BranchServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service BranchService. + * + *
+   * Service for [Branch][google.cloud.retail.v2alpha.Branch] Management
+   * [Branch][google.cloud.retail.v2alpha.Branch]es are automatically created when
+   * a [Catalog][google.cloud.retail.v2alpha.Catalog] is created. There are fixed
+   * three branches in each catalog, and may use
+   * [ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches] method
+   * to get the details of all branches.
+   * 
+ */ + public static final class BranchServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private BranchServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BranchServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BranchServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all [Branch][google.cloud.retail.v2alpha.Branch]s under the specified
+     * parent [Catalog][google.cloud.retail.v2alpha.Catalog].
+     * 
+ */ + public void listBranches( + com.google.cloud.retail.v2alpha.ListBranchesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListBranchesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves a [Branch][google.cloud.retail.v2alpha.Branch].
+     * 
+ */ + public void getBranch( + com.google.cloud.retail.v2alpha.GetBranchRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBranchMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service BranchService. + * + *
+   * Service for [Branch][google.cloud.retail.v2alpha.Branch] Management
+   * [Branch][google.cloud.retail.v2alpha.Branch]es are automatically created when
+   * a [Catalog][google.cloud.retail.v2alpha.Catalog] is created. There are fixed
+   * three branches in each catalog, and may use
+   * [ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches] method
+   * to get the details of all branches.
+   * 
+ */ + public static final class BranchServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private BranchServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BranchServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BranchServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all [Branch][google.cloud.retail.v2alpha.Branch]s under the specified
+     * parent [Catalog][google.cloud.retail.v2alpha.Catalog].
+     * 
+ */ + public com.google.cloud.retail.v2alpha.ListBranchesResponse listBranches( + com.google.cloud.retail.v2alpha.ListBranchesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBranchesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves a [Branch][google.cloud.retail.v2alpha.Branch].
+     * 
+ */ + public com.google.cloud.retail.v2alpha.Branch getBranch( + com.google.cloud.retail.v2alpha.GetBranchRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBranchMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service BranchService. + * + *
+   * Service for [Branch][google.cloud.retail.v2alpha.Branch] Management
+   * [Branch][google.cloud.retail.v2alpha.Branch]es are automatically created when
+   * a [Catalog][google.cloud.retail.v2alpha.Catalog] is created. There are fixed
+   * three branches in each catalog, and may use
+   * [ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches] method
+   * to get the details of all branches.
+   * 
+ */ + public static final class BranchServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private BranchServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BranchServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BranchServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all [Branch][google.cloud.retail.v2alpha.Branch]s under the specified
+     * parent [Catalog][google.cloud.retail.v2alpha.Catalog].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.retail.v2alpha.ListBranchesResponse> + listBranches(com.google.cloud.retail.v2alpha.ListBranchesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBranchesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves a [Branch][google.cloud.retail.v2alpha.Branch].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.retail.v2alpha.Branch> + getBranch(com.google.cloud.retail.v2alpha.GetBranchRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBranchMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_BRANCHES = 0; + private static final int METHODID_GET_BRANCH = 1; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_BRANCHES: + serviceImpl.listBranches( + (com.google.cloud.retail.v2alpha.ListBranchesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_BRANCH: + serviceImpl.getBranch( + (com.google.cloud.retail.v2alpha.GetBranchRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListBranchesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.ListBranchesRequest, + com.google.cloud.retail.v2alpha.ListBranchesResponse>( + service, METHODID_LIST_BRANCHES))) + .addMethod( + getGetBranchMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.GetBranchRequest, + com.google.cloud.retail.v2alpha.Branch>(service, METHODID_GET_BRANCH))) + .build(); + } + + private abstract static class BranchServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + BranchServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.retail.v2alpha.BranchServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("BranchService"); + } + } + + private static final class BranchServiceFileDescriptorSupplier + extends BranchServiceBaseDescriptorSupplier { + BranchServiceFileDescriptorSupplier() {} + } + + private static final class BranchServiceMethodDescriptorSupplier + extends BranchServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + BranchServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (BranchServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new BranchServiceFileDescriptorSupplier()) + .addMethod(getListBranchesMethod()) + .addMethod(getGetBranchMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-retail/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceGrpc.java b/java-retail/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceGrpc.java index 6e2d6c75578b..1dd7b2db6cfc 100644 --- a/java-retail/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceGrpc.java +++ b/java-retail/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceGrpc.java @@ -813,10 +813,11 @@ default void setInventory( * * *
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
-     * method instead of
-     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]
+     * method.
      * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -851,10 +852,11 @@ default void addFulfillmentPlaces(
      *
      *
      * 
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
-     * method instead of
-     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]
+     * method.
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1184,10 +1186,11 @@ public void setInventory(
      *
      *
      * 
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
-     * method instead of
-     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]
+     * method.
      * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1224,10 +1227,11 @@ public void addFulfillmentPlaces(
      *
      *
      * 
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
-     * method instead of
-     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]
+     * method.
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1524,10 +1528,11 @@ public com.google.longrunning.Operation setInventory(
      *
      *
      * 
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
-     * method instead of
-     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]
+     * method.
      * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1561,10 +1566,11 @@ public com.google.longrunning.Operation addFulfillmentPlaces(
      *
      *
      * 
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
-     * method instead of
-     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]
+     * method.
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1856,10 +1862,11 @@ protected ProductServiceFutureStub build(
      *
      *
      * 
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
-     * method instead of
-     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]
+     * method.
      * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1893,10 +1900,11 @@ protected ProductServiceFutureStub build(
      *
      *
      * 
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
-     * method instead of
-     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]
+     * method.
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
diff --git a/java-retail/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProjectServiceGrpc.java b/java-retail/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProjectServiceGrpc.java
new file mode 100644
index 000000000000..0a429b3f86ed
--- /dev/null
+++ b/java-retail/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProjectServiceGrpc.java
@@ -0,0 +1,1259 @@
+/*
+ * Copyright 2024 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.retail.v2alpha;
+
+import static io.grpc.MethodDescriptor.generateFullMethodName;
+
+/**
+ *
+ *
+ * 
+ * Service for settings at Project level.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/retail/v2alpha/project_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ProjectServiceGrpc { + + private ProjectServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.retail.v2alpha.ProjectService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.GetProjectRequest, + com.google.cloud.retail.v2alpha.Project> + getGetProjectMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProject", + requestType = com.google.cloud.retail.v2alpha.GetProjectRequest.class, + responseType = com.google.cloud.retail.v2alpha.Project.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.GetProjectRequest, + com.google.cloud.retail.v2alpha.Project> + getGetProjectMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.GetProjectRequest, + com.google.cloud.retail.v2alpha.Project> + getGetProjectMethod; + if ((getGetProjectMethod = ProjectServiceGrpc.getGetProjectMethod) == null) { + synchronized (ProjectServiceGrpc.class) { + if ((getGetProjectMethod = ProjectServiceGrpc.getGetProjectMethod) == null) { + ProjectServiceGrpc.getGetProjectMethod = + getGetProjectMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProject")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.GetProjectRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.Project.getDefaultInstance())) + .setSchemaDescriptor(new ProjectServiceMethodDescriptorSupplier("GetProject")) + .build(); + } + } + } + return getGetProjectMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.AcceptTermsRequest, + com.google.cloud.retail.v2alpha.Project> + getAcceptTermsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AcceptTerms", + requestType = com.google.cloud.retail.v2alpha.AcceptTermsRequest.class, + responseType = com.google.cloud.retail.v2alpha.Project.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.AcceptTermsRequest, + com.google.cloud.retail.v2alpha.Project> + getAcceptTermsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.AcceptTermsRequest, + com.google.cloud.retail.v2alpha.Project> + getAcceptTermsMethod; + if ((getAcceptTermsMethod = ProjectServiceGrpc.getAcceptTermsMethod) == null) { + synchronized (ProjectServiceGrpc.class) { + if ((getAcceptTermsMethod = ProjectServiceGrpc.getAcceptTermsMethod) == null) { + ProjectServiceGrpc.getAcceptTermsMethod = + getAcceptTermsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AcceptTerms")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.AcceptTermsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.Project.getDefaultInstance())) + .setSchemaDescriptor( + new ProjectServiceMethodDescriptorSupplier("AcceptTerms")) + .build(); + } + } + } + return getAcceptTermsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.EnrollSolutionRequest, com.google.longrunning.Operation> + getEnrollSolutionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "EnrollSolution", + requestType = com.google.cloud.retail.v2alpha.EnrollSolutionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.EnrollSolutionRequest, com.google.longrunning.Operation> + getEnrollSolutionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.EnrollSolutionRequest, com.google.longrunning.Operation> + getEnrollSolutionMethod; + if ((getEnrollSolutionMethod = ProjectServiceGrpc.getEnrollSolutionMethod) == null) { + synchronized (ProjectServiceGrpc.class) { + if ((getEnrollSolutionMethod = ProjectServiceGrpc.getEnrollSolutionMethod) == null) { + ProjectServiceGrpc.getEnrollSolutionMethod = + getEnrollSolutionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "EnrollSolution")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.EnrollSolutionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ProjectServiceMethodDescriptorSupplier("EnrollSolution")) + .build(); + } + } + } + return getEnrollSolutionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest, + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse> + getListEnrolledSolutionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEnrolledSolutions", + requestType = com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest.class, + responseType = com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest, + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse> + getListEnrolledSolutionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest, + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse> + getListEnrolledSolutionsMethod; + if ((getListEnrolledSolutionsMethod = ProjectServiceGrpc.getListEnrolledSolutionsMethod) + == null) { + synchronized (ProjectServiceGrpc.class) { + if ((getListEnrolledSolutionsMethod = ProjectServiceGrpc.getListEnrolledSolutionsMethod) + == null) { + ProjectServiceGrpc.getListEnrolledSolutionsMethod = + getListEnrolledSolutionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListEnrolledSolutions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ProjectServiceMethodDescriptorSupplier("ListEnrolledSolutions")) + .build(); + } + } + } + return getListEnrolledSolutionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.GetLoggingConfigRequest, + com.google.cloud.retail.v2alpha.LoggingConfig> + getGetLoggingConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetLoggingConfig", + requestType = com.google.cloud.retail.v2alpha.GetLoggingConfigRequest.class, + responseType = com.google.cloud.retail.v2alpha.LoggingConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.GetLoggingConfigRequest, + com.google.cloud.retail.v2alpha.LoggingConfig> + getGetLoggingConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.GetLoggingConfigRequest, + com.google.cloud.retail.v2alpha.LoggingConfig> + getGetLoggingConfigMethod; + if ((getGetLoggingConfigMethod = ProjectServiceGrpc.getGetLoggingConfigMethod) == null) { + synchronized (ProjectServiceGrpc.class) { + if ((getGetLoggingConfigMethod = ProjectServiceGrpc.getGetLoggingConfigMethod) == null) { + ProjectServiceGrpc.getGetLoggingConfigMethod = + getGetLoggingConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLoggingConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.GetLoggingConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.LoggingConfig.getDefaultInstance())) + .setSchemaDescriptor( + new ProjectServiceMethodDescriptorSupplier("GetLoggingConfig")) + .build(); + } + } + } + return getGetLoggingConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest, + com.google.cloud.retail.v2alpha.LoggingConfig> + getUpdateLoggingConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateLoggingConfig", + requestType = com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest.class, + responseType = com.google.cloud.retail.v2alpha.LoggingConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest, + com.google.cloud.retail.v2alpha.LoggingConfig> + getUpdateLoggingConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest, + com.google.cloud.retail.v2alpha.LoggingConfig> + getUpdateLoggingConfigMethod; + if ((getUpdateLoggingConfigMethod = ProjectServiceGrpc.getUpdateLoggingConfigMethod) == null) { + synchronized (ProjectServiceGrpc.class) { + if ((getUpdateLoggingConfigMethod = ProjectServiceGrpc.getUpdateLoggingConfigMethod) + == null) { + ProjectServiceGrpc.getUpdateLoggingConfigMethod = + getUpdateLoggingConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateLoggingConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.LoggingConfig.getDefaultInstance())) + .setSchemaDescriptor( + new ProjectServiceMethodDescriptorSupplier("UpdateLoggingConfig")) + .build(); + } + } + } + return getUpdateLoggingConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.GetAlertConfigRequest, + com.google.cloud.retail.v2alpha.AlertConfig> + getGetAlertConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAlertConfig", + requestType = com.google.cloud.retail.v2alpha.GetAlertConfigRequest.class, + responseType = com.google.cloud.retail.v2alpha.AlertConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.GetAlertConfigRequest, + com.google.cloud.retail.v2alpha.AlertConfig> + getGetAlertConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.GetAlertConfigRequest, + com.google.cloud.retail.v2alpha.AlertConfig> + getGetAlertConfigMethod; + if ((getGetAlertConfigMethod = ProjectServiceGrpc.getGetAlertConfigMethod) == null) { + synchronized (ProjectServiceGrpc.class) { + if ((getGetAlertConfigMethod = ProjectServiceGrpc.getGetAlertConfigMethod) == null) { + ProjectServiceGrpc.getGetAlertConfigMethod = + getGetAlertConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlertConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.GetAlertConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.AlertConfig.getDefaultInstance())) + .setSchemaDescriptor( + new ProjectServiceMethodDescriptorSupplier("GetAlertConfig")) + .build(); + } + } + } + return getGetAlertConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest, + com.google.cloud.retail.v2alpha.AlertConfig> + getUpdateAlertConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAlertConfig", + requestType = com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest.class, + responseType = com.google.cloud.retail.v2alpha.AlertConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest, + com.google.cloud.retail.v2alpha.AlertConfig> + getUpdateAlertConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest, + com.google.cloud.retail.v2alpha.AlertConfig> + getUpdateAlertConfigMethod; + if ((getUpdateAlertConfigMethod = ProjectServiceGrpc.getUpdateAlertConfigMethod) == null) { + synchronized (ProjectServiceGrpc.class) { + if ((getUpdateAlertConfigMethod = ProjectServiceGrpc.getUpdateAlertConfigMethod) == null) { + ProjectServiceGrpc.getUpdateAlertConfigMethod = + getUpdateAlertConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAlertConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.AlertConfig.getDefaultInstance())) + .setSchemaDescriptor( + new ProjectServiceMethodDescriptorSupplier("UpdateAlertConfig")) + .build(); + } + } + } + return getUpdateAlertConfigMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ProjectServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProjectServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProjectServiceStub(channel, callOptions); + } + }; + return ProjectServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ProjectServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProjectServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProjectServiceBlockingStub(channel, callOptions); + } + }; + return ProjectServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ProjectServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProjectServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProjectServiceFutureStub(channel, callOptions); + } + }; + return ProjectServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for settings at Project level.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Gets the project.
+     * Throws `NOT_FOUND` if the project wasn't initialized for the Retail API
+     * service.
+     * 
+ */ + default void getProject( + com.google.cloud.retail.v2alpha.GetProjectRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProjectMethod(), responseObserver); + } + + /** + * + * + *
+     * Accepts service terms for this project.
+     * By making requests to this API, you agree to the terms of service linked
+     * below.
+     * https://cloud.google.com/retail/data-use-terms
+     * 
+ */ + default void acceptTerms( + com.google.cloud.retail.v2alpha.AcceptTermsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAcceptTermsMethod(), responseObserver); + } + + /** + * + * + *
+     * The method enrolls a solution of type [Retail
+     * Search][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_SEARCH]
+     * into a project.
+     * The [Recommendations AI solution
+     * type][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
+     * is enrolled by default when your project enables Retail API, so you don't
+     * need to call the enrollSolution method for recommendations.
+     * 
+ */ + default void enrollSolution( + com.google.cloud.retail.v2alpha.EnrollSolutionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getEnrollSolutionMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all the retail API solutions the project has enrolled.
+     * 
+ */ + default void listEnrolledSolutions( + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListEnrolledSolutionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of the
+     * requested project.
+     * 
+ */ + default void getLoggingConfig( + com.google.cloud.retail.v2alpha.GetLoggingConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetLoggingConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of
+     * the requested project.
+     * 
+ */ + default void updateLoggingConfig( + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateLoggingConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Get the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] of the
+     * requested project.
+     * 
+ */ + default void getAlertConfig( + com.google.cloud.retail.v2alpha.GetAlertConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAlertConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Update the alert config of the requested project.
+     * 
+ */ + default void updateAlertConfig( + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAlertConfigMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service ProjectService. + * + *
+   * Service for settings at Project level.
+   * 
+ */ + public abstract static class ProjectServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return ProjectServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service ProjectService. + * + *
+   * Service for settings at Project level.
+   * 
+ */ + public static final class ProjectServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private ProjectServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProjectServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProjectServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets the project.
+     * Throws `NOT_FOUND` if the project wasn't initialized for the Retail API
+     * service.
+     * 
+ */ + public void getProject( + com.google.cloud.retail.v2alpha.GetProjectRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProjectMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Accepts service terms for this project.
+     * By making requests to this API, you agree to the terms of service linked
+     * below.
+     * https://cloud.google.com/retail/data-use-terms
+     * 
+ */ + public void acceptTerms( + com.google.cloud.retail.v2alpha.AcceptTermsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAcceptTermsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * The method enrolls a solution of type [Retail
+     * Search][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_SEARCH]
+     * into a project.
+     * The [Recommendations AI solution
+     * type][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
+     * is enrolled by default when your project enables Retail API, so you don't
+     * need to call the enrollSolution method for recommendations.
+     * 
+ */ + public void enrollSolution( + com.google.cloud.retail.v2alpha.EnrollSolutionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getEnrollSolutionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all the retail API solutions the project has enrolled.
+     * 
+ */ + public void listEnrolledSolutions( + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListEnrolledSolutionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of the
+     * requested project.
+     * 
+ */ + public void getLoggingConfig( + com.google.cloud.retail.v2alpha.GetLoggingConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetLoggingConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of
+     * the requested project.
+     * 
+ */ + public void updateLoggingConfig( + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateLoggingConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] of the
+     * requested project.
+     * 
+ */ + public void getAlertConfig( + com.google.cloud.retail.v2alpha.GetAlertConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAlertConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update the alert config of the requested project.
+     * 
+ */ + public void updateAlertConfig( + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAlertConfigMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service ProjectService. + * + *
+   * Service for settings at Project level.
+   * 
+ */ + public static final class ProjectServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ProjectServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProjectServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProjectServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets the project.
+     * Throws `NOT_FOUND` if the project wasn't initialized for the Retail API
+     * service.
+     * 
+ */ + public com.google.cloud.retail.v2alpha.Project getProject( + com.google.cloud.retail.v2alpha.GetProjectRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProjectMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Accepts service terms for this project.
+     * By making requests to this API, you agree to the terms of service linked
+     * below.
+     * https://cloud.google.com/retail/data-use-terms
+     * 
+ */ + public com.google.cloud.retail.v2alpha.Project acceptTerms( + com.google.cloud.retail.v2alpha.AcceptTermsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAcceptTermsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * The method enrolls a solution of type [Retail
+     * Search][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_SEARCH]
+     * into a project.
+     * The [Recommendations AI solution
+     * type][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
+     * is enrolled by default when your project enables Retail API, so you don't
+     * need to call the enrollSolution method for recommendations.
+     * 
+ */ + public com.google.longrunning.Operation enrollSolution( + com.google.cloud.retail.v2alpha.EnrollSolutionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getEnrollSolutionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all the retail API solutions the project has enrolled.
+     * 
+ */ + public com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse listEnrolledSolutions( + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListEnrolledSolutionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of the
+     * requested project.
+     * 
+ */ + public com.google.cloud.retail.v2alpha.LoggingConfig getLoggingConfig( + com.google.cloud.retail.v2alpha.GetLoggingConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetLoggingConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of
+     * the requested project.
+     * 
+ */ + public com.google.cloud.retail.v2alpha.LoggingConfig updateLoggingConfig( + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateLoggingConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] of the
+     * requested project.
+     * 
+ */ + public com.google.cloud.retail.v2alpha.AlertConfig getAlertConfig( + com.google.cloud.retail.v2alpha.GetAlertConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAlertConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update the alert config of the requested project.
+     * 
+ */ + public com.google.cloud.retail.v2alpha.AlertConfig updateAlertConfig( + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAlertConfigMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service ProjectService. + * + *
+   * Service for settings at Project level.
+   * 
+ */ + public static final class ProjectServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ProjectServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProjectServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProjectServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets the project.
+     * Throws `NOT_FOUND` if the project wasn't initialized for the Retail API
+     * service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.retail.v2alpha.Project> + getProject(com.google.cloud.retail.v2alpha.GetProjectRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProjectMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Accepts service terms for this project.
+     * By making requests to this API, you agree to the terms of service linked
+     * below.
+     * https://cloud.google.com/retail/data-use-terms
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.retail.v2alpha.Project> + acceptTerms(com.google.cloud.retail.v2alpha.AcceptTermsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAcceptTermsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * The method enrolls a solution of type [Retail
+     * Search][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_SEARCH]
+     * into a project.
+     * The [Recommendations AI solution
+     * type][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
+     * is enrolled by default when your project enables Retail API, so you don't
+     * need to call the enrollSolution method for recommendations.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + enrollSolution(com.google.cloud.retail.v2alpha.EnrollSolutionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getEnrollSolutionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all the retail API solutions the project has enrolled.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse> + listEnrolledSolutions( + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListEnrolledSolutionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of the
+     * requested project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.retail.v2alpha.LoggingConfig> + getLoggingConfig(com.google.cloud.retail.v2alpha.GetLoggingConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetLoggingConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of
+     * the requested project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.retail.v2alpha.LoggingConfig> + updateLoggingConfig(com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateLoggingConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] of the
+     * requested project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.retail.v2alpha.AlertConfig> + getAlertConfig(com.google.cloud.retail.v2alpha.GetAlertConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAlertConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update the alert config of the requested project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.retail.v2alpha.AlertConfig> + updateAlertConfig(com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAlertConfigMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_PROJECT = 0; + private static final int METHODID_ACCEPT_TERMS = 1; + private static final int METHODID_ENROLL_SOLUTION = 2; + private static final int METHODID_LIST_ENROLLED_SOLUTIONS = 3; + private static final int METHODID_GET_LOGGING_CONFIG = 4; + private static final int METHODID_UPDATE_LOGGING_CONFIG = 5; + private static final int METHODID_GET_ALERT_CONFIG = 6; + private static final int METHODID_UPDATE_ALERT_CONFIG = 7; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_PROJECT: + serviceImpl.getProject( + (com.google.cloud.retail.v2alpha.GetProjectRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_ACCEPT_TERMS: + serviceImpl.acceptTerms( + (com.google.cloud.retail.v2alpha.AcceptTermsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_ENROLL_SOLUTION: + serviceImpl.enrollSolution( + (com.google.cloud.retail.v2alpha.EnrollSolutionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_ENROLLED_SOLUTIONS: + serviceImpl.listEnrolledSolutions( + (com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse>) + responseObserver); + break; + case METHODID_GET_LOGGING_CONFIG: + serviceImpl.getLoggingConfig( + (com.google.cloud.retail.v2alpha.GetLoggingConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_LOGGING_CONFIG: + serviceImpl.updateLoggingConfig( + (com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ALERT_CONFIG: + serviceImpl.getAlertConfig( + (com.google.cloud.retail.v2alpha.GetAlertConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_ALERT_CONFIG: + serviceImpl.updateAlertConfig( + (com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetProjectMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.GetProjectRequest, + com.google.cloud.retail.v2alpha.Project>(service, METHODID_GET_PROJECT))) + .addMethod( + getAcceptTermsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.AcceptTermsRequest, + com.google.cloud.retail.v2alpha.Project>(service, METHODID_ACCEPT_TERMS))) + .addMethod( + getEnrollSolutionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.EnrollSolutionRequest, + com.google.longrunning.Operation>(service, METHODID_ENROLL_SOLUTION))) + .addMethod( + getListEnrolledSolutionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest, + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse>( + service, METHODID_LIST_ENROLLED_SOLUTIONS))) + .addMethod( + getGetLoggingConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.GetLoggingConfigRequest, + com.google.cloud.retail.v2alpha.LoggingConfig>( + service, METHODID_GET_LOGGING_CONFIG))) + .addMethod( + getUpdateLoggingConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest, + com.google.cloud.retail.v2alpha.LoggingConfig>( + service, METHODID_UPDATE_LOGGING_CONFIG))) + .addMethod( + getGetAlertConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.GetAlertConfigRequest, + com.google.cloud.retail.v2alpha.AlertConfig>( + service, METHODID_GET_ALERT_CONFIG))) + .addMethod( + getUpdateAlertConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest, + com.google.cloud.retail.v2alpha.AlertConfig>( + service, METHODID_UPDATE_ALERT_CONFIG))) + .build(); + } + + private abstract static class ProjectServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ProjectServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ProjectService"); + } + } + + private static final class ProjectServiceFileDescriptorSupplier + extends ProjectServiceBaseDescriptorSupplier { + ProjectServiceFileDescriptorSupplier() {} + } + + private static final class ProjectServiceMethodDescriptorSupplier + extends ProjectServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + ProjectServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ProjectServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ProjectServiceFileDescriptorSupplier()) + .addMethod(getGetProjectMethod()) + .addMethod(getAcceptTermsMethod()) + .addMethod(getEnrollSolutionMethod()) + .addMethod(getListEnrolledSolutionsMethod()) + .addMethod(getGetLoggingConfigMethod()) + .addMethod(getUpdateLoggingConfigMethod()) + .addMethod(getGetAlertConfigMethod()) + .addMethod(getUpdateAlertConfigMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-retail/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceGrpc.java b/java-retail/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceGrpc.java index c828af1bea68..534cb46152d9 100644 --- a/java-retail/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceGrpc.java +++ b/java-retail/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceGrpc.java @@ -261,6 +261,49 @@ private ProductServiceGrpc() {} return getDeleteProductMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.PurgeProductsRequest, com.google.longrunning.Operation> + getPurgeProductsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PurgeProducts", + requestType = com.google.cloud.retail.v2beta.PurgeProductsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.PurgeProductsRequest, com.google.longrunning.Operation> + getPurgeProductsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.PurgeProductsRequest, com.google.longrunning.Operation> + getPurgeProductsMethod; + if ((getPurgeProductsMethod = ProductServiceGrpc.getPurgeProductsMethod) == null) { + synchronized (ProductServiceGrpc.class) { + if ((getPurgeProductsMethod = ProductServiceGrpc.getPurgeProductsMethod) == null) { + ProductServiceGrpc.getPurgeProductsMethod = + getPurgeProductsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PurgeProducts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2beta.PurgeProductsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ProductServiceMethodDescriptorSupplier("PurgeProducts")) + .build(); + } + } + } + return getPurgeProductsMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.retail.v2beta.ImportProductsRequest, com.google.longrunning.Operation> getImportProductsMethod; @@ -663,6 +706,34 @@ default void deleteProduct( getDeleteProductMethod(), responseObserver); } + /** + * + * + *
+     * Permanently deletes all selected
+     * [Product][google.cloud.retail.v2beta.Product]s under a branch.
+     * This process is asynchronous. If the request is valid, the removal will be
+     * enqueued and processed offline. Depending on the number of
+     * [Product][google.cloud.retail.v2beta.Product]s, this operation could take
+     * hours to complete. Before the operation completes, some
+     * [Product][google.cloud.retail.v2beta.Product]s may still be returned by
+     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
+     * or
+     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+     * Depending on the number of [Product][google.cloud.retail.v2beta.Product]s,
+     * this operation could take hours to complete. To get a sample of
+     * [Product][google.cloud.retail.v2beta.Product]s that would be deleted, set
+     * [PurgeProductsRequest.force][google.cloud.retail.v2beta.PurgeProductsRequest.force]
+     * to false.
+     * 
+ */ + default void purgeProducts( + com.google.cloud.retail.v2beta.PurgeProductsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getPurgeProductsMethod(), responseObserver); + } + /** * * @@ -740,10 +811,11 @@ default void setInventory( * * *
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
-     * method instead of
-     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]
+     * method.
      * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -778,10 +850,11 @@ default void addFulfillmentPlaces(
      *
      *
      * 
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
-     * method instead of
-     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]
+     * method.
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1000,6 +1073,36 @@ public void deleteProduct(
           responseObserver);
     }
 
+    /**
+     *
+     *
+     * 
+     * Permanently deletes all selected
+     * [Product][google.cloud.retail.v2beta.Product]s under a branch.
+     * This process is asynchronous. If the request is valid, the removal will be
+     * enqueued and processed offline. Depending on the number of
+     * [Product][google.cloud.retail.v2beta.Product]s, this operation could take
+     * hours to complete. Before the operation completes, some
+     * [Product][google.cloud.retail.v2beta.Product]s may still be returned by
+     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
+     * or
+     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+     * Depending on the number of [Product][google.cloud.retail.v2beta.Product]s,
+     * this operation could take hours to complete. To get a sample of
+     * [Product][google.cloud.retail.v2beta.Product]s that would be deleted, set
+     * [PurgeProductsRequest.force][google.cloud.retail.v2beta.PurgeProductsRequest.force]
+     * to false.
+     * 
+ */ + public void purgeProducts( + com.google.cloud.retail.v2beta.PurgeProductsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPurgeProductsMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1081,10 +1184,11 @@ public void setInventory( * * *
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
-     * method instead of
-     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]
+     * method.
      * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1121,10 +1225,11 @@ public void addFulfillmentPlaces(
      *
      *
      * 
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
-     * method instead of
-     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]
+     * method.
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1319,6 +1424,33 @@ public com.google.protobuf.Empty deleteProduct(
           getChannel(), getDeleteProductMethod(), getCallOptions(), request);
     }
 
+    /**
+     *
+     *
+     * 
+     * Permanently deletes all selected
+     * [Product][google.cloud.retail.v2beta.Product]s under a branch.
+     * This process is asynchronous. If the request is valid, the removal will be
+     * enqueued and processed offline. Depending on the number of
+     * [Product][google.cloud.retail.v2beta.Product]s, this operation could take
+     * hours to complete. Before the operation completes, some
+     * [Product][google.cloud.retail.v2beta.Product]s may still be returned by
+     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
+     * or
+     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+     * Depending on the number of [Product][google.cloud.retail.v2beta.Product]s,
+     * this operation could take hours to complete. To get a sample of
+     * [Product][google.cloud.retail.v2beta.Product]s that would be deleted, set
+     * [PurgeProductsRequest.force][google.cloud.retail.v2beta.PurgeProductsRequest.force]
+     * to false.
+     * 
+ */ + public com.google.longrunning.Operation purgeProducts( + com.google.cloud.retail.v2beta.PurgeProductsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPurgeProductsMethod(), getCallOptions(), request); + } + /** * * @@ -1394,10 +1526,11 @@ public com.google.longrunning.Operation setInventory( * * *
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
-     * method instead of
-     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]
+     * method.
      * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1431,10 +1564,11 @@ public com.google.longrunning.Operation addFulfillmentPlaces(
      *
      *
      * 
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
-     * method instead of
-     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]
+     * method.
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1624,6 +1758,33 @@ protected ProductServiceFutureStub build(
           getChannel().newCall(getDeleteProductMethod(), getCallOptions()), request);
     }
 
+    /**
+     *
+     *
+     * 
+     * Permanently deletes all selected
+     * [Product][google.cloud.retail.v2beta.Product]s under a branch.
+     * This process is asynchronous. If the request is valid, the removal will be
+     * enqueued and processed offline. Depending on the number of
+     * [Product][google.cloud.retail.v2beta.Product]s, this operation could take
+     * hours to complete. Before the operation completes, some
+     * [Product][google.cloud.retail.v2beta.Product]s may still be returned by
+     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
+     * or
+     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+     * Depending on the number of [Product][google.cloud.retail.v2beta.Product]s,
+     * this operation could take hours to complete. To get a sample of
+     * [Product][google.cloud.retail.v2beta.Product]s that would be deleted, set
+     * [PurgeProductsRequest.force][google.cloud.retail.v2beta.PurgeProductsRequest.force]
+     * to false.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + purgeProducts(com.google.cloud.retail.v2beta.PurgeProductsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPurgeProductsMethod(), getCallOptions()), request); + } + /** * * @@ -1699,10 +1860,11 @@ protected ProductServiceFutureStub build( * * *
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
-     * method instead of
-     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]
+     * method.
      * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1736,10 +1898,11 @@ protected ProductServiceFutureStub build(
      *
      *
      * 
-     * It is recommended to use the
+     * We recommend that you use the
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
-     * method instead of
-     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces].
+     * method instead of the
+     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]
+     * method.
      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
      * achieves the same results but provides more fine-grained control over
      * ingesting local inventory data.
@@ -1847,12 +2010,13 @@ protected ProductServiceFutureStub build(
   private static final int METHODID_LIST_PRODUCTS = 2;
   private static final int METHODID_UPDATE_PRODUCT = 3;
   private static final int METHODID_DELETE_PRODUCT = 4;
-  private static final int METHODID_IMPORT_PRODUCTS = 5;
-  private static final int METHODID_SET_INVENTORY = 6;
-  private static final int METHODID_ADD_FULFILLMENT_PLACES = 7;
-  private static final int METHODID_REMOVE_FULFILLMENT_PLACES = 8;
-  private static final int METHODID_ADD_LOCAL_INVENTORIES = 9;
-  private static final int METHODID_REMOVE_LOCAL_INVENTORIES = 10;
+  private static final int METHODID_PURGE_PRODUCTS = 5;
+  private static final int METHODID_IMPORT_PRODUCTS = 6;
+  private static final int METHODID_SET_INVENTORY = 7;
+  private static final int METHODID_ADD_FULFILLMENT_PLACES = 8;
+  private static final int METHODID_REMOVE_FULFILLMENT_PLACES = 9;
+  private static final int METHODID_ADD_LOCAL_INVENTORIES = 10;
+  private static final int METHODID_REMOVE_LOCAL_INVENTORIES = 11;
 
   private static final class MethodHandlers
       implements io.grpc.stub.ServerCalls.UnaryMethod,
@@ -1900,6 +2064,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv
               (com.google.cloud.retail.v2beta.DeleteProductRequest) request,
               (io.grpc.stub.StreamObserver) responseObserver);
           break;
+        case METHODID_PURGE_PRODUCTS:
+          serviceImpl.purgeProducts(
+              (com.google.cloud.retail.v2beta.PurgeProductsRequest) request,
+              (io.grpc.stub.StreamObserver) responseObserver);
+          break;
         case METHODID_IMPORT_PRODUCTS:
           serviceImpl.importProducts(
               (com.google.cloud.retail.v2beta.ImportProductsRequest) request,
@@ -1979,6 +2148,12 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser
                 new MethodHandlers<
                     com.google.cloud.retail.v2beta.DeleteProductRequest, com.google.protobuf.Empty>(
                     service, METHODID_DELETE_PRODUCT)))
+        .addMethod(
+            getPurgeProductsMethod(),
+            io.grpc.stub.ServerCalls.asyncUnaryCall(
+                new MethodHandlers<
+                    com.google.cloud.retail.v2beta.PurgeProductsRequest,
+                    com.google.longrunning.Operation>(service, METHODID_PURGE_PRODUCTS)))
         .addMethod(
             getImportProductsMethod(),
             io.grpc.stub.ServerCalls.asyncUnaryCall(
@@ -2071,6 +2246,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
                       .addMethod(getListProductsMethod())
                       .addMethod(getUpdateProductMethod())
                       .addMethod(getDeleteProductMethod())
+                      .addMethod(getPurgeProductsMethod())
                       .addMethod(getImportProductsMethod())
                       .addMethod(getSetInventoryMethod())
                       .addMethod(getAddFulfillmentPlacesMethod())
diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogAttribute.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogAttribute.java
index 291448cdc00f..854cf8b9c0a3 100644
--- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogAttribute.java
+++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogAttribute.java
@@ -1031,6 +1031,7808 @@ private RetrievableOption(int value) {
     // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2.CatalogAttribute.RetrievableOption)
   }
 
+  public interface FacetConfigOrBuilder
+      extends
+      // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.CatalogAttribute.FacetConfig)
+      com.google.protobuf.MessageOrBuilder {
+
+    /**
+     *
+     *
+     * 
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+     * interval must have a lower bound or an upper bound. If both bounds are
+     * provided, then the lower bound must be smaller or equal than the upper
+     * bound.
+     * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + java.util.List getFacetIntervalsList(); + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+     * interval must have a lower bound or an upper bound. If both bounds are
+     * provided, then the lower bound must be smaller or equal than the upper
+     * bound.
+     * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + com.google.cloud.retail.v2.Interval getFacetIntervals(int index); + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+     * interval must have a lower bound or an upper bound. If both bounds are
+     * provided, then the lower bound must be smaller or equal than the upper
+     * bound.
+     * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + int getFacetIntervalsCount(); + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+     * interval must have a lower bound or an upper bound. If both bounds are
+     * provided, then the lower bound must be smaller or equal than the upper
+     * bound.
+     * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + java.util.List + getFacetIntervalsOrBuilderList(); + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+     * interval must have a lower bound or an upper bound. If both bounds are
+     * provided, then the lower bound must be smaller or equal than the upper
+     * bound.
+     * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + com.google.cloud.retail.v2.IntervalOrBuilder getFacetIntervalsOrBuilder(int index); + + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + java.util.List + getIgnoredFacetValuesList(); + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + getIgnoredFacetValues(int index); + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + int getIgnoredFacetValuesCount(); + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder> + getIgnoredFacetValuesOrBuilderList(); + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder + getIgnoredFacetValuesOrBuilder(int index); + + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+     * feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + java.util.List + getMergedFacetValuesList(); + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+     * feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue getMergedFacetValues( + int index); + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+     * feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + int getMergedFacetValuesCount(); + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+     * feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder> + getMergedFacetValuesOrBuilderList(); + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+     * feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder + getMergedFacetValuesOrBuilder(int index); + + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return Whether the mergedFacet field is set. + */ + boolean hasMergedFacet(); + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return The mergedFacet. + */ + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet getMergedFacet(); + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetOrBuilder + getMergedFacetOrBuilder(); + + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return Whether the rerankConfig field is set. + */ + boolean hasRerankConfig(); + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return The rerankConfig. + */ + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig getRerankConfig(); + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfigOrBuilder + getRerankConfigOrBuilder(); + } + /** + * + * + *
+   * Possible options for the facet that corresponds to the current attribute
+   * config.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2.CatalogAttribute.FacetConfig} + */ + public static final class FacetConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.CatalogAttribute.FacetConfig) + FacetConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use FacetConfig.newBuilder() to construct. + private FacetConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FacetConfig() { + facetIntervals_ = java.util.Collections.emptyList(); + ignoredFacetValues_ = java.util.Collections.emptyList(); + mergedFacetValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FacetConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.class, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.Builder.class); + } + + public interface IgnoredFacetValuesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + int getValuesCount(); + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + java.lang.String getValues(int index); + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + com.google.protobuf.ByteString getValuesBytes(int index); + + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + } + /** + * + * + *
+     * [Facet values][google.cloud.retail.v2.SearchResponse.Facet.values] to
+     * ignore on [facets][google.cloud.retail.v2.SearchResponse.Facet] during
+     * the specified time range for the given
+     * [SearchResponse.Facet.key][google.cloud.retail.v2.SearchResponse.Facet.key]
+     * attribute.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues} + */ + public static final class IgnoredFacetValues extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues) + IgnoredFacetValuesOrBuilder { + private static final long serialVersionUID = 0L; + // Use IgnoredFacetValues.newBuilder() to construct. + private IgnoredFacetValues(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IgnoredFacetValues() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IgnoredFacetValues(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_IgnoredFacetValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues.class, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + .class); + } + + private int bitField0_; + public static final int VALUES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_; + } + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 < values_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, values_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getEndTime()); + } + 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 < values_.size(); i++) { + dataSize += computeStringSizeNoTag(values_.getRaw(i)); + } + size += dataSize; + size += 1 * getValuesList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues)) { + return super.equals(obj); + } + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues other = + (com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues) obj; + + if (!getValuesList().equals(other.getValuesList())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) 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 (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * [Facet values][google.cloud.retail.v2.SearchResponse.Facet.values] to
+       * ignore on [facets][google.cloud.retail.v2.SearchResponse.Facet] during
+       * the specified time range for the given
+       * [SearchResponse.Facet.key][google.cloud.retail.v2.SearchResponse.Facet.key]
+       * attribute.
+       * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues) + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_IgnoredFacetValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues.class, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + .class); + } + + // Construct using + // com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + getDefaultInstanceForType() { + return com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues build() { + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + buildPartial() { + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues result = + new com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); + result.values_ = values_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues) { + return mergeFrom( + (com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues other) { + if (other + == com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + .getDefaultInstance()) return this; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ |= 0x00000001; + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(); + ensureValuesIsMutable(); + values_.add(s); + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureValuesIsMutable() { + if (!values_.isModifiable()) { + values_ = new com.google.protobuf.LazyStringArrayList(values_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + values_.makeImmutable(); + return values_; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param value The bytes of the values to add. + * @return This builder for chaining. + */ + public Builder addValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @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(); + } + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues) + private static final com.google.cloud.retail.v2.CatalogAttribute.FacetConfig + .IgnoredFacetValues + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues(); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IgnoredFacetValues parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MergedFacetValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + int getValuesCount(); + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + java.lang.String getValues(int index); + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + com.google.protobuf.ByteString getValuesBytes(int index); + + /** + * + * + *
+       * All the previous values are replaced by this merged facet value.
+       * This merged_value must be non-empty and can have up to 128 characters.
+       * 
+ * + * string merged_value = 2; + * + * @return The mergedValue. + */ + java.lang.String getMergedValue(); + /** + * + * + *
+       * All the previous values are replaced by this merged facet value.
+       * This merged_value must be non-empty and can have up to 128 characters.
+       * 
+ * + * string merged_value = 2; + * + * @return The bytes for mergedValue. + */ + com.google.protobuf.ByteString getMergedValueBytes(); + } + /** + * + * + *
+     * Replaces a set of textual facet values by the same (possibly different)
+     * merged facet value. Each facet value should appear at most once as a
+     * value per [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute].
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue} + */ + public static final class MergedFacetValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue) + MergedFacetValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use MergedFacetValue.newBuilder() to construct. + private MergedFacetValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MergedFacetValue() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + mergedValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MergedFacetValue(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacetValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.class, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + .class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_; + } + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + public static final int MERGED_VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object mergedValue_ = ""; + /** + * + * + *
+       * All the previous values are replaced by this merged facet value.
+       * This merged_value must be non-empty and can have up to 128 characters.
+       * 
+ * + * string merged_value = 2; + * + * @return The mergedValue. + */ + @java.lang.Override + public java.lang.String getMergedValue() { + java.lang.Object ref = mergedValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergedValue_ = s; + return s; + } + } + /** + * + * + *
+       * All the previous values are replaced by this merged facet value.
+       * This merged_value must be non-empty and can have up to 128 characters.
+       * 
+ * + * string merged_value = 2; + * + * @return The bytes for mergedValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMergedValueBytes() { + java.lang.Object ref = mergedValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mergedValue_ = 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 < values_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, values_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mergedValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mergedValue_); + } + 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 < values_.size(); i++) { + dataSize += computeStringSizeNoTag(values_.getRaw(i)); + } + size += dataSize; + size += 1 * getValuesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mergedValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mergedValue_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue)) { + return super.equals(obj); + } + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue other = + (com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue) obj; + + if (!getValuesList().equals(other.getValuesList())) return false; + if (!getMergedValue().equals(other.getMergedValue())) 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 (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (37 * hash) + MERGED_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getMergedValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Replaces a set of textual facet values by the same (possibly different)
+       * merged facet value. Each facet value should appear at most once as a
+       * value per [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute].
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * Protobuf type {@code google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue) + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacetValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.class, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + .class); + } + + // Construct using + // com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + mergedValue_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + getDefaultInstanceForType() { + return com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue build() { + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + buildPartial() { + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue result = + new com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); + result.values_ = values_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.mergedValue_ = mergedValue_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue) { + return mergeFrom( + (com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue other) { + if (other + == com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + .getDefaultInstance()) return this; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ |= 0x00000001; + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + if (!other.getMergedValue().isEmpty()) { + mergedValue_ = other.mergedValue_; + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureValuesIsMutable(); + values_.add(s); + break; + } // case 10 + case 18: + { + mergedValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureValuesIsMutable() { + if (!values_.isModifiable()) { + values_ = new com.google.protobuf.LazyStringArrayList(values_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + values_.makeImmutable(); + return values_; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param value The bytes of the values to add. + * @return This builder for chaining. + */ + public Builder addValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object mergedValue_ = ""; + /** + * + * + *
+         * All the previous values are replaced by this merged facet value.
+         * This merged_value must be non-empty and can have up to 128 characters.
+         * 
+ * + * string merged_value = 2; + * + * @return The mergedValue. + */ + public java.lang.String getMergedValue() { + java.lang.Object ref = mergedValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergedValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * All the previous values are replaced by this merged facet value.
+         * This merged_value must be non-empty and can have up to 128 characters.
+         * 
+ * + * string merged_value = 2; + * + * @return The bytes for mergedValue. + */ + public com.google.protobuf.ByteString getMergedValueBytes() { + java.lang.Object ref = mergedValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mergedValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * All the previous values are replaced by this merged facet value.
+         * This merged_value must be non-empty and can have up to 128 characters.
+         * 
+ * + * string merged_value = 2; + * + * @param value The mergedValue to set. + * @return This builder for chaining. + */ + public Builder setMergedValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mergedValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * All the previous values are replaced by this merged facet value.
+         * This merged_value must be non-empty and can have up to 128 characters.
+         * 
+ * + * string merged_value = 2; + * + * @return This builder for chaining. + */ + public Builder clearMergedValue() { + mergedValue_ = getDefaultInstance().getMergedValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * All the previous values are replaced by this merged facet value.
+         * This merged_value must be non-empty and can have up to 128 characters.
+         * 
+ * + * string merged_value = 2; + * + * @param value The bytes for mergedValue to set. + * @return This builder for chaining. + */ + public Builder setMergedValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mergedValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue) + private static final com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue(); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MergedFacetValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MergedFacetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The merged facet key should be a valid facet key that is different than
+       * the facet key of the current catalog attribute. We refer this is
+       * merged facet key as the child of the current catalog attribute. This
+       * merged facet key can't be a parent of another facet key (i.e. no
+       * directed path of length 2). This merged facet key needs to be either a
+       * textual custom attribute or a numerical custom attribute.
+       * 
+ * + * string merged_facet_key = 1; + * + * @return The mergedFacetKey. + */ + java.lang.String getMergedFacetKey(); + /** + * + * + *
+       * The merged facet key should be a valid facet key that is different than
+       * the facet key of the current catalog attribute. We refer this is
+       * merged facet key as the child of the current catalog attribute. This
+       * merged facet key can't be a parent of another facet key (i.e. no
+       * directed path of length 2). This merged facet key needs to be either a
+       * textual custom attribute or a numerical custom attribute.
+       * 
+ * + * string merged_facet_key = 1; + * + * @return The bytes for mergedFacetKey. + */ + com.google.protobuf.ByteString getMergedFacetKeyBytes(); + } + /** + * + * + *
+     * The current facet key (i.e. attribute config) maps into the
+     * [merged_facet_key][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet.merged_facet_key].
+     * A facet key can have at most one child. The current facet key and the
+     * merged facet key need both to be textual custom attributes or both
+     * numerical custom attributes (same type).
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet} + */ + public static final class MergedFacet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet) + MergedFacetOrBuilder { + private static final long serialVersionUID = 0L; + // Use MergedFacet.newBuilder() to construct. + private MergedFacet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MergedFacet() { + mergedFacetKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MergedFacet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet.class, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet.Builder.class); + } + + public static final int MERGED_FACET_KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object mergedFacetKey_ = ""; + /** + * + * + *
+       * The merged facet key should be a valid facet key that is different than
+       * the facet key of the current catalog attribute. We refer this is
+       * merged facet key as the child of the current catalog attribute. This
+       * merged facet key can't be a parent of another facet key (i.e. no
+       * directed path of length 2). This merged facet key needs to be either a
+       * textual custom attribute or a numerical custom attribute.
+       * 
+ * + * string merged_facet_key = 1; + * + * @return The mergedFacetKey. + */ + @java.lang.Override + public java.lang.String getMergedFacetKey() { + java.lang.Object ref = mergedFacetKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergedFacetKey_ = s; + return s; + } + } + /** + * + * + *
+       * The merged facet key should be a valid facet key that is different than
+       * the facet key of the current catalog attribute. We refer this is
+       * merged facet key as the child of the current catalog attribute. This
+       * merged facet key can't be a parent of another facet key (i.e. no
+       * directed path of length 2). This merged facet key needs to be either a
+       * textual custom attribute or a numerical custom attribute.
+       * 
+ * + * string merged_facet_key = 1; + * + * @return The bytes for mergedFacetKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMergedFacetKeyBytes() { + java.lang.Object ref = mergedFacetKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mergedFacetKey_ = 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.GeneratedMessageV3.isStringEmpty(mergedFacetKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mergedFacetKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mergedFacetKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mergedFacetKey_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2.CatalogAttribute.FacetConfig.MergedFacet)) { + return super.equals(obj); + } + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet other = + (com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet) obj; + + if (!getMergedFacetKey().equals(other.getMergedFacetKey())) 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) + MERGED_FACET_KEY_FIELD_NUMBER; + hash = (53 * hash) + getMergedFacetKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2.CatalogAttribute.FacetConfig.MergedFacet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * The current facet key (i.e. attribute config) maps into the
+       * [merged_facet_key][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet.merged_facet_key].
+       * A facet key can have at most one child. The current facet key and the
+       * merged facet key need both to be textual custom attributes or both
+       * numerical custom attributes (same type).
+       * 
+ * + * Protobuf type {@code google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet) + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet.class, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet.Builder + .class); + } + + // Construct using + // com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mergedFacetKey_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacet_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet + getDefaultInstanceForType() { + return com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet build() { + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet buildPartial() { + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet result = + new com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mergedFacetKey_ = mergedFacetKey_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet) { + return mergeFrom( + (com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet other) { + if (other + == com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance()) return this; + if (!other.getMergedFacetKey().isEmpty()) { + mergedFacetKey_ = other.mergedFacetKey_; + 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: + { + mergedFacetKey_ = 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 mergedFacetKey_ = ""; + /** + * + * + *
+         * The merged facet key should be a valid facet key that is different than
+         * the facet key of the current catalog attribute. We refer this is
+         * merged facet key as the child of the current catalog attribute. This
+         * merged facet key can't be a parent of another facet key (i.e. no
+         * directed path of length 2). This merged facet key needs to be either a
+         * textual custom attribute or a numerical custom attribute.
+         * 
+ * + * string merged_facet_key = 1; + * + * @return The mergedFacetKey. + */ + public java.lang.String getMergedFacetKey() { + java.lang.Object ref = mergedFacetKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergedFacetKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The merged facet key should be a valid facet key that is different than
+         * the facet key of the current catalog attribute. We refer this is
+         * merged facet key as the child of the current catalog attribute. This
+         * merged facet key can't be a parent of another facet key (i.e. no
+         * directed path of length 2). This merged facet key needs to be either a
+         * textual custom attribute or a numerical custom attribute.
+         * 
+ * + * string merged_facet_key = 1; + * + * @return The bytes for mergedFacetKey. + */ + public com.google.protobuf.ByteString getMergedFacetKeyBytes() { + java.lang.Object ref = mergedFacetKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mergedFacetKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The merged facet key should be a valid facet key that is different than
+         * the facet key of the current catalog attribute. We refer this is
+         * merged facet key as the child of the current catalog attribute. This
+         * merged facet key can't be a parent of another facet key (i.e. no
+         * directed path of length 2). This merged facet key needs to be either a
+         * textual custom attribute or a numerical custom attribute.
+         * 
+ * + * string merged_facet_key = 1; + * + * @param value The mergedFacetKey to set. + * @return This builder for chaining. + */ + public Builder setMergedFacetKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mergedFacetKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The merged facet key should be a valid facet key that is different than
+         * the facet key of the current catalog attribute. We refer this is
+         * merged facet key as the child of the current catalog attribute. This
+         * merged facet key can't be a parent of another facet key (i.e. no
+         * directed path of length 2). This merged facet key needs to be either a
+         * textual custom attribute or a numerical custom attribute.
+         * 
+ * + * string merged_facet_key = 1; + * + * @return This builder for chaining. + */ + public Builder clearMergedFacetKey() { + mergedFacetKey_ = getDefaultInstance().getMergedFacetKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * The merged facet key should be a valid facet key that is different than
+         * the facet key of the current catalog attribute. We refer this is
+         * merged facet key as the child of the current catalog attribute. This
+         * merged facet key can't be a parent of another facet key (i.e. no
+         * directed path of length 2). This merged facet key needs to be either a
+         * textual custom attribute or a numerical custom attribute.
+         * 
+ * + * string merged_facet_key = 1; + * + * @param value The bytes for mergedFacetKey to set. + * @return This builder for chaining. + */ + public Builder setMergedFacetKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mergedFacetKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet) + private static final com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet(); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MergedFacet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2.CatalogAttribute.FacetConfig.MergedFacet + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RerankConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * If set to true, then we also rerank the dynamic facets based on the
+       * facet values engaged by the user for the current attribute key during
+       * serving.
+       * 
+ * + * bool rerank_facet = 1; + * + * @return The rerankFacet. + */ + boolean getRerankFacet(); + + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @return A list containing the facetValues. + */ + java.util.List getFacetValuesList(); + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @return The count of facetValues. + */ + int getFacetValuesCount(); + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the element to return. + * @return The facetValues at the given index. + */ + java.lang.String getFacetValues(int index); + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the value to return. + * @return The bytes of the facetValues at the given index. + */ + com.google.protobuf.ByteString getFacetValuesBytes(int index); + } + /** + * + * + *
+     * Options to rerank based on facet values engaged by the user for the
+     * current key. That key needs to be a custom textual key and facetable.
+     * To use this control, you also need to pass all the facet keys engaged by
+     * the user in the request using the field [SearchRequest.FacetSpec]. In
+     * particular, if you don't pass the facet keys engaged that you want to
+     * rerank on, this control won't be effective. Moreover, to obtain better
+     * results, the facet values that you want to rerank on should be close to
+     * English (ideally made of words, underscores, and spaces).
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig} + */ + public static final class RerankConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig) + RerankConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RerankConfig.newBuilder() to construct. + private RerankConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RerankConfig() { + facetValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RerankConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_RerankConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_RerankConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig.class, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig.Builder.class); + } + + public static final int RERANK_FACET_FIELD_NUMBER = 1; + private boolean rerankFacet_ = false; + /** + * + * + *
+       * If set to true, then we also rerank the dynamic facets based on the
+       * facet values engaged by the user for the current attribute key during
+       * serving.
+       * 
+ * + * bool rerank_facet = 1; + * + * @return The rerankFacet. + */ + @java.lang.Override + public boolean getRerankFacet() { + return rerankFacet_; + } + + public static final int FACET_VALUES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList facetValues_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @return A list containing the facetValues. + */ + public com.google.protobuf.ProtocolStringList getFacetValuesList() { + return facetValues_; + } + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @return The count of facetValues. + */ + public int getFacetValuesCount() { + return facetValues_.size(); + } + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the element to return. + * @return The facetValues at the given index. + */ + public java.lang.String getFacetValues(int index) { + return facetValues_.get(index); + } + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the value to return. + * @return The bytes of the facetValues at the given index. + */ + public com.google.protobuf.ByteString getFacetValuesBytes(int index) { + return facetValues_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (rerankFacet_ != false) { + output.writeBool(1, rerankFacet_); + } + for (int i = 0; i < facetValues_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, facetValues_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rerankFacet_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, rerankFacet_); + } + { + int dataSize = 0; + for (int i = 0; i < facetValues_.size(); i++) { + dataSize += computeStringSizeNoTag(facetValues_.getRaw(i)); + } + size += dataSize; + size += 1 * getFacetValuesList().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.retail.v2.CatalogAttribute.FacetConfig.RerankConfig)) { + return super.equals(obj); + } + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig other = + (com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig) obj; + + if (getRerankFacet() != other.getRerankFacet()) return false; + if (!getFacetValuesList().equals(other.getFacetValuesList())) 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) + RERANK_FACET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRerankFacet()); + if (getFacetValuesCount() > 0) { + hash = (37 * hash) + FACET_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getFacetValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2.CatalogAttribute.FacetConfig.RerankConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Options to rerank based on facet values engaged by the user for the
+       * current key. That key needs to be a custom textual key and facetable.
+       * To use this control, you also need to pass all the facet keys engaged by
+       * the user in the request using the field [SearchRequest.FacetSpec]. In
+       * particular, if you don't pass the facet keys engaged that you want to
+       * rerank on, this control won't be effective. Moreover, to obtain better
+       * results, the facet values that you want to rerank on should be close to
+       * English (ideally made of words, underscores, and spaces).
+       * 
+ * + * Protobuf type {@code google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig) + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_RerankConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_RerankConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig.class, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rerankFacet_ = false; + facetValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_RerankConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig + getDefaultInstanceForType() { + return com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig build() { + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig buildPartial() { + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig result = + new com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rerankFacet_ = rerankFacet_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + facetValues_.makeImmutable(); + result.facetValues_ = facetValues_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig) { + return mergeFrom( + (com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig other) { + if (other + == com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance()) return this; + if (other.getRerankFacet() != false) { + setRerankFacet(other.getRerankFacet()); + } + if (!other.facetValues_.isEmpty()) { + if (facetValues_.isEmpty()) { + facetValues_ = other.facetValues_; + bitField0_ |= 0x00000002; + } else { + ensureFacetValuesIsMutable(); + facetValues_.addAll(other.facetValues_); + } + 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: + { + rerankFacet_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFacetValuesIsMutable(); + facetValues_.add(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 bitField0_; + + private boolean rerankFacet_; + /** + * + * + *
+         * If set to true, then we also rerank the dynamic facets based on the
+         * facet values engaged by the user for the current attribute key during
+         * serving.
+         * 
+ * + * bool rerank_facet = 1; + * + * @return The rerankFacet. + */ + @java.lang.Override + public boolean getRerankFacet() { + return rerankFacet_; + } + /** + * + * + *
+         * If set to true, then we also rerank the dynamic facets based on the
+         * facet values engaged by the user for the current attribute key during
+         * serving.
+         * 
+ * + * bool rerank_facet = 1; + * + * @param value The rerankFacet to set. + * @return This builder for chaining. + */ + public Builder setRerankFacet(boolean value) { + + rerankFacet_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * If set to true, then we also rerank the dynamic facets based on the
+         * facet values engaged by the user for the current attribute key during
+         * serving.
+         * 
+ * + * bool rerank_facet = 1; + * + * @return This builder for chaining. + */ + public Builder clearRerankFacet() { + bitField0_ = (bitField0_ & ~0x00000001); + rerankFacet_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList facetValues_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureFacetValuesIsMutable() { + if (!facetValues_.isModifiable()) { + facetValues_ = new com.google.protobuf.LazyStringArrayList(facetValues_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @return A list containing the facetValues. + */ + public com.google.protobuf.ProtocolStringList getFacetValuesList() { + facetValues_.makeImmutable(); + return facetValues_; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @return The count of facetValues. + */ + public int getFacetValuesCount() { + return facetValues_.size(); + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the element to return. + * @return The facetValues at the given index. + */ + public java.lang.String getFacetValues(int index) { + return facetValues_.get(index); + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the value to return. + * @return The bytes of the facetValues at the given index. + */ + public com.google.protobuf.ByteString getFacetValuesBytes(int index) { + return facetValues_.getByteString(index); + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param index The index to set the value at. + * @param value The facetValues to set. + * @return This builder for chaining. + */ + public Builder setFacetValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetValuesIsMutable(); + facetValues_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param value The facetValues to add. + * @return This builder for chaining. + */ + public Builder addFacetValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetValuesIsMutable(); + facetValues_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param values The facetValues to add. + * @return This builder for chaining. + */ + public Builder addAllFacetValues(java.lang.Iterable values) { + ensureFacetValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, facetValues_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @return This builder for chaining. + */ + public Builder clearFacetValues() { + facetValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param value The bytes of the facetValues to add. + * @return This builder for chaining. + */ + public Builder addFacetValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFacetValuesIsMutable(); + facetValues_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig) + private static final com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig(); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RerankConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2.CatalogAttribute.FacetConfig.RerankConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int FACET_INTERVALS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List facetIntervals_; + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+     * interval must have a lower bound or an upper bound. If both bounds are
+     * provided, then the lower bound must be smaller or equal than the upper
+     * bound.
+     * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + @java.lang.Override + public java.util.List getFacetIntervalsList() { + return facetIntervals_; + } + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+     * interval must have a lower bound or an upper bound. If both bounds are
+     * provided, then the lower bound must be smaller or equal than the upper
+     * bound.
+     * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + @java.lang.Override + public java.util.List + getFacetIntervalsOrBuilderList() { + return facetIntervals_; + } + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+     * interval must have a lower bound or an upper bound. If both bounds are
+     * provided, then the lower bound must be smaller or equal than the upper
+     * bound.
+     * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + @java.lang.Override + public int getFacetIntervalsCount() { + return facetIntervals_.size(); + } + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+     * interval must have a lower bound or an upper bound. If both bounds are
+     * provided, then the lower bound must be smaller or equal than the upper
+     * bound.
+     * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2.Interval getFacetIntervals(int index) { + return facetIntervals_.get(index); + } + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+     * interval must have a lower bound or an upper bound. If both bounds are
+     * provided, then the lower bound must be smaller or equal than the upper
+     * bound.
+     * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2.IntervalOrBuilder getFacetIntervalsOrBuilder(int index) { + return facetIntervals_.get(index); + } + + public static final int IGNORED_FACET_VALUES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues> + ignoredFacetValues_; + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues> + getIgnoredFacetValuesList() { + return ignoredFacetValues_; + } + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder> + getIgnoredFacetValuesOrBuilderList() { + return ignoredFacetValues_; + } + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + @java.lang.Override + public int getIgnoredFacetValuesCount() { + return ignoredFacetValues_.size(); + } + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + getIgnoredFacetValues(int index) { + return ignoredFacetValues_.get(index); + } + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder + getIgnoredFacetValuesOrBuilder(int index) { + return ignoredFacetValues_.get(index); + } + + public static final int MERGED_FACET_VALUES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + mergedFacetValues_; + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+     * feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + @java.lang.Override + public java.util.List + getMergedFacetValuesList() { + return mergedFacetValues_; + } + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+     * feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder> + getMergedFacetValuesOrBuilderList() { + return mergedFacetValues_; + } + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+     * feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + @java.lang.Override + public int getMergedFacetValuesCount() { + return mergedFacetValues_.size(); + } + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+     * feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + getMergedFacetValues(int index) { + return mergedFacetValues_.get(index); + } + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+     * feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder + getMergedFacetValuesOrBuilder(int index) { + return mergedFacetValues_.get(index); + } + + public static final int MERGED_FACET_FIELD_NUMBER = 4; + private com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet mergedFacet_; + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return Whether the mergedFacet field is set. + */ + @java.lang.Override + public boolean hasMergedFacet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return The mergedFacet. + */ + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet getMergedFacet() { + return mergedFacet_ == null + ? com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet.getDefaultInstance() + : mergedFacet_; + } + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetOrBuilder + getMergedFacetOrBuilder() { + return mergedFacet_ == null + ? com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet.getDefaultInstance() + : mergedFacet_; + } + + public static final int RERANK_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerankConfig_; + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return Whether the rerankConfig field is set. + */ + @java.lang.Override + public boolean hasRerankConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return The rerankConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig getRerankConfig() { + return rerankConfig_ == null + ? com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance() + : rerankConfig_; + } + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfigOrBuilder + getRerankConfigOrBuilder() { + return rerankConfig_ == null + ? com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance() + : rerankConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 < facetIntervals_.size(); i++) { + output.writeMessage(1, facetIntervals_.get(i)); + } + for (int i = 0; i < ignoredFacetValues_.size(); i++) { + output.writeMessage(2, ignoredFacetValues_.get(i)); + } + for (int i = 0; i < mergedFacetValues_.size(); i++) { + output.writeMessage(3, mergedFacetValues_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getMergedFacet()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getRerankConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < facetIntervals_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, facetIntervals_.get(i)); + } + for (int i = 0; i < ignoredFacetValues_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, ignoredFacetValues_.get(i)); + } + for (int i = 0; i < mergedFacetValues_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, mergedFacetValues_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getMergedFacet()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRerankConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2.CatalogAttribute.FacetConfig)) { + return super.equals(obj); + } + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig other = + (com.google.cloud.retail.v2.CatalogAttribute.FacetConfig) obj; + + if (!getFacetIntervalsList().equals(other.getFacetIntervalsList())) return false; + if (!getIgnoredFacetValuesList().equals(other.getIgnoredFacetValuesList())) return false; + if (!getMergedFacetValuesList().equals(other.getMergedFacetValuesList())) return false; + if (hasMergedFacet() != other.hasMergedFacet()) return false; + if (hasMergedFacet()) { + if (!getMergedFacet().equals(other.getMergedFacet())) return false; + } + if (hasRerankConfig() != other.hasRerankConfig()) return false; + if (hasRerankConfig()) { + if (!getRerankConfig().equals(other.getRerankConfig())) 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 (getFacetIntervalsCount() > 0) { + hash = (37 * hash) + FACET_INTERVALS_FIELD_NUMBER; + hash = (53 * hash) + getFacetIntervalsList().hashCode(); + } + if (getIgnoredFacetValuesCount() > 0) { + hash = (37 * hash) + IGNORED_FACET_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getIgnoredFacetValuesList().hashCode(); + } + if (getMergedFacetValuesCount() > 0) { + hash = (37 * hash) + MERGED_FACET_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getMergedFacetValuesList().hashCode(); + } + if (hasMergedFacet()) { + hash = (37 * hash) + MERGED_FACET_FIELD_NUMBER; + hash = (53 * hash) + getMergedFacet().hashCode(); + } + if (hasRerankConfig()) { + hash = (37 * hash) + RERANK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getRerankConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2.CatalogAttribute.FacetConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Possible options for the facet that corresponds to the current attribute
+     * config.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2.CatalogAttribute.FacetConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.CatalogAttribute.FacetConfig) + com.google.cloud.retail.v2.CatalogAttribute.FacetConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.class, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.Builder.class); + } + + // Construct using com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFacetIntervalsFieldBuilder(); + getIgnoredFacetValuesFieldBuilder(); + getMergedFacetValuesFieldBuilder(); + getMergedFacetFieldBuilder(); + getRerankConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (facetIntervalsBuilder_ == null) { + facetIntervals_ = java.util.Collections.emptyList(); + } else { + facetIntervals_ = null; + facetIntervalsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (ignoredFacetValuesBuilder_ == null) { + ignoredFacetValues_ = java.util.Collections.emptyList(); + } else { + ignoredFacetValues_ = null; + ignoredFacetValuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (mergedFacetValuesBuilder_ == null) { + mergedFacetValues_ = java.util.Collections.emptyList(); + } else { + mergedFacetValues_ = null; + mergedFacetValuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + mergedFacet_ = null; + if (mergedFacetBuilder_ != null) { + mergedFacetBuilder_.dispose(); + mergedFacetBuilder_ = null; + } + rerankConfig_ = null; + if (rerankConfigBuilder_ != null) { + rerankConfigBuilder_.dispose(); + rerankConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2.CatalogProto + .internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig getDefaultInstanceForType() { + return com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig build() { + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig buildPartial() { + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig result = + new com.google.cloud.retail.v2.CatalogAttribute.FacetConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig result) { + if (facetIntervalsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + facetIntervals_ = java.util.Collections.unmodifiableList(facetIntervals_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.facetIntervals_ = facetIntervals_; + } else { + result.facetIntervals_ = facetIntervalsBuilder_.build(); + } + if (ignoredFacetValuesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + ignoredFacetValues_ = java.util.Collections.unmodifiableList(ignoredFacetValues_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.ignoredFacetValues_ = ignoredFacetValues_; + } else { + result.ignoredFacetValues_ = ignoredFacetValuesBuilder_.build(); + } + if (mergedFacetValuesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + mergedFacetValues_ = java.util.Collections.unmodifiableList(mergedFacetValues_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.mergedFacetValues_ = mergedFacetValues_; + } else { + result.mergedFacetValues_ = mergedFacetValuesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.retail.v2.CatalogAttribute.FacetConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.mergedFacet_ = + mergedFacetBuilder_ == null ? mergedFacet_ : mergedFacetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.rerankConfig_ = + rerankConfigBuilder_ == null ? rerankConfig_ : rerankConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2.CatalogAttribute.FacetConfig) { + return mergeFrom((com.google.cloud.retail.v2.CatalogAttribute.FacetConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2.CatalogAttribute.FacetConfig other) { + if (other == com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.getDefaultInstance()) + return this; + if (facetIntervalsBuilder_ == null) { + if (!other.facetIntervals_.isEmpty()) { + if (facetIntervals_.isEmpty()) { + facetIntervals_ = other.facetIntervals_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFacetIntervalsIsMutable(); + facetIntervals_.addAll(other.facetIntervals_); + } + onChanged(); + } + } else { + if (!other.facetIntervals_.isEmpty()) { + if (facetIntervalsBuilder_.isEmpty()) { + facetIntervalsBuilder_.dispose(); + facetIntervalsBuilder_ = null; + facetIntervals_ = other.facetIntervals_; + bitField0_ = (bitField0_ & ~0x00000001); + facetIntervalsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFacetIntervalsFieldBuilder() + : null; + } else { + facetIntervalsBuilder_.addAllMessages(other.facetIntervals_); + } + } + } + if (ignoredFacetValuesBuilder_ == null) { + if (!other.ignoredFacetValues_.isEmpty()) { + if (ignoredFacetValues_.isEmpty()) { + ignoredFacetValues_ = other.ignoredFacetValues_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.addAll(other.ignoredFacetValues_); + } + onChanged(); + } + } else { + if (!other.ignoredFacetValues_.isEmpty()) { + if (ignoredFacetValuesBuilder_.isEmpty()) { + ignoredFacetValuesBuilder_.dispose(); + ignoredFacetValuesBuilder_ = null; + ignoredFacetValues_ = other.ignoredFacetValues_; + bitField0_ = (bitField0_ & ~0x00000002); + ignoredFacetValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIgnoredFacetValuesFieldBuilder() + : null; + } else { + ignoredFacetValuesBuilder_.addAllMessages(other.ignoredFacetValues_); + } + } + } + if (mergedFacetValuesBuilder_ == null) { + if (!other.mergedFacetValues_.isEmpty()) { + if (mergedFacetValues_.isEmpty()) { + mergedFacetValues_ = other.mergedFacetValues_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.addAll(other.mergedFacetValues_); + } + onChanged(); + } + } else { + if (!other.mergedFacetValues_.isEmpty()) { + if (mergedFacetValuesBuilder_.isEmpty()) { + mergedFacetValuesBuilder_.dispose(); + mergedFacetValuesBuilder_ = null; + mergedFacetValues_ = other.mergedFacetValues_; + bitField0_ = (bitField0_ & ~0x00000004); + mergedFacetValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMergedFacetValuesFieldBuilder() + : null; + } else { + mergedFacetValuesBuilder_.addAllMessages(other.mergedFacetValues_); + } + } + } + if (other.hasMergedFacet()) { + mergeMergedFacet(other.getMergedFacet()); + } + if (other.hasRerankConfig()) { + mergeRerankConfig(other.getRerankConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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.retail.v2.Interval m = + input.readMessage( + com.google.cloud.retail.v2.Interval.parser(), extensionRegistry); + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + facetIntervals_.add(m); + } else { + facetIntervalsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues m = + input.readMessage( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + .parser(), + extensionRegistry); + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.add(m); + } else { + ignoredFacetValuesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue m = + input.readMessage( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + .parser(), + extensionRegistry); + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.add(m); + } else { + mergedFacetValuesBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + input.readMessage(getMergedFacetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getRerankConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List facetIntervals_ = + java.util.Collections.emptyList(); + + private void ensureFacetIntervalsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + facetIntervals_ = + new java.util.ArrayList(facetIntervals_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2.Interval, + com.google.cloud.retail.v2.Interval.Builder, + com.google.cloud.retail.v2.IntervalOrBuilder> + facetIntervalsBuilder_; + + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public java.util.List getFacetIntervalsList() { + if (facetIntervalsBuilder_ == null) { + return java.util.Collections.unmodifiableList(facetIntervals_); + } else { + return facetIntervalsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public int getFacetIntervalsCount() { + if (facetIntervalsBuilder_ == null) { + return facetIntervals_.size(); + } else { + return facetIntervalsBuilder_.getCount(); + } + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public com.google.cloud.retail.v2.Interval getFacetIntervals(int index) { + if (facetIntervalsBuilder_ == null) { + return facetIntervals_.get(index); + } else { + return facetIntervalsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public Builder setFacetIntervals(int index, com.google.cloud.retail.v2.Interval value) { + if (facetIntervalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetIntervalsIsMutable(); + facetIntervals_.set(index, value); + onChanged(); + } else { + facetIntervalsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public Builder setFacetIntervals( + int index, com.google.cloud.retail.v2.Interval.Builder builderForValue) { + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + facetIntervals_.set(index, builderForValue.build()); + onChanged(); + } else { + facetIntervalsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public Builder addFacetIntervals(com.google.cloud.retail.v2.Interval value) { + if (facetIntervalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetIntervalsIsMutable(); + facetIntervals_.add(value); + onChanged(); + } else { + facetIntervalsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public Builder addFacetIntervals(int index, com.google.cloud.retail.v2.Interval value) { + if (facetIntervalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetIntervalsIsMutable(); + facetIntervals_.add(index, value); + onChanged(); + } else { + facetIntervalsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public Builder addFacetIntervals( + com.google.cloud.retail.v2.Interval.Builder builderForValue) { + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + facetIntervals_.add(builderForValue.build()); + onChanged(); + } else { + facetIntervalsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public Builder addFacetIntervals( + int index, com.google.cloud.retail.v2.Interval.Builder builderForValue) { + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + facetIntervals_.add(index, builderForValue.build()); + onChanged(); + } else { + facetIntervalsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public Builder addAllFacetIntervals( + java.lang.Iterable values) { + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, facetIntervals_); + onChanged(); + } else { + facetIntervalsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public Builder clearFacetIntervals() { + if (facetIntervalsBuilder_ == null) { + facetIntervals_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + facetIntervalsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public Builder removeFacetIntervals(int index) { + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + facetIntervals_.remove(index); + onChanged(); + } else { + facetIntervalsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public com.google.cloud.retail.v2.Interval.Builder getFacetIntervalsBuilder(int index) { + return getFacetIntervalsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public com.google.cloud.retail.v2.IntervalOrBuilder getFacetIntervalsOrBuilder(int index) { + if (facetIntervalsBuilder_ == null) { + return facetIntervals_.get(index); + } else { + return facetIntervalsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public java.util.List + getFacetIntervalsOrBuilderList() { + if (facetIntervalsBuilder_ != null) { + return facetIntervalsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(facetIntervals_); + } + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public com.google.cloud.retail.v2.Interval.Builder addFacetIntervalsBuilder() { + return getFacetIntervalsFieldBuilder() + .addBuilder(com.google.cloud.retail.v2.Interval.getDefaultInstance()); + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public com.google.cloud.retail.v2.Interval.Builder addFacetIntervalsBuilder(int index) { + return getFacetIntervalsFieldBuilder() + .addBuilder(index, com.google.cloud.retail.v2.Interval.getDefaultInstance()); + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each
+       * interval must have a lower bound or an upper bound. If both bounds are
+       * provided, then the lower bound must be smaller or equal than the upper
+       * bound.
+       * 
+ * + * repeated .google.cloud.retail.v2.Interval facet_intervals = 1; + */ + public java.util.List + getFacetIntervalsBuilderList() { + return getFacetIntervalsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2.Interval, + com.google.cloud.retail.v2.Interval.Builder, + com.google.cloud.retail.v2.IntervalOrBuilder> + getFacetIntervalsFieldBuilder() { + if (facetIntervalsBuilder_ == null) { + facetIntervalsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2.Interval, + com.google.cloud.retail.v2.Interval.Builder, + com.google.cloud.retail.v2.IntervalOrBuilder>( + facetIntervals_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + facetIntervals_ = null; + } + return facetIntervalsBuilder_; + } + + private java.util.List< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues> + ignoredFacetValues_ = java.util.Collections.emptyList(); + + private void ensureIgnoredFacetValuesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + ignoredFacetValues_ = + new java.util.ArrayList< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues>( + ignoredFacetValues_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder> + ignoredFacetValuesBuilder_; + + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public java.util.List< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues> + getIgnoredFacetValuesList() { + if (ignoredFacetValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(ignoredFacetValues_); + } else { + return ignoredFacetValuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public int getIgnoredFacetValuesCount() { + if (ignoredFacetValuesBuilder_ == null) { + return ignoredFacetValues_.size(); + } else { + return ignoredFacetValuesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + getIgnoredFacetValues(int index) { + if (ignoredFacetValuesBuilder_ == null) { + return ignoredFacetValues_.get(index); + } else { + return ignoredFacetValuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder setIgnoredFacetValues( + int index, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues value) { + if (ignoredFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.set(index, value); + onChanged(); + } else { + ignoredFacetValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder setIgnoredFacetValues( + int index, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + builderForValue) { + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.set(index, builderForValue.build()); + onChanged(); + } else { + ignoredFacetValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder addIgnoredFacetValues( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues value) { + if (ignoredFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.add(value); + onChanged(); + } else { + ignoredFacetValuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder addIgnoredFacetValues( + int index, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues value) { + if (ignoredFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.add(index, value); + onChanged(); + } else { + ignoredFacetValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder addIgnoredFacetValues( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + builderForValue) { + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.add(builderForValue.build()); + onChanged(); + } else { + ignoredFacetValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder addIgnoredFacetValues( + int index, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + builderForValue) { + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.add(index, builderForValue.build()); + onChanged(); + } else { + ignoredFacetValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder addAllIgnoredFacetValues( + java.lang.Iterable< + ? extends + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues> + values) { + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ignoredFacetValues_); + onChanged(); + } else { + ignoredFacetValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder clearIgnoredFacetValues() { + if (ignoredFacetValuesBuilder_ == null) { + ignoredFacetValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + ignoredFacetValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder removeIgnoredFacetValues(int index) { + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.remove(index); + onChanged(); + } else { + ignoredFacetValuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + getIgnoredFacetValuesBuilder(int index) { + return getIgnoredFacetValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder + getIgnoredFacetValuesOrBuilder(int index) { + if (ignoredFacetValuesBuilder_ == null) { + return ignoredFacetValues_.get(index); + } else { + return ignoredFacetValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig + .IgnoredFacetValuesOrBuilder> + getIgnoredFacetValuesOrBuilderList() { + if (ignoredFacetValuesBuilder_ != null) { + return ignoredFacetValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ignoredFacetValues_); + } + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + addIgnoredFacetValuesBuilder() { + return getIgnoredFacetValuesFieldBuilder() + .addBuilder( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + addIgnoredFacetValuesBuilder(int index) { + return getIgnoredFacetValuesFieldBuilder() + .addBuilder( + index, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public java.util.List< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder> + getIgnoredFacetValuesBuilderList() { + return getIgnoredFacetValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder> + getIgnoredFacetValuesFieldBuilder() { + if (ignoredFacetValuesBuilder_ == null) { + ignoredFacetValuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues + .Builder, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig + .IgnoredFacetValuesOrBuilder>( + ignoredFacetValues_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + ignoredFacetValues_ = null; + } + return ignoredFacetValuesBuilder_; + } + + private java.util.List< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue> + mergedFacetValues_ = java.util.Collections.emptyList(); + + private void ensureMergedFacetValuesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + mergedFacetValues_ = + new java.util.ArrayList< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue>( + mergedFacetValues_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.Builder, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder> + mergedFacetValuesBuilder_; + + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public java.util.List< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue> + getMergedFacetValuesList() { + if (mergedFacetValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(mergedFacetValues_); + } else { + return mergedFacetValuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public int getMergedFacetValuesCount() { + if (mergedFacetValuesBuilder_ == null) { + return mergedFacetValues_.size(); + } else { + return mergedFacetValuesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + getMergedFacetValues(int index) { + if (mergedFacetValuesBuilder_ == null) { + return mergedFacetValues_.get(index); + } else { + return mergedFacetValuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder setMergedFacetValues( + int index, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue value) { + if (mergedFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.set(index, value); + onChanged(); + } else { + mergedFacetValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder setMergedFacetValues( + int index, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + builderForValue) { + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.set(index, builderForValue.build()); + onChanged(); + } else { + mergedFacetValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder addMergedFacetValues( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue value) { + if (mergedFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.add(value); + onChanged(); + } else { + mergedFacetValuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder addMergedFacetValues( + int index, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue value) { + if (mergedFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.add(index, value); + onChanged(); + } else { + mergedFacetValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder addMergedFacetValues( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + builderForValue) { + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.add(builderForValue.build()); + onChanged(); + } else { + mergedFacetValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder addMergedFacetValues( + int index, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + builderForValue) { + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.add(index, builderForValue.build()); + onChanged(); + } else { + mergedFacetValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder addAllMergedFacetValues( + java.lang.Iterable< + ? extends + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue> + values) { + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mergedFacetValues_); + onChanged(); + } else { + mergedFacetValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder clearMergedFacetValues() { + if (mergedFacetValuesBuilder_ == null) { + mergedFacetValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + mergedFacetValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder removeMergedFacetValues(int index) { + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.remove(index); + onChanged(); + } else { + mergedFacetValuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + getMergedFacetValuesBuilder(int index) { + return getMergedFacetValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder + getMergedFacetValuesOrBuilder(int index) { + if (mergedFacetValuesBuilder_ == null) { + return mergedFacetValues_.get(index); + } else { + return mergedFacetValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder> + getMergedFacetValuesOrBuilderList() { + if (mergedFacetValuesBuilder_ != null) { + return mergedFacetValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(mergedFacetValues_); + } + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + addMergedFacetValuesBuilder() { + return getMergedFacetValuesFieldBuilder() + .addBuilder( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + addMergedFacetValuesBuilder(int index) { + return getMergedFacetValuesFieldBuilder() + .addBuilder( + index, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public java.util.List< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.Builder> + getMergedFacetValuesBuilderList() { + return getMergedFacetValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.Builder, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder> + getMergedFacetValuesFieldBuilder() { + if (mergedFacetValuesBuilder_ == null) { + mergedFacetValuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.Builder, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig + .MergedFacetValueOrBuilder>( + mergedFacetValues_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + mergedFacetValues_ = null; + } + return mergedFacetValuesBuilder_; + } + + private com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet mergedFacet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet.Builder, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetOrBuilder> + mergedFacetBuilder_; + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return Whether the mergedFacet field is set. + */ + public boolean hasMergedFacet() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return The mergedFacet. + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet getMergedFacet() { + if (mergedFacetBuilder_ == null) { + return mergedFacet_ == null + ? com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance() + : mergedFacet_; + } else { + return mergedFacetBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public Builder setMergedFacet( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet value) { + if (mergedFacetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mergedFacet_ = value; + } else { + mergedFacetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public Builder setMergedFacet( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet.Builder + builderForValue) { + if (mergedFacetBuilder_ == null) { + mergedFacet_ = builderForValue.build(); + } else { + mergedFacetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public Builder mergeMergedFacet( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet value) { + if (mergedFacetBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && mergedFacet_ != null + && mergedFacet_ + != com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance()) { + getMergedFacetBuilder().mergeFrom(value); + } else { + mergedFacet_ = value; + } + } else { + mergedFacetBuilder_.mergeFrom(value); + } + if (mergedFacet_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public Builder clearMergedFacet() { + bitField0_ = (bitField0_ & ~0x00000008); + mergedFacet_ = null; + if (mergedFacetBuilder_ != null) { + mergedFacetBuilder_.dispose(); + mergedFacetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet.Builder + getMergedFacetBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getMergedFacetFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetOrBuilder + getMergedFacetOrBuilder() { + if (mergedFacetBuilder_ != null) { + return mergedFacetBuilder_.getMessageOrBuilder(); + } else { + return mergedFacet_ == null + ? com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance() + : mergedFacet_; + } + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet.Builder, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetOrBuilder> + getMergedFacetFieldBuilder() { + if (mergedFacetBuilder_ == null) { + mergedFacetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet.Builder, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetOrBuilder>( + getMergedFacet(), getParentForChildren(), isClean()); + mergedFacet_ = null; + } + return mergedFacetBuilder_; + } + + private com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerankConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig.Builder, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfigOrBuilder> + rerankConfigBuilder_; + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return Whether the rerankConfig field is set. + */ + public boolean hasRerankConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return The rerankConfig. + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig + getRerankConfig() { + if (rerankConfigBuilder_ == null) { + return rerankConfig_ == null + ? com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance() + : rerankConfig_; + } else { + return rerankConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public Builder setRerankConfig( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig value) { + if (rerankConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rerankConfig_ = value; + } else { + rerankConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public Builder setRerankConfig( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig.Builder + builderForValue) { + if (rerankConfigBuilder_ == null) { + rerankConfig_ = builderForValue.build(); + } else { + rerankConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public Builder mergeRerankConfig( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig value) { + if (rerankConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && rerankConfig_ != null + && rerankConfig_ + != com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance()) { + getRerankConfigBuilder().mergeFrom(value); + } else { + rerankConfig_ = value; + } + } else { + rerankConfigBuilder_.mergeFrom(value); + } + if (rerankConfig_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public Builder clearRerankConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + rerankConfig_ = null; + if (rerankConfigBuilder_ != null) { + rerankConfigBuilder_.dispose(); + rerankConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig.Builder + getRerankConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getRerankConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfigOrBuilder + getRerankConfigOrBuilder() { + if (rerankConfigBuilder_ != null) { + return rerankConfigBuilder_.getMessageOrBuilder(); + } else { + return rerankConfig_ == null + ? com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance() + : rerankConfig_; + } + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig.Builder, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfigOrBuilder> + getRerankConfigFieldBuilder() { + if (rerankConfigBuilder_ == null) { + rerankConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig.Builder, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfigOrBuilder>( + getRerankConfig(), getParentForChildren(), isClean()); + rerankConfig_ = null; + } + return rerankConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.CatalogAttribute.FacetConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.CatalogAttribute.FacetConfig) + private static final com.google.cloud.retail.v2.CatalogAttribute.FacetConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2.CatalogAttribute.FacetConfig(); + } + + public static com.google.cloud.retail.v2.CatalogAttribute.FacetConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FacetConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2.CatalogAttribute.FacetConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; public static final int KEY_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -1197,7 +8999,9 @@ public com.google.cloud.retail.v2.CatalogAttribute.AttributeType getType() { * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.IndexableOption indexable_option = 5; @@ -1218,7 +9022,9 @@ public int getIndexableOptionValue() { * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.IndexableOption indexable_option = 5; @@ -1304,7 +9110,9 @@ public int getDynamicFacetableOptionValue() { * [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.SearchableOption searchable_option = 7; @@ -1330,7 +9138,9 @@ public int getSearchableOptionValue() { * [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.SearchableOption searchable_option = 7; @@ -1440,6 +9250,57 @@ public com.google.cloud.retail.v2.CatalogAttribute.RetrievableOption getRetrieva : result; } + public static final int FACET_CONFIG_FIELD_NUMBER = 13; + private com.google.cloud.retail.v2.CatalogAttribute.FacetConfig facetConfig_; + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return Whether the facetConfig field is set. + */ + @java.lang.Override + public boolean hasFacetConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return The facetConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig getFacetConfig() { + return facetConfig_ == null + ? com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.getDefaultInstance() + : facetConfig_; + } + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig facet_config = 13; + */ + @java.lang.Override + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfigOrBuilder + getFacetConfigOrBuilder() { + return facetConfig_ == null + ? com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.getDefaultInstance() + : facetConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1492,6 +9353,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(12, retrievableOption_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(13, getFacetConfig()); + } getUnknownFields().writeTo(output); } @@ -1539,6 +9403,9 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, retrievableOption_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getFacetConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1563,6 +9430,10 @@ public boolean equals(final java.lang.Object obj) { if (searchableOption_ != other.searchableOption_) return false; if (exactSearchableOption_ != other.exactSearchableOption_) return false; if (retrievableOption_ != other.retrievableOption_) return false; + if (hasFacetConfig() != other.hasFacetConfig()) return false; + if (hasFacetConfig()) { + if (!getFacetConfig().equals(other.getFacetConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1590,6 +9461,10 @@ public int hashCode() { hash = (53 * hash) + exactSearchableOption_; hash = (37 * hash) + RETRIEVABLE_OPTION_FIELD_NUMBER; hash = (53 * hash) + retrievableOption_; + if (hasFacetConfig()) { + hash = (37 * hash) + FACET_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getFacetConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1720,10 +9595,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.CatalogAttribute.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFacetConfigFieldBuilder(); + } } @java.lang.Override @@ -1738,6 +9622,11 @@ public Builder clear() { searchableOption_ = 0; exactSearchableOption_ = 0; retrievableOption_ = 0; + facetConfig_ = null; + if (facetConfigBuilder_ != null) { + facetConfigBuilder_.dispose(); + facetConfigBuilder_ = null; + } return this; } @@ -1798,6 +9687,13 @@ private void buildPartial0(com.google.cloud.retail.v2.CatalogAttribute result) { if (((from_bitField0_ & 0x00000080) != 0)) { result.retrievableOption_ = retrievableOption_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000100) != 0)) { + result.facetConfig_ = + facetConfigBuilder_ == null ? facetConfig_ : facetConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1871,6 +9767,9 @@ public Builder mergeFrom(com.google.cloud.retail.v2.CatalogAttribute other) { if (other.retrievableOption_ != 0) { setRetrievableOptionValue(other.getRetrievableOptionValue()); } + if (other.hasFacetConfig()) { + mergeFacetConfig(other.getFacetConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1945,6 +9844,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000080; break; } // case 96 + case 106: + { + input.readMessage(getFacetConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2357,7 +10262,9 @@ public Builder clearType() { * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.IndexableOption indexable_option = 5; @@ -2378,7 +10285,9 @@ public int getIndexableOptionValue() { * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.IndexableOption indexable_option = 5; @@ -2402,7 +10311,9 @@ public Builder setIndexableOptionValue(int value) { * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.IndexableOption indexable_option = 5; @@ -2427,7 +10338,9 @@ public com.google.cloud.retail.v2.CatalogAttribute.IndexableOption getIndexableO * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.IndexableOption indexable_option = 5; @@ -2455,7 +10368,9 @@ public Builder setIndexableOption( * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.IndexableOption indexable_option = 5; @@ -2615,7 +10530,9 @@ public Builder clearDynamicFacetableOption() { * [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.SearchableOption searchable_option = 7; @@ -2641,7 +10558,9 @@ public int getSearchableOptionValue() { * [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.SearchableOption searchable_option = 7; @@ -2670,7 +10589,9 @@ public Builder setSearchableOptionValue(int value) { * [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.SearchableOption searchable_option = 7; @@ -2700,7 +10621,9 @@ public com.google.cloud.retail.v2.CatalogAttribute.SearchableOption getSearchabl * [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.SearchableOption searchable_option = 7; @@ -2733,7 +10656,9 @@ public Builder setSearchableOption( * [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.SearchableOption searchable_option = 7; @@ -2981,6 +10906,194 @@ public Builder clearRetrievableOption() { return this; } + private com.google.cloud.retail.v2.CatalogAttribute.FacetConfig facetConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.Builder, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfigOrBuilder> + facetConfigBuilder_; + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return Whether the facetConfig field is set. + */ + public boolean hasFacetConfig() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return The facetConfig. + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig getFacetConfig() { + if (facetConfigBuilder_ == null) { + return facetConfig_ == null + ? com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.getDefaultInstance() + : facetConfig_; + } else { + return facetConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig facet_config = 13; + */ + public Builder setFacetConfig(com.google.cloud.retail.v2.CatalogAttribute.FacetConfig value) { + if (facetConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + facetConfig_ = value; + } else { + facetConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig facet_config = 13; + */ + public Builder setFacetConfig( + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.Builder builderForValue) { + if (facetConfigBuilder_ == null) { + facetConfig_ = builderForValue.build(); + } else { + facetConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig facet_config = 13; + */ + public Builder mergeFacetConfig(com.google.cloud.retail.v2.CatalogAttribute.FacetConfig value) { + if (facetConfigBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && facetConfig_ != null + && facetConfig_ + != com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.getDefaultInstance()) { + getFacetConfigBuilder().mergeFrom(value); + } else { + facetConfig_ = value; + } + } else { + facetConfigBuilder_.mergeFrom(value); + } + if (facetConfig_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig facet_config = 13; + */ + public Builder clearFacetConfig() { + bitField0_ = (bitField0_ & ~0x00000100); + facetConfig_ = null; + if (facetConfigBuilder_ != null) { + facetConfigBuilder_.dispose(); + facetConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig facet_config = 13; + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.Builder getFacetConfigBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getFacetConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig facet_config = 13; + */ + public com.google.cloud.retail.v2.CatalogAttribute.FacetConfigOrBuilder + getFacetConfigOrBuilder() { + if (facetConfigBuilder_ != null) { + return facetConfigBuilder_.getMessageOrBuilder(); + } else { + return facetConfig_ == null + ? com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.getDefaultInstance() + : facetConfig_; + } + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig facet_config = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.Builder, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfigOrBuilder> + getFacetConfigFieldBuilder() { + if (facetConfigBuilder_ == null) { + facetConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig.Builder, + com.google.cloud.retail.v2.CatalogAttribute.FacetConfigOrBuilder>( + getFacetConfig(), getParentForChildren(), isClean()); + facetConfig_ = null; + } + return facetConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogAttributeOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogAttributeOrBuilder.java index 2c2075e8575f..5e078a90135a 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogAttributeOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogAttributeOrBuilder.java @@ -145,7 +145,9 @@ public interface CatalogAttributeOrBuilder * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.IndexableOption indexable_option = 5; @@ -163,7 +165,9 @@ public interface CatalogAttributeOrBuilder * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.IndexableOption indexable_option = 5; @@ -226,7 +230,9 @@ public interface CatalogAttributeOrBuilder * [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.SearchableOption searchable_option = 7; @@ -249,7 +255,9 @@ public interface CatalogAttributeOrBuilder * [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. *
* * .google.cloud.retail.v2.CatalogAttribute.SearchableOption searchable_option = 7; @@ -325,4 +333,39 @@ public interface CatalogAttributeOrBuilder * @return The retrievableOption. */ com.google.cloud.retail.v2.CatalogAttribute.RetrievableOption getRetrievableOption(); + + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return Whether the facetConfig field is set. + */ + boolean hasFacetConfig(); + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return The facetConfig. + */ + com.google.cloud.retail.v2.CatalogAttribute.FacetConfig getFacetConfig(); + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2.CatalogAttribute.FacetConfig facet_config = 13; + */ + com.google.cloud.retail.v2.CatalogAttribute.FacetConfigOrBuilder getFacetConfigOrBuilder(); } diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogProto.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogProto.java index ea3919a639cd..8f91d62a191a 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogProto.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogProto.java @@ -36,6 +36,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2_CatalogAttribute_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2_CatalogAttribute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_IgnoredFacetValues_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacetValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacet_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_RerankConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_RerankConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_retail_v2_AttributesConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -66,78 +86,99 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "_behavior.proto\032\031google/api/resource.pro" + "to\032#google/cloud/retail/v2/common.proto\032" + "*google/cloud/retail/v2/import_config.pr" - + "oto\"^\n\022ProductLevelConfig\022\036\n\026ingestion_p" - + "roduct_type\030\001 \001(\t\022(\n merchant_center_pro" - + "duct_id_field\030\002 \001(\t\"\277\t\n\020CatalogAttribute" - + "\022\020\n\003key\030\001 \001(\tB\003\340A\002\022\023\n\006in_use\030\t \001(\010B\003\340A\003\022" - + "I\n\004type\030\n \001(\01626.google.cloud.retail.v2.C" - + "atalogAttribute.AttributeTypeB\003\340A\003\022R\n\020in" - + "dexable_option\030\005 \001(\01628.google.cloud.reta" - + "il.v2.CatalogAttribute.IndexableOption\022a" - + "\n\030dynamic_facetable_option\030\006 \001(\0162?.googl" - + "e.cloud.retail.v2.CatalogAttribute.Dynam" - + "icFacetableOption\022T\n\021searchable_option\030\007" - + " \001(\01629.google.cloud.retail.v2.CatalogAtt" - + "ribute.SearchableOption\022_\n\027exact_searcha" - + "ble_option\030\013 \001(\0162>.google.cloud.retail.v" - + "2.CatalogAttribute.ExactSearchableOption" - + "\022V\n\022retrievable_option\030\014 \001(\0162:.google.cl" - + "oud.retail.v2.CatalogAttribute.Retrievab" - + "leOption\"8\n\rAttributeType\022\013\n\007UNKNOWN\020\000\022\013" - + "\n\007TEXTUAL\020\001\022\r\n\tNUMERICAL\020\002\"b\n\017IndexableO" - + "ption\022 \n\034INDEXABLE_OPTION_UNSPECIFIED\020\000\022" - + "\025\n\021INDEXABLE_ENABLED\020\001\022\026\n\022INDEXABLE_DISA" - + "BLED\020\002\"\201\001\n\026DynamicFacetableOption\022(\n$DYN" - + "AMIC_FACETABLE_OPTION_UNSPECIFIED\020\000\022\035\n\031D" - + "YNAMIC_FACETABLE_ENABLED\020\001\022\036\n\032DYNAMIC_FA" - + "CETABLE_DISABLED\020\002\"f\n\020SearchableOption\022!" - + "\n\035SEARCHABLE_OPTION_UNSPECIFIED\020\000\022\026\n\022SEA" - + "RCHABLE_ENABLED\020\001\022\027\n\023SEARCHABLE_DISABLED" - + "\020\002\"}\n\025ExactSearchableOption\022\'\n#EXACT_SEA" - + "RCHABLE_OPTION_UNSPECIFIED\020\000\022\034\n\030EXACT_SE" - + "ARCHABLE_ENABLED\020\001\022\035\n\031EXACT_SEARCHABLE_D" - + "ISABLED\020\002\"j\n\021RetrievableOption\022\"\n\036RETRIE" - + "VABLE_OPTION_UNSPECIFIED\020\000\022\027\n\023RETRIEVABL" - + "E_ENABLED\020\001\022\030\n\024RETRIEVABLE_DISABLED\020\002\"\266\003" - + "\n\020AttributesConfig\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005" - + "\022[\n\022catalog_attributes\030\002 \003(\0132?.google.cl" - + "oud.retail.v2.AttributesConfig.CatalogAt" - + "tributesEntry\022Q\n\026attribute_config_level\030" - + "\003 \001(\0162,.google.cloud.retail.v2.Attribute" - + "ConfigLevelB\003\340A\003\032b\n\026CatalogAttributesEnt" - + "ry\022\013\n\003key\030\001 \001(\t\0227\n\005value\030\002 \001(\0132(.google." - + "cloud.retail.v2.CatalogAttribute:\0028\001:x\352A" - + "u\n&retail.googleapis.com/AttributesConfi" - + "g\022Kprojects/{project}/locations/{locatio" - + "n}/catalogs/{catalog}/attributesConfig\"\231" - + "\005\n\020CompletionConfig\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A" - + "\005\022\026\n\016matching_order\030\002 \001(\t\022\027\n\017max_suggest" - + "ions\030\003 \001(\005\022\031\n\021min_prefix_length\030\004 \001(\005\022\025\n" - + "\rauto_learning\030\013 \001(\010\022X\n\030suggestions_inpu" - + "t_config\030\005 \001(\01321.google.cloud.retail.v2." - + "CompletionDataInputConfigB\003\340A\003\022.\n!last_s" - + "uggestions_import_operation\030\006 \001(\tB\003\340A\003\022U" - + "\n\025denylist_input_config\030\007 \001(\01321.google.c" - + "loud.retail.v2.CompletionDataInputConfig" - + "B\003\340A\003\022+\n\036last_denylist_import_operation\030" - + "\010 \001(\tB\003\340A\003\022V\n\026allowlist_input_config\030\t \001" - + "(\01321.google.cloud.retail.v2.CompletionDa" - + "taInputConfigB\003\340A\003\022,\n\037last_allowlist_imp" - + "ort_operation\030\n \001(\tB\003\340A\003:x\352Au\n&retail.go" - + "ogleapis.com/CompletionConfig\022Kprojects/" - + "{project}/locations/{location}/catalogs/" - + "{catalog}/completionConfig\"\354\001\n\007Catalog\022\024" - + "\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022\034\n\014display_name\030\002 \001" - + "(\tB\006\340A\002\340A\005\022M\n\024product_level_config\030\004 \001(\013" - + "2*.google.cloud.retail.v2.ProductLevelCo" - + "nfigB\003\340A\002:^\352A[\n\035retail.googleapis.com/Ca" - + "talog\022:projects/{project}/locations/{loc" - + "ation}/catalogs/{catalog}B\267\001\n\032com.google" - + ".cloud.retail.v2B\014CatalogProtoP\001Z2cloud." - + "google.com/go/retail/apiv2/retailpb;reta" - + "ilpb\242\002\006RETAIL\252\002\026Google.Cloud.Retail.V2\312\002" - + "\026Google\\Cloud\\Retail\\V2\352\002\031Google::Cloud:" - + ":Retail::V2b\006proto3" + + "oto\032\037google/protobuf/timestamp.proto\"^\n\022" + + "ProductLevelConfig\022\036\n\026ingestion_product_" + + "type\030\001 \001(\t\022(\n merchant_center_product_id" + + "_field\030\002 \001(\t\"\367\017\n\020CatalogAttribute\022\020\n\003key" + + "\030\001 \001(\tB\003\340A\002\022\023\n\006in_use\030\t \001(\010B\003\340A\003\022I\n\004type" + + "\030\n \001(\01626.google.cloud.retail.v2.CatalogA" + + "ttribute.AttributeTypeB\003\340A\003\022R\n\020indexable" + + "_option\030\005 \001(\01628.google.cloud.retail.v2.C" + + "atalogAttribute.IndexableOption\022a\n\030dynam" + + "ic_facetable_option\030\006 \001(\0162?.google.cloud" + + ".retail.v2.CatalogAttribute.DynamicFacet" + + "ableOption\022T\n\021searchable_option\030\007 \001(\01629." + + "google.cloud.retail.v2.CatalogAttribute." + + "SearchableOption\022_\n\027exact_searchable_opt" + + "ion\030\013 \001(\0162>.google.cloud.retail.v2.Catal" + + "ogAttribute.ExactSearchableOption\022V\n\022ret" + + "rievable_option\030\014 \001(\0162:.google.cloud.ret" + + "ail.v2.CatalogAttribute.RetrievableOptio" + + "n\022J\n\014facet_config\030\r \001(\01324.google.cloud.r" + + "etail.v2.CatalogAttribute.FacetConfig\032\351\005" + + "\n\013FacetConfig\0229\n\017facet_intervals\030\001 \003(\0132 " + + ".google.cloud.retail.v2.Interval\022e\n\024igno" + + "red_facet_values\030\002 \003(\0132G.google.cloud.re" + + "tail.v2.CatalogAttribute.FacetConfig.Ign" + + "oredFacetValues\022b\n\023merged_facet_values\030\003" + + " \003(\0132E.google.cloud.retail.v2.CatalogAtt" + + "ribute.FacetConfig.MergedFacetValue\022V\n\014m" + + "erged_facet\030\004 \001(\0132@.google.cloud.retail." + + "v2.CatalogAttribute.FacetConfig.MergedFa" + + "cet\022X\n\rrerank_config\030\005 \001(\0132A.google.clou" + + "d.retail.v2.CatalogAttribute.FacetConfig" + + ".RerankConfig\032\202\001\n\022IgnoredFacetValues\022\016\n\006" + + "values\030\001 \003(\t\022.\n\nstart_time\030\002 \001(\0132\032.googl" + + "e.protobuf.Timestamp\022,\n\010end_time\030\003 \001(\0132\032" + + ".google.protobuf.Timestamp\0328\n\020MergedFace" + + "tValue\022\016\n\006values\030\001 \003(\t\022\024\n\014merged_value\030\002" + + " \001(\t\032\'\n\013MergedFacet\022\030\n\020merged_facet_key\030" + + "\001 \001(\t\032:\n\014RerankConfig\022\024\n\014rerank_facet\030\001 " + + "\001(\010\022\024\n\014facet_values\030\002 \003(\t\"8\n\rAttributeTy" + + "pe\022\013\n\007UNKNOWN\020\000\022\013\n\007TEXTUAL\020\001\022\r\n\tNUMERICA" + + "L\020\002\"b\n\017IndexableOption\022 \n\034INDEXABLE_OPTI" + + "ON_UNSPECIFIED\020\000\022\025\n\021INDEXABLE_ENABLED\020\001\022" + + "\026\n\022INDEXABLE_DISABLED\020\002\"\201\001\n\026DynamicFacet" + + "ableOption\022(\n$DYNAMIC_FACETABLE_OPTION_U" + + "NSPECIFIED\020\000\022\035\n\031DYNAMIC_FACETABLE_ENABLE" + + "D\020\001\022\036\n\032DYNAMIC_FACETABLE_DISABLED\020\002\"f\n\020S" + + "earchableOption\022!\n\035SEARCHABLE_OPTION_UNS" + + "PECIFIED\020\000\022\026\n\022SEARCHABLE_ENABLED\020\001\022\027\n\023SE" + + "ARCHABLE_DISABLED\020\002\"}\n\025ExactSearchableOp" + + "tion\022\'\n#EXACT_SEARCHABLE_OPTION_UNSPECIF" + + "IED\020\000\022\034\n\030EXACT_SEARCHABLE_ENABLED\020\001\022\035\n\031E" + + "XACT_SEARCHABLE_DISABLED\020\002\"j\n\021Retrievabl" + + "eOption\022\"\n\036RETRIEVABLE_OPTION_UNSPECIFIE" + + "D\020\000\022\027\n\023RETRIEVABLE_ENABLED\020\001\022\030\n\024RETRIEVA" + + "BLE_DISABLED\020\002\"\266\003\n\020AttributesConfig\022\024\n\004n" + + "ame\030\001 \001(\tB\006\340A\002\340A\005\022[\n\022catalog_attributes\030" + + "\002 \003(\0132?.google.cloud.retail.v2.Attribute" + + "sConfig.CatalogAttributesEntry\022Q\n\026attrib" + + "ute_config_level\030\003 \001(\0162,.google.cloud.re" + + "tail.v2.AttributeConfigLevelB\003\340A\003\032b\n\026Cat" + + "alogAttributesEntry\022\013\n\003key\030\001 \001(\t\0227\n\005valu" + + "e\030\002 \001(\0132(.google.cloud.retail.v2.Catalog" + + "Attribute:\0028\001:x\352Au\n&retail.googleapis.co" + + "m/AttributesConfig\022Kprojects/{project}/l" + + "ocations/{location}/catalogs/{catalog}/a" + + "ttributesConfig\"\231\005\n\020CompletionConfig\022\024\n\004" + + "name\030\001 \001(\tB\006\340A\002\340A\005\022\026\n\016matching_order\030\002 \001" + + "(\t\022\027\n\017max_suggestions\030\003 \001(\005\022\031\n\021min_prefi" + + "x_length\030\004 \001(\005\022\025\n\rauto_learning\030\013 \001(\010\022X\n" + + "\030suggestions_input_config\030\005 \001(\01321.google" + + ".cloud.retail.v2.CompletionDataInputConf" + + "igB\003\340A\003\022.\n!last_suggestions_import_opera" + + "tion\030\006 \001(\tB\003\340A\003\022U\n\025denylist_input_config" + + "\030\007 \001(\01321.google.cloud.retail.v2.Completi" + + "onDataInputConfigB\003\340A\003\022+\n\036last_denylist_" + + "import_operation\030\010 \001(\tB\003\340A\003\022V\n\026allowlist" + + "_input_config\030\t \001(\01321.google.cloud.retai" + + "l.v2.CompletionDataInputConfigB\003\340A\003\022,\n\037l" + + "ast_allowlist_import_operation\030\n \001(\tB\003\340A" + + "\003:x\352Au\n&retail.googleapis.com/Completion" + + "Config\022Kprojects/{project}/locations/{lo" + + "cation}/catalogs/{catalog}/completionCon" + + "fig\"\354\001\n\007Catalog\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022\034\n" + + "\014display_name\030\002 \001(\tB\006\340A\002\340A\005\022M\n\024product_l" + + "evel_config\030\004 \001(\0132*.google.cloud.retail." + + "v2.ProductLevelConfigB\003\340A\002:^\352A[\n\035retail." + + "googleapis.com/Catalog\022:projects/{projec" + + "t}/locations/{location}/catalogs/{catalo" + + "g}B\267\001\n\032com.google.cloud.retail.v2B\014Catal" + + "ogProtoP\001Z2cloud.google.com/go/retail/ap" + + "iv2/retailpb;retailpb\242\002\006RETAIL\252\002\026Google." + + "Cloud.Retail.V2\312\002\026Google\\Cloud\\Retail\\V2" + + "\352\002\031Google::Cloud::Retail::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -147,6 +188,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.cloud.retail.v2.CommonProto.getDescriptor(), com.google.cloud.retail.v2.ImportConfigProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_retail_v2_ProductLevelConfig_descriptor = getDescriptor().getMessageTypes().get(0); @@ -170,6 +212,59 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SearchableOption", "ExactSearchableOption", "RetrievableOption", + "FacetConfig", + }); + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_descriptor = + internal_static_google_cloud_retail_v2_CatalogAttribute_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_descriptor, + new java.lang.String[] { + "FacetIntervals", + "IgnoredFacetValues", + "MergedFacetValues", + "MergedFacet", + "RerankConfig", + }); + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor = + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_IgnoredFacetValues_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor, + new java.lang.String[] { + "Values", "StartTime", "EndTime", + }); + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor = + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacetValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor, + new java.lang.String[] { + "Values", "MergedValue", + }); + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacet_descriptor = + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_MergedFacet_descriptor, + new java.lang.String[] { + "MergedFacetKey", + }); + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_RerankConfig_descriptor = + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_RerankConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2_CatalogAttribute_FacetConfig_RerankConfig_descriptor, + new java.lang.String[] { + "RerankFacet", "FacetValues", }); internal_static_google_cloud_retail_v2_AttributesConfig_descriptor = getDescriptor().getMessageTypes().get(2); @@ -223,6 +318,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.cloud.retail.v2.CommonProto.getDescriptor(); com.google.cloud.retail.v2.ImportConfigProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CommonProto.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CommonProto.java index 215fcb36d863..ca4a3097ad05 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CommonProto.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CommonProto.java @@ -76,6 +76,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2_Rule_IgnoreAction_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2_Rule_IgnoreAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_FacetPositionAdjustment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2_Rule_RemoveFacetAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2_Rule_RemoveFacetAction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_retail_v2_Audience_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -136,95 +148,106 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n#google/cloud/retail/v2/common.proto\022\026g" + "oogle.cloud.retail.v2\032\037google/api/field_" + "behavior.proto\032\037google/protobuf/timestam" - + "p.proto\"\260\002\n\tCondition\022@\n\013query_terms\030\001 \003" + + "p.proto\"\311\002\n\tCondition\022@\n\013query_terms\030\001 \003" + "(\0132+.google.cloud.retail.v2.Condition.Qu" + "eryTerm\022F\n\021active_time_range\030\003 \003(\0132+.goo" - + "gle.cloud.retail.v2.Condition.TimeRange\032" - + ".\n\tQueryTerm\022\r\n\005value\030\001 \001(\t\022\022\n\nfull_matc" - + "h\030\002 \001(\010\032i\n\tTimeRange\022.\n\nstart_time\030\001 \001(\013" - + "2\032.google.protobuf.Timestamp\022,\n\010end_time" - + "\030\002 \001(\0132\032.google.protobuf.Timestamp\"\375\010\n\004R" - + "ule\022@\n\014boost_action\030\002 \001(\0132(.google.cloud" - + ".retail.v2.Rule.BoostActionH\000\022F\n\017redirec" - + "t_action\030\003 \001(\0132+.google.cloud.retail.v2." - + "Rule.RedirectActionH\000\022S\n\026oneway_synonyms" - + "_action\030\006 \001(\01321.google.cloud.retail.v2.R" - + "ule.OnewaySynonymsActionH\000\022T\n\027do_not_ass" - + "ociate_action\030\007 \001(\01321.google.cloud.retai" - + "l.v2.Rule.DoNotAssociateActionH\000\022L\n\022repl" - + "acement_action\030\010 \001(\0132..google.cloud.reta" - + "il.v2.Rule.ReplacementActionH\000\022B\n\rignore" - + "_action\030\t \001(\0132).google.cloud.retail.v2.R" - + "ule.IgnoreActionH\000\022B\n\rfilter_action\030\n \001(" - + "\0132).google.cloud.retail.v2.Rule.FilterAc" - + "tionH\000\022S\n\026twoway_synonyms_action\030\013 \001(\01321" - + ".google.cloud.retail.v2.Rule.TwowaySynon" - + "ymsActionH\000\0229\n\tcondition\030\001 \001(\0132!.google." - + "cloud.retail.v2.ConditionB\003\340A\002\0325\n\013BoostA" - + "ction\022\r\n\005boost\030\001 \001(\002\022\027\n\017products_filter\030" - + "\002 \001(\t\032\036\n\014FilterAction\022\016\n\006filter\030\001 \001(\t\032&\n" - + "\016RedirectAction\022\024\n\014redirect_uri\030\001 \001(\t\032(\n" - + "\024TwowaySynonymsAction\022\020\n\010synonyms\030\001 \003(\t\032" - + "S\n\024OnewaySynonymsAction\022\023\n\013query_terms\030\003" - + " \003(\t\022\020\n\010synonyms\030\004 \003(\t\022\024\n\014oneway_terms\030\002" - + " \003(\t\032Z\n\024DoNotAssociateAction\022\023\n\013query_te" - + "rms\030\002 \003(\t\022\036\n\026do_not_associate_terms\030\003 \003(" - + "\t\022\r\n\005terms\030\001 \003(\t\032P\n\021ReplacementAction\022\023\n" - + "\013query_terms\030\002 \003(\t\022\030\n\020replacement_term\030\003" - + " \001(\t\022\014\n\004term\030\001 \001(\t\032$\n\014IgnoreAction\022\024\n\014ig" - + "nore_terms\030\001 \003(\tB\010\n\006action\"/\n\010Audience\022\017" - + "\n\007genders\030\001 \003(\t\022\022\n\nage_groups\030\002 \003(\t\"3\n\tC" - + "olorInfo\022\026\n\016color_families\030\001 \003(\t\022\016\n\006colo" - + "rs\030\002 \003(\t\"\206\001\n\017CustomAttribute\022\014\n\004text\030\001 \003" - + "(\t\022\017\n\007numbers\030\002 \003(\001\022\033\n\nsearchable\030\003 \001(\010B" - + "\002\030\001H\000\210\001\001\022\032\n\tindexable\030\004 \001(\010B\002\030\001H\001\210\001\001B\r\n\013" - + "_searchableB\014\n\n_indexable\"2\n\017Fulfillment" - + "Info\022\014\n\004type\030\001 \001(\t\022\021\n\tplace_ids\030\002 \003(\t\"8\n" - + "\005Image\022\020\n\003uri\030\001 \001(\tB\003\340A\002\022\016\n\006height\030\002 \001(\005" - + "\022\r\n\005width\030\003 \001(\005\"x\n\010Interval\022\021\n\007minimum\030\001" - + " \001(\001H\000\022\033\n\021exclusive_minimum\030\002 \001(\001H\000\022\021\n\007m" - + "aximum\030\003 \001(\001H\001\022\033\n\021exclusive_maximum\030\004 \001(" - + "\001H\001B\005\n\003minB\005\n\003max\"\211\003\n\tPriceInfo\022\025\n\rcurre" - + "ncy_code\030\001 \001(\t\022\r\n\005price\030\002 \001(\002\022\026\n\016origina" - + "l_price\030\003 \001(\002\022\014\n\004cost\030\004 \001(\002\0228\n\024price_eff" - + "ective_time\030\005 \001(\0132\032.google.protobuf.Time" - + "stamp\0225\n\021price_expire_time\030\006 \001(\0132\032.googl" - + "e.protobuf.Timestamp\022F\n\013price_range\030\007 \001(" - + "\0132,.google.cloud.retail.v2.PriceInfo.Pri" - + "ceRangeB\003\340A\003\032w\n\nPriceRange\022/\n\005price\030\001 \001(" - + "\0132 .google.cloud.retail.v2.Interval\0228\n\016o" - + "riginal_price\030\002 \001(\0132 .google.cloud.retai" - + "l.v2.Interval\"P\n\006Rating\022\024\n\014rating_count\030" - + "\001 \001(\005\022\026\n\016average_rating\030\002 \001(\002\022\030\n\020rating_" - + "histogram\030\003 \003(\005\"`\n\010UserInfo\022\017\n\007user_id\030\001" - + " \001(\t\022\022\n\nip_address\030\002 \001(\t\022\022\n\nuser_agent\030\003" - + " \001(\t\022\033\n\023direct_user_request\030\004 \001(\010\"\241\002\n\016Lo" - + "calInventory\022\020\n\010place_id\030\001 \001(\t\0225\n\nprice_" - + "info\030\002 \001(\0132!.google.cloud.retail.v2.Pric" - + "eInfo\022J\n\nattributes\030\003 \003(\01326.google.cloud" - + ".retail.v2.LocalInventory.AttributesEntr" - + "y\022\036\n\021fulfillment_types\030\004 \003(\tB\003\340A\004\032Z\n\017Att" - + "ributesEntry\022\013\n\003key\030\001 \001(\t\0226\n\005value\030\002 \001(\013" - + "2\'.google.cloud.retail.v2.CustomAttribut" - + "e:\0028\001*\206\001\n\024AttributeConfigLevel\022&\n\"ATTRIB" - + "UTE_CONFIG_LEVEL_UNSPECIFIED\020\000\022\"\n\036PRODUC" - + "T_LEVEL_ATTRIBUTE_CONFIG\020\001\022\"\n\036CATALOG_LE" - + "VEL_ATTRIBUTE_CONFIG\020\002*i\n\014SolutionType\022\035" - + "\n\031SOLUTION_TYPE_UNSPECIFIED\020\000\022 \n\034SOLUTIO" - + "N_TYPE_RECOMMENDATION\020\001\022\030\n\024SOLUTION_TYPE" - + "_SEARCH\020\002*\241\001\n\036RecommendationsFilteringOp" - + "tion\0220\n,RECOMMENDATIONS_FILTERING_OPTION" - + "_UNSPECIFIED\020\000\022&\n\"RECOMMENDATIONS_FILTER" - + "ING_DISABLED\020\001\022%\n!RECOMMENDATIONS_FILTER" - + "ING_ENABLED\020\003*\213\001\n\025SearchSolutionUseCase\022" - + "(\n$SEARCH_SOLUTION_USE_CASE_UNSPECIFIED\020" - + "\000\022#\n\037SEARCH_SOLUTION_USE_CASE_SEARCH\020\001\022#" - + "\n\037SEARCH_SOLUTION_USE_CASE_BROWSE\020\002B\266\001\n\032" - + "com.google.cloud.retail.v2B\013CommonProtoP" - + "\001Z2cloud.google.com/go/retail/apiv2/reta" - + "ilpb;retailpb\242\002\006RETAIL\252\002\026Google.Cloud.Re" - + "tail.V2\312\002\026Google\\Cloud\\Retail\\V2\352\002\031Googl" - + "e::Cloud::Retail::V2b\006proto3" + + "gle.cloud.retail.v2.Condition.TimeRange\022" + + "\027\n\017page_categories\030\004 \003(\t\032.\n\tQueryTerm\022\r\n" + + "\005value\030\001 \001(\t\022\022\n\nfull_match\030\002 \001(\010\032i\n\tTime" + + "Range\022.\n\nstart_time\030\001 \001(\0132\032.google.proto" + + "buf.Timestamp\022,\n\010end_time\030\002 \001(\0132\032.google" + + ".protobuf.Timestamp\"\245\014\n\004Rule\022@\n\014boost_ac" + + "tion\030\002 \001(\0132(.google.cloud.retail.v2.Rule" + + ".BoostActionH\000\022F\n\017redirect_action\030\003 \001(\0132" + + "+.google.cloud.retail.v2.Rule.RedirectAc" + + "tionH\000\022S\n\026oneway_synonyms_action\030\006 \001(\01321" + + ".google.cloud.retail.v2.Rule.OnewaySynon" + + "ymsActionH\000\022T\n\027do_not_associate_action\030\007" + + " \001(\01321.google.cloud.retail.v2.Rule.DoNot" + + "AssociateActionH\000\022L\n\022replacement_action\030" + + "\010 \001(\0132..google.cloud.retail.v2.Rule.Repl" + + "acementActionH\000\022B\n\rignore_action\030\t \001(\0132)" + + ".google.cloud.retail.v2.Rule.IgnoreActio" + + "nH\000\022B\n\rfilter_action\030\n \001(\0132).google.clou" + + "d.retail.v2.Rule.FilterActionH\000\022S\n\026twowa" + + "y_synonyms_action\030\013 \001(\01321.google.cloud.r" + + "etail.v2.Rule.TwowaySynonymsActionH\000\022X\n\031" + + "force_return_facet_action\030\014 \001(\01323.google" + + ".cloud.retail.v2.Rule.ForceReturnFacetAc" + + "tionH\000\022M\n\023remove_facet_action\030\r \001(\0132..go" + + "ogle.cloud.retail.v2.Rule.RemoveFacetAct" + + "ionH\000\0229\n\tcondition\030\001 \001(\0132!.google.cloud." + + "retail.v2.ConditionB\003\340A\002\0325\n\013BoostAction\022" + + "\r\n\005boost\030\001 \001(\002\022\027\n\017products_filter\030\002 \001(\t\032" + + "\036\n\014FilterAction\022\016\n\006filter\030\001 \001(\t\032&\n\016Redir" + + "ectAction\022\024\n\014redirect_uri\030\001 \001(\t\032(\n\024Twowa" + + "ySynonymsAction\022\020\n\010synonyms\030\001 \003(\t\032S\n\024One" + + "waySynonymsAction\022\023\n\013query_terms\030\003 \003(\t\022\020" + + "\n\010synonyms\030\004 \003(\t\022\024\n\014oneway_terms\030\002 \003(\t\032Z" + + "\n\024DoNotAssociateAction\022\023\n\013query_terms\030\002 " + + "\003(\t\022\036\n\026do_not_associate_terms\030\003 \003(\t\022\r\n\005t" + + "erms\030\001 \003(\t\032P\n\021ReplacementAction\022\023\n\013query" + + "_terms\030\002 \003(\t\022\030\n\020replacement_term\030\003 \001(\t\022\014" + + "\n\004term\030\001 \001(\t\032$\n\014IgnoreAction\022\024\n\014ignore_t" + + "erms\030\001 \003(\t\032\316\001\n\026ForceReturnFacetAction\022o\n" + + "\032facet_position_adjustments\030\001 \003(\0132K.goog" + + "le.cloud.retail.v2.Rule.ForceReturnFacet" + + "Action.FacetPositionAdjustment\032C\n\027FacetP" + + "ositionAdjustment\022\026\n\016attribute_name\030\001 \001(" + + "\t\022\020\n\010position\030\002 \001(\005\032,\n\021RemoveFacetAction" + + "\022\027\n\017attribute_names\030\001 \003(\tB\010\n\006action\"/\n\010A" + + "udience\022\017\n\007genders\030\001 \003(\t\022\022\n\nage_groups\030\002" + + " \003(\t\"3\n\tColorInfo\022\026\n\016color_families\030\001 \003(" + + "\t\022\016\n\006colors\030\002 \003(\t\"\206\001\n\017CustomAttribute\022\014\n" + + "\004text\030\001 \003(\t\022\017\n\007numbers\030\002 \003(\001\022\033\n\nsearchab" + + "le\030\003 \001(\010B\002\030\001H\000\210\001\001\022\032\n\tindexable\030\004 \001(\010B\002\030\001" + + "H\001\210\001\001B\r\n\013_searchableB\014\n\n_indexable\"2\n\017Fu" + + "lfillmentInfo\022\014\n\004type\030\001 \001(\t\022\021\n\tplace_ids" + + "\030\002 \003(\t\"8\n\005Image\022\020\n\003uri\030\001 \001(\tB\003\340A\002\022\016\n\006hei" + + "ght\030\002 \001(\005\022\r\n\005width\030\003 \001(\005\"x\n\010Interval\022\021\n\007" + + "minimum\030\001 \001(\001H\000\022\033\n\021exclusive_minimum\030\002 \001" + + "(\001H\000\022\021\n\007maximum\030\003 \001(\001H\001\022\033\n\021exclusive_max" + + "imum\030\004 \001(\001H\001B\005\n\003minB\005\n\003max\"\211\003\n\tPriceInfo" + + "\022\025\n\rcurrency_code\030\001 \001(\t\022\r\n\005price\030\002 \001(\002\022\026" + + "\n\016original_price\030\003 \001(\002\022\014\n\004cost\030\004 \001(\002\0228\n\024" + + "price_effective_time\030\005 \001(\0132\032.google.prot" + + "obuf.Timestamp\0225\n\021price_expire_time\030\006 \001(" + + "\0132\032.google.protobuf.Timestamp\022F\n\013price_r" + + "ange\030\007 \001(\0132,.google.cloud.retail.v2.Pric" + + "eInfo.PriceRangeB\003\340A\003\032w\n\nPriceRange\022/\n\005p" + + "rice\030\001 \001(\0132 .google.cloud.retail.v2.Inte" + + "rval\0228\n\016original_price\030\002 \001(\0132 .google.cl" + + "oud.retail.v2.Interval\"P\n\006Rating\022\024\n\014rati" + + "ng_count\030\001 \001(\005\022\026\n\016average_rating\030\002 \001(\002\022\030" + + "\n\020rating_histogram\030\003 \003(\005\"`\n\010UserInfo\022\017\n\007" + + "user_id\030\001 \001(\t\022\022\n\nip_address\030\002 \001(\t\022\022\n\nuse" + + "r_agent\030\003 \001(\t\022\033\n\023direct_user_request\030\004 \001" + + "(\010\"\241\002\n\016LocalInventory\022\020\n\010place_id\030\001 \001(\t\022" + + "5\n\nprice_info\030\002 \001(\0132!.google.cloud.retai" + + "l.v2.PriceInfo\022J\n\nattributes\030\003 \003(\01326.goo" + + "gle.cloud.retail.v2.LocalInventory.Attri" + + "butesEntry\022\036\n\021fulfillment_types\030\004 \003(\tB\003\340" + + "A\004\032Z\n\017AttributesEntry\022\013\n\003key\030\001 \001(\t\0226\n\005va" + + "lue\030\002 \001(\0132\'.google.cloud.retail.v2.Custo" + + "mAttribute:\0028\001*\206\001\n\024AttributeConfigLevel\022" + + "&\n\"ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED\020\000\022" + + "\"\n\036PRODUCT_LEVEL_ATTRIBUTE_CONFIG\020\001\022\"\n\036C" + + "ATALOG_LEVEL_ATTRIBUTE_CONFIG\020\002*i\n\014Solut" + + "ionType\022\035\n\031SOLUTION_TYPE_UNSPECIFIED\020\000\022 " + + "\n\034SOLUTION_TYPE_RECOMMENDATION\020\001\022\030\n\024SOLU" + + "TION_TYPE_SEARCH\020\002*\241\001\n\036RecommendationsFi" + + "lteringOption\0220\n,RECOMMENDATIONS_FILTERI" + + "NG_OPTION_UNSPECIFIED\020\000\022&\n\"RECOMMENDATIO" + + "NS_FILTERING_DISABLED\020\001\022%\n!RECOMMENDATIO" + + "NS_FILTERING_ENABLED\020\003*\213\001\n\025SearchSolutio" + + "nUseCase\022(\n$SEARCH_SOLUTION_USE_CASE_UNS" + + "PECIFIED\020\000\022#\n\037SEARCH_SOLUTION_USE_CASE_S" + + "EARCH\020\001\022#\n\037SEARCH_SOLUTION_USE_CASE_BROW" + + "SE\020\002B\266\001\n\032com.google.cloud.retail.v2B\013Com" + + "monProtoP\001Z2cloud.google.com/go/retail/a" + + "piv2/retailpb;retailpb\242\002\006RETAIL\252\002\026Google" + + ".Cloud.Retail.V2\312\002\026Google\\Cloud\\Retail\\V" + + "2\352\002\031Google::Cloud::Retail::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -239,7 +262,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2_Condition_descriptor, new java.lang.String[] { - "QueryTerms", "ActiveTimeRange", + "QueryTerms", "ActiveTimeRange", "PageCategories", }); internal_static_google_cloud_retail_v2_Condition_QueryTerm_descriptor = internal_static_google_cloud_retail_v2_Condition_descriptor.getNestedTypes().get(0); @@ -271,6 +294,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "IgnoreAction", "FilterAction", "TwowaySynonymsAction", + "ForceReturnFacetAction", + "RemoveFacetAction", "Condition", "Action", }); @@ -338,6 +363,32 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "IgnoreTerms", }); + internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_descriptor = + internal_static_google_cloud_retail_v2_Rule_descriptor.getNestedTypes().get(8); + internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_descriptor, + new java.lang.String[] { + "FacetPositionAdjustments", + }); + internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor = + internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_FacetPositionAdjustment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor, + new java.lang.String[] { + "AttributeName", "Position", + }); + internal_static_google_cloud_retail_v2_Rule_RemoveFacetAction_descriptor = + internal_static_google_cloud_retail_v2_Rule_descriptor.getNestedTypes().get(9); + internal_static_google_cloud_retail_v2_Rule_RemoveFacetAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2_Rule_RemoveFacetAction_descriptor, + new java.lang.String[] { + "AttributeNames", + }); internal_static_google_cloud_retail_v2_Audience_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_retail_v2_Audience_fieldAccessorTable = diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequest.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequest.java index cb5219ccfe2c..c2d0151e03af 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequest.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequest.java @@ -523,6 +523,26 @@ public int getMaxSuggestions() { return maxSuggestions_; } + public static final int ENABLE_ATTRIBUTE_SUGGESTIONS_FIELD_NUMBER = 9; + private boolean enableAttributeSuggestions_ = false; + /** + * + * + *
+   * If true, attribute suggestions are enabled and provided in response.
+   *
+   * This field is only available for "cloud-retail" dataset.
+   * 
+ * + * bool enable_attribute_suggestions = 9; + * + * @return The enableAttributeSuggestions. + */ + @java.lang.Override + public boolean getEnableAttributeSuggestions() { + return enableAttributeSuggestions_; + } + public static final int ENTITY_FIELD_NUMBER = 10; @SuppressWarnings("serial") @@ -531,10 +551,10 @@ public int getMaxSuggestions() { * * *
-   * The entity for customers that may run multiple different entities, domains,
-   * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+   * The entity for customers who run multiple entities, domains, sites, or
+   * regions, for example, `Google US`, `Google Ads`, `Waymo`,
    * `google.com`, `youtube.com`, etc.
-   * If this is set, it should be exactly matched with
+   * If this is set, it must be an exact match with
    * [UserEvent.entity][google.cloud.retail.v2.UserEvent.entity] to get
    * per-entity autocomplete results.
    * 
@@ -559,10 +579,10 @@ public java.lang.String getEntity() { * * *
-   * The entity for customers that may run multiple different entities, domains,
-   * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+   * The entity for customers who run multiple entities, domains, sites, or
+   * regions, for example, `Google US`, `Google Ads`, `Waymo`,
    * `google.com`, `youtube.com`, etc.
-   * If this is set, it should be exactly matched with
+   * If this is set, it must be an exact match with
    * [UserEvent.entity][google.cloud.retail.v2.UserEvent.entity] to get
    * per-entity autocomplete results.
    * 
@@ -619,6 +639,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(visitorId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, visitorId_); } + if (enableAttributeSuggestions_ != false) { + output.writeBool(9, enableAttributeSuggestions_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entity_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, entity_); } @@ -657,6 +680,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(visitorId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, visitorId_); } + if (enableAttributeSuggestions_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, enableAttributeSuggestions_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entity_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, entity_); } @@ -683,6 +709,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDeviceType().equals(other.getDeviceType())) return false; if (!getDataset().equals(other.getDataset())) return false; if (getMaxSuggestions() != other.getMaxSuggestions()) return false; + if (getEnableAttributeSuggestions() != other.getEnableAttributeSuggestions()) return false; if (!getEntity().equals(other.getEntity())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -711,6 +738,8 @@ public int hashCode() { hash = (53 * hash) + getDataset().hashCode(); hash = (37 * hash) + MAX_SUGGESTIONS_FIELD_NUMBER; hash = (53 * hash) + getMaxSuggestions(); + hash = (37 * hash) + ENABLE_ATTRIBUTE_SUGGESTIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableAttributeSuggestions()); hash = (37 * hash) + ENTITY_FIELD_NUMBER; hash = (53 * hash) + getEntity().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); @@ -859,6 +888,7 @@ public Builder clear() { deviceType_ = ""; dataset_ = ""; maxSuggestions_ = 0; + enableAttributeSuggestions_ = false; entity_ = ""; return this; } @@ -919,6 +949,9 @@ private void buildPartial0(com.google.cloud.retail.v2.CompleteQueryRequest resul result.maxSuggestions_ = maxSuggestions_; } if (((from_bitField0_ & 0x00000080) != 0)) { + result.enableAttributeSuggestions_ = enableAttributeSuggestions_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { result.entity_ = entity_; } } @@ -1007,9 +1040,12 @@ public Builder mergeFrom(com.google.cloud.retail.v2.CompleteQueryRequest other) if (other.getMaxSuggestions() != 0) { setMaxSuggestions(other.getMaxSuggestions()); } + if (other.getEnableAttributeSuggestions() != false) { + setEnableAttributeSuggestions(other.getEnableAttributeSuggestions()); + } if (!other.getEntity().isEmpty()) { entity_ = other.entity_; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -1081,10 +1117,16 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 58 + case 72: + { + enableAttributeSuggestions_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 72 case 82: { entity_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 82 default: @@ -2150,15 +2192,74 @@ public Builder clearMaxSuggestions() { return this; } + private boolean enableAttributeSuggestions_; + /** + * + * + *
+     * If true, attribute suggestions are enabled and provided in response.
+     *
+     * This field is only available for "cloud-retail" dataset.
+     * 
+ * + * bool enable_attribute_suggestions = 9; + * + * @return The enableAttributeSuggestions. + */ + @java.lang.Override + public boolean getEnableAttributeSuggestions() { + return enableAttributeSuggestions_; + } + /** + * + * + *
+     * If true, attribute suggestions are enabled and provided in response.
+     *
+     * This field is only available for "cloud-retail" dataset.
+     * 
+ * + * bool enable_attribute_suggestions = 9; + * + * @param value The enableAttributeSuggestions to set. + * @return This builder for chaining. + */ + public Builder setEnableAttributeSuggestions(boolean value) { + + enableAttributeSuggestions_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, attribute suggestions are enabled and provided in response.
+     *
+     * This field is only available for "cloud-retail" dataset.
+     * 
+ * + * bool enable_attribute_suggestions = 9; + * + * @return This builder for chaining. + */ + public Builder clearEnableAttributeSuggestions() { + bitField0_ = (bitField0_ & ~0x00000080); + enableAttributeSuggestions_ = false; + onChanged(); + return this; + } + private java.lang.Object entity_ = ""; /** * * *
-     * The entity for customers that may run multiple different entities, domains,
-     * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+     * The entity for customers who run multiple entities, domains, sites, or
+     * regions, for example, `Google US`, `Google Ads`, `Waymo`,
      * `google.com`, `youtube.com`, etc.
-     * If this is set, it should be exactly matched with
+     * If this is set, it must be an exact match with
      * [UserEvent.entity][google.cloud.retail.v2.UserEvent.entity] to get
      * per-entity autocomplete results.
      * 
@@ -2182,10 +2283,10 @@ public java.lang.String getEntity() { * * *
-     * The entity for customers that may run multiple different entities, domains,
-     * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+     * The entity for customers who run multiple entities, domains, sites, or
+     * regions, for example, `Google US`, `Google Ads`, `Waymo`,
      * `google.com`, `youtube.com`, etc.
-     * If this is set, it should be exactly matched with
+     * If this is set, it must be an exact match with
      * [UserEvent.entity][google.cloud.retail.v2.UserEvent.entity] to get
      * per-entity autocomplete results.
      * 
@@ -2209,10 +2310,10 @@ public com.google.protobuf.ByteString getEntityBytes() { * * *
-     * The entity for customers that may run multiple different entities, domains,
-     * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+     * The entity for customers who run multiple entities, domains, sites, or
+     * regions, for example, `Google US`, `Google Ads`, `Waymo`,
      * `google.com`, `youtube.com`, etc.
-     * If this is set, it should be exactly matched with
+     * If this is set, it must be an exact match with
      * [UserEvent.entity][google.cloud.retail.v2.UserEvent.entity] to get
      * per-entity autocomplete results.
      * 
@@ -2227,7 +2328,7 @@ public Builder setEntity(java.lang.String value) { throw new NullPointerException(); } entity_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -2235,10 +2336,10 @@ public Builder setEntity(java.lang.String value) { * * *
-     * The entity for customers that may run multiple different entities, domains,
-     * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+     * The entity for customers who run multiple entities, domains, sites, or
+     * regions, for example, `Google US`, `Google Ads`, `Waymo`,
      * `google.com`, `youtube.com`, etc.
-     * If this is set, it should be exactly matched with
+     * If this is set, it must be an exact match with
      * [UserEvent.entity][google.cloud.retail.v2.UserEvent.entity] to get
      * per-entity autocomplete results.
      * 
@@ -2249,7 +2350,7 @@ public Builder setEntity(java.lang.String value) { */ public Builder clearEntity() { entity_ = getDefaultInstance().getEntity(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -2257,10 +2358,10 @@ public Builder clearEntity() { * * *
-     * The entity for customers that may run multiple different entities, domains,
-     * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+     * The entity for customers who run multiple entities, domains, sites, or
+     * regions, for example, `Google US`, `Google Ads`, `Waymo`,
      * `google.com`, `youtube.com`, etc.
-     * If this is set, it should be exactly matched with
+     * If this is set, it must be an exact match with
      * [UserEvent.entity][google.cloud.retail.v2.UserEvent.entity] to get
      * per-entity autocomplete results.
      * 
@@ -2276,7 +2377,7 @@ public Builder setEntityBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); entity_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequestOrBuilder.java index a2ea3d939ae5..ca4d46f32218 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequestOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequestOrBuilder.java @@ -334,10 +334,25 @@ public interface CompleteQueryRequestOrBuilder * * *
-   * The entity for customers that may run multiple different entities, domains,
-   * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+   * If true, attribute suggestions are enabled and provided in response.
+   *
+   * This field is only available for "cloud-retail" dataset.
+   * 
+ * + * bool enable_attribute_suggestions = 9; + * + * @return The enableAttributeSuggestions. + */ + boolean getEnableAttributeSuggestions(); + + /** + * + * + *
+   * The entity for customers who run multiple entities, domains, sites, or
+   * regions, for example, `Google US`, `Google Ads`, `Waymo`,
    * `google.com`, `youtube.com`, etc.
-   * If this is set, it should be exactly matched with
+   * If this is set, it must be an exact match with
    * [UserEvent.entity][google.cloud.retail.v2.UserEvent.entity] to get
    * per-entity autocomplete results.
    * 
@@ -351,10 +366,10 @@ public interface CompleteQueryRequestOrBuilder * * *
-   * The entity for customers that may run multiple different entities, domains,
-   * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+   * The entity for customers who run multiple entities, domains, sites, or
+   * regions, for example, `Google US`, `Google Ads`, `Waymo`,
    * `google.com`, `youtube.com`, etc.
-   * If this is set, it should be exactly matched with
+   * If this is set, it must be an exact match with
    * [UserEvent.entity][google.cloud.retail.v2.UserEvent.entity] to get
    * per-entity autocomplete results.
    * 
diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponse.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponse.java index d71f881d3dba..5020402e4aaf 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponse.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponse.java @@ -1334,6 +1334,7 @@ public com.google.protobuf.Parser getParserForType() { } } + @java.lang.Deprecated public interface RecentSearchResultOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult) @@ -1368,11 +1369,12 @@ public interface RecentSearchResultOrBuilder * * *
-   * Recent search of this user.
+   * Deprecated: Recent search of this user.
    * 
* * Protobuf type {@code google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult} */ + @java.lang.Deprecated public static final class RecentSearchResult extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult) @@ -1625,7 +1627,7 @@ protected Builder newBuilderForType( * * *
-     * Recent search of this user.
+     * Deprecated: Recent search of this user.
      * 
* * Protobuf type {@code google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult} @@ -2144,9 +2146,9 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -2168,10 +2170,11 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() {
    * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public java.util.List getRecentSearchResultsList() { return recentSearchResults_; @@ -2180,9 +2183,9 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -2204,10 +2207,11 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() {
    * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public java.util.List< ? extends com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResultOrBuilder> getRecentSearchResultsOrBuilderList() { @@ -2217,9 +2221,9 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -2241,10 +2245,11 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() {
    * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public int getRecentSearchResultsCount() { return recentSearchResults_.size(); } @@ -2252,9 +2257,9 @@ public int getRecentSearchResultsCount() { * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -2276,10 +2281,11 @@ public int getRecentSearchResultsCount() {
    * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult getRecentSearchResults( int index) { return recentSearchResults_.get(index); @@ -2288,9 +2294,9 @@ public com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult getRe * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -2312,10 +2318,11 @@ public com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult getRe
    * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResultOrBuilder getRecentSearchResultsOrBuilder(int index) { return recentSearchResults_.get(index); @@ -3380,9 +3387,9 @@ private void ensureRecentSearchResultsIsMutable() { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -3404,9 +3411,10 @@ private void ensureRecentSearchResultsIsMutable() {
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public java.util.List getRecentSearchResultsList() { if (recentSearchResultsBuilder_ == null) { @@ -3419,9 +3427,9 @@ private void ensureRecentSearchResultsIsMutable() { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -3443,9 +3451,10 @@ private void ensureRecentSearchResultsIsMutable() {
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public int getRecentSearchResultsCount() { if (recentSearchResultsBuilder_ == null) { return recentSearchResults_.size(); @@ -3457,9 +3466,9 @@ public int getRecentSearchResultsCount() { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -3481,9 +3490,10 @@ public int getRecentSearchResultsCount() {
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult getRecentSearchResults(int index) { if (recentSearchResultsBuilder_ == null) { @@ -3496,9 +3506,9 @@ public int getRecentSearchResultsCount() { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -3520,9 +3530,10 @@ public int getRecentSearchResultsCount() {
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder setRecentSearchResults( int index, com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult value) { if (recentSearchResultsBuilder_ == null) { @@ -3541,9 +3552,9 @@ public Builder setRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -3565,9 +3576,10 @@ public Builder setRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder setRecentSearchResults( int index, com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult.Builder @@ -3585,9 +3597,9 @@ public Builder setRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -3609,9 +3621,10 @@ public Builder setRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder addRecentSearchResults( com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult value) { if (recentSearchResultsBuilder_ == null) { @@ -3630,9 +3643,9 @@ public Builder addRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -3654,9 +3667,10 @@ public Builder addRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder addRecentSearchResults( int index, com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult value) { if (recentSearchResultsBuilder_ == null) { @@ -3675,9 +3689,9 @@ public Builder addRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -3699,9 +3713,10 @@ public Builder addRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder addRecentSearchResults( com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult.Builder builderForValue) { @@ -3718,9 +3733,9 @@ public Builder addRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -3742,9 +3757,10 @@ public Builder addRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder addRecentSearchResults( int index, com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult.Builder @@ -3762,9 +3778,9 @@ public Builder addRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -3786,9 +3802,10 @@ public Builder addRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder addAllRecentSearchResults( java.lang.Iterable< ? extends com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult> @@ -3806,9 +3823,9 @@ public Builder addAllRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -3830,9 +3847,10 @@ public Builder addAllRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder clearRecentSearchResults() { if (recentSearchResultsBuilder_ == null) { recentSearchResults_ = java.util.Collections.emptyList(); @@ -3847,9 +3865,9 @@ public Builder clearRecentSearchResults() { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -3871,9 +3889,10 @@ public Builder clearRecentSearchResults() {
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder removeRecentSearchResults(int index) { if (recentSearchResultsBuilder_ == null) { ensureRecentSearchResultsIsMutable(); @@ -3888,9 +3907,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -3912,9 +3931,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult.Builder getRecentSearchResultsBuilder(int index) { return getRecentSearchResultsFieldBuilder().getBuilder(index); @@ -3923,9 +3943,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -3947,9 +3967,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResultOrBuilder getRecentSearchResultsOrBuilder(int index) { if (recentSearchResultsBuilder_ == null) { @@ -3962,9 +3983,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -3986,9 +4007,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public java.util.List< ? extends com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResultOrBuilder> getRecentSearchResultsOrBuilderList() { @@ -4002,9 +4024,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -4026,9 +4048,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult.Builder addRecentSearchResultsBuilder() { return getRecentSearchResultsFieldBuilder() @@ -4040,9 +4063,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -4064,9 +4087,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult.Builder addRecentSearchResultsBuilder(int index) { return getRecentSearchResultsFieldBuilder() @@ -4079,9 +4103,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -4103,9 +4127,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public java.util.List< com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult.Builder> getRecentSearchResultsBuilderList() { diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponseOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponseOrBuilder.java index 838f2856f366..62ed83e6b952 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponseOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponseOrBuilder.java @@ -129,9 +129,9 @@ public interface CompleteQueryResponseOrBuilder * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -153,18 +153,19 @@ public interface CompleteQueryResponseOrBuilder
    * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated java.util.List getRecentSearchResultsList(); /** * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -186,18 +187,19 @@ public interface CompleteQueryResponseOrBuilder
    * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult getRecentSearchResults( int index); /** * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -219,17 +221,18 @@ com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult getRecentSea
    * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated int getRecentSearchResultsCount(); /** * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -251,9 +254,10 @@ com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult getRecentSea
    * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated java.util.List< ? extends com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResultOrBuilder> getRecentSearchResultsOrBuilderList(); @@ -261,9 +265,9 @@ com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult getRecentSea * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]
@@ -285,9 +289,10 @@ com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult getRecentSea
    * 
* * - * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResultOrBuilder getRecentSearchResultsOrBuilder(int index); } diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionConfig.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionConfig.java index 108f2a158ea4..5e305b973262 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionConfig.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionConfig.java @@ -330,8 +330,8 @@ public com.google.cloud.retail.v2.CompletionDataInputConfig getSuggestionsInputC * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. *
* * @@ -359,8 +359,8 @@ public java.lang.String getLastSuggestionsImportOperation() { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. *
* * @@ -1944,8 +1944,8 @@ public Builder clearSuggestionsInputConfig() { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. *
* * @@ -1972,8 +1972,8 @@ public java.lang.String getLastSuggestionsImportOperation() { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. *
* * @@ -2000,8 +2000,8 @@ public com.google.protobuf.ByteString getLastSuggestionsImportOperationBytes() { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. *
* * @@ -2027,8 +2027,8 @@ public Builder setLastSuggestionsImportOperation(java.lang.String value) { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. *
* * @@ -2050,8 +2050,8 @@ public Builder clearLastSuggestionsImportOperation() { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionConfigOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionConfigOrBuilder.java index cecb1c7d0784..4ff2ba588d87 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionConfigOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionConfigOrBuilder.java @@ -199,8 +199,8 @@ public interface CompletionConfigOrBuilder * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * @@ -217,8 +217,8 @@ public interface CompletionConfigOrBuilder * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionServiceProto.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionServiceProto.java index 5b05b621fc3f..9e5d0d0a0582 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionServiceProto.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionServiceProto.java @@ -64,45 +64,46 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "o\032\031google/api/resource.proto\032#google/clo" + "ud/retail/v2/common.proto\032*google/cloud/" + "retail/v2/import_config.proto\032#google/lo" - + "ngrunning/operations.proto\"\335\001\n\024CompleteQ" + + "ngrunning/operations.proto\"\203\002\n\024CompleteQ" + "ueryRequest\0226\n\007catalog\030\001 \001(\tB%\340A\002\372A\037\n\035re" + "tail.googleapis.com/Catalog\022\022\n\005query\030\002 \001" + "(\tB\003\340A\002\022\022\n\nvisitor_id\030\007 \001(\t\022\026\n\016language_" + "codes\030\003 \003(\t\022\023\n\013device_type\030\004 \001(\t\022\017\n\007data" - + "set\030\006 \001(\t\022\027\n\017max_suggestions\030\005 \001(\005\022\016\n\006en" - + "tity\030\n \001(\t\"\205\004\n\025CompleteQueryResponse\022Z\n\022" - + "completion_results\030\001 \003(\0132>.google.cloud." - + "retail.v2.CompleteQueryResponse.Completi" - + "onResult\022\031\n\021attribution_token\030\002 \001(\t\022_\n\025r" - + "ecent_search_results\030\003 \003(\0132@.google.clou" - + "d.retail.v2.CompleteQueryResponse.Recent" - + "SearchResult\032\346\001\n\020CompletionResult\022\022\n\nsug" - + "gestion\030\001 \001(\t\022b\n\nattributes\030\002 \003(\0132N.goog" - + "le.cloud.retail.v2.CompleteQueryResponse" - + ".CompletionResult.AttributesEntry\032Z\n\017Att" - + "ributesEntry\022\013\n\003key\030\001 \001(\t\0226\n\005value\030\002 \001(\013" - + "2\'.google.cloud.retail.v2.CustomAttribut" - + "e:\0028\001\032+\n\022RecentSearchResult\022\025\n\rrecent_se" - + "arch\030\001 \001(\t2\262\004\n\021CompletionService\022\263\001\n\rCom" - + "pleteQuery\022,.google.cloud.retail.v2.Comp" - + "leteQueryRequest\032-.google.cloud.retail.v" - + "2.CompleteQueryResponse\"E\202\323\344\223\002?\022=/v2/{ca" - + "talog=projects/*/locations/*/catalogs/*}" - + ":completeQuery\022\233\002\n\024ImportCompletionData\022" - + "3.google.cloud.retail.v2.ImportCompletio" - + "nDataRequest\032\035.google.longrunning.Operat" - + "ion\"\256\001\312A\\\n3google.cloud.retail.v2.Import" - + "CompletionDataResponse\022%google.cloud.ret" - + "ail.v2.ImportMetadata\202\323\344\223\002I\"D/v2/{parent" - + "=projects/*/locations/*/catalogs/*}/comp" - + "letionData:import:\001*\032I\312A\025retail.googleap" - + "is.com\322A.https://www.googleapis.com/auth" - + "/cloud-platformB\301\001\n\032com.google.cloud.ret" - + "ail.v2B\026CompletionServiceProtoP\001Z2cloud." - + "google.com/go/retail/apiv2/retailpb;reta" - + "ilpb\242\002\006RETAIL\252\002\026Google.Cloud.Retail.V2\312\002" - + "\026Google\\Cloud\\Retail\\V2\352\002\031Google::Cloud:" - + ":Retail::V2b\006proto3" + + "set\030\006 \001(\t\022\027\n\017max_suggestions\030\005 \001(\005\022$\n\034en" + + "able_attribute_suggestions\030\t \001(\010\022\016\n\006enti" + + "ty\030\n \001(\t\"\215\004\n\025CompleteQueryResponse\022Z\n\022co" + + "mpletion_results\030\001 \003(\0132>.google.cloud.re" + + "tail.v2.CompleteQueryResponse.Completion" + + "Result\022\031\n\021attribution_token\030\002 \001(\t\022c\n\025rec" + + "ent_search_results\030\003 \003(\0132@.google.cloud." + + "retail.v2.CompleteQueryResponse.RecentSe" + + "archResultB\002\030\001\032\346\001\n\020CompletionResult\022\022\n\ns" + + "uggestion\030\001 \001(\t\022b\n\nattributes\030\002 \003(\0132N.go" + + "ogle.cloud.retail.v2.CompleteQueryRespon" + + "se.CompletionResult.AttributesEntry\032Z\n\017A" + + "ttributesEntry\022\013\n\003key\030\001 \001(\t\0226\n\005value\030\002 \001" + + "(\0132\'.google.cloud.retail.v2.CustomAttrib" + + "ute:\0028\001\032/\n\022RecentSearchResult\022\025\n\rrecent_" + + "search\030\001 \001(\t:\002\030\0012\262\004\n\021CompletionService\022\263" + + "\001\n\rCompleteQuery\022,.google.cloud.retail.v" + + "2.CompleteQueryRequest\032-.google.cloud.re" + + "tail.v2.CompleteQueryResponse\"E\202\323\344\223\002?\022=/" + + "v2/{catalog=projects/*/locations/*/catal" + + "ogs/*}:completeQuery\022\233\002\n\024ImportCompletio" + + "nData\0223.google.cloud.retail.v2.ImportCom" + + "pletionDataRequest\032\035.google.longrunning." + + "Operation\"\256\001\312A\\\n3google.cloud.retail.v2." + + "ImportCompletionDataResponse\022%google.clo" + + "ud.retail.v2.ImportMetadata\202\323\344\223\002I\"D/v2/{" + + "parent=projects/*/locations/*/catalogs/*" + + "}/completionData:import:\001*\032I\312A\025retail.go" + + "ogleapis.com\322A.https://www.googleapis.co" + + "m/auth/cloud-platformB\301\001\n\032com.google.clo" + + "ud.retail.v2B\026CompletionServiceProtoP\001Z2" + + "cloud.google.com/go/retail/apiv2/retailp" + + "b;retailpb\242\002\006RETAIL\252\002\026Google.Cloud.Retai" + + "l.V2\312\002\026Google\\Cloud\\Retail\\V2\352\002\031Google::" + + "Cloud::Retail::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -129,6 +130,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DeviceType", "Dataset", "MaxSuggestions", + "EnableAttributeSuggestions", "Entity", }); internal_static_google_cloud_retail_v2_CompleteQueryResponse_descriptor = diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Condition.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Condition.java index 33b8453e3ca3..e0c443c656b1 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Condition.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Condition.java @@ -46,6 +46,7 @@ private Condition(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Condition() { queryTerms_ = java.util.Collections.emptyList(); activeTimeRange_ = java.util.Collections.emptyList(); + pageCategories_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -2064,6 +2065,82 @@ public com.google.cloud.retail.v2.Condition.TimeRangeOrBuilder getActiveTimeRang return activeTimeRange_.get(index); } + public static final int PAGE_CATEGORIES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList pageCategories_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @return A list containing the pageCategories. + */ + public com.google.protobuf.ProtocolStringList getPageCategoriesList() { + return pageCategories_; + } + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @return The count of pageCategories. + */ + public int getPageCategoriesCount() { + return pageCategories_.size(); + } + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the element to return. + * @return The pageCategories at the given index. + */ + public java.lang.String getPageCategories(int index) { + return pageCategories_.get(index); + } + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the value to return. + * @return The bytes of the pageCategories at the given index. + */ + public com.google.protobuf.ByteString getPageCategoriesBytes(int index) { + return pageCategories_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2084,6 +2161,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < activeTimeRange_.size(); i++) { output.writeMessage(3, activeTimeRange_.get(i)); } + for (int i = 0; i < pageCategories_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageCategories_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -2099,6 +2179,14 @@ public int getSerializedSize() { for (int i = 0; i < activeTimeRange_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, activeTimeRange_.get(i)); } + { + int dataSize = 0; + for (int i = 0; i < pageCategories_.size(); i++) { + dataSize += computeStringSizeNoTag(pageCategories_.getRaw(i)); + } + size += dataSize; + size += 1 * getPageCategoriesList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2116,6 +2204,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQueryTermsList().equals(other.getQueryTermsList())) return false; if (!getActiveTimeRangeList().equals(other.getActiveTimeRangeList())) return false; + if (!getPageCategoriesList().equals(other.getPageCategoriesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2135,6 +2224,10 @@ public int hashCode() { hash = (37 * hash) + ACTIVE_TIME_RANGE_FIELD_NUMBER; hash = (53 * hash) + getActiveTimeRangeList().hashCode(); } + if (getPageCategoriesCount() > 0) { + hash = (37 * hash) + PAGE_CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + getPageCategoriesList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2292,6 +2385,7 @@ public Builder clear() { activeTimeRangeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); + pageCategories_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @@ -2349,6 +2443,10 @@ private void buildPartialRepeatedFields(com.google.cloud.retail.v2.Condition res private void buildPartial0(com.google.cloud.retail.v2.Condition result) { int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + pageCategories_.makeImmutable(); + result.pageCategories_ = pageCategories_; + } } @java.lang.Override @@ -2450,6 +2548,16 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Condition other) { } } } + if (!other.pageCategories_.isEmpty()) { + if (pageCategories_.isEmpty()) { + pageCategories_ = other.pageCategories_; + bitField0_ |= 0x00000004; + } else { + ensurePageCategoriesIsMutable(); + pageCategories_.addAll(other.pageCategories_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2502,6 +2610,13 @@ public Builder mergeFrom( } break; } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePageCategoriesIsMutable(); + pageCategories_.add(s); + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3305,6 +3420,207 @@ public com.google.cloud.retail.v2.Condition.TimeRange.Builder addActiveTimeRange return activeTimeRangeBuilder_; } + private com.google.protobuf.LazyStringArrayList pageCategories_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePageCategoriesIsMutable() { + if (!pageCategories_.isModifiable()) { + pageCategories_ = new com.google.protobuf.LazyStringArrayList(pageCategories_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @return A list containing the pageCategories. + */ + public com.google.protobuf.ProtocolStringList getPageCategoriesList() { + pageCategories_.makeImmutable(); + return pageCategories_; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @return The count of pageCategories. + */ + public int getPageCategoriesCount() { + return pageCategories_.size(); + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the element to return. + * @return The pageCategories at the given index. + */ + public java.lang.String getPageCategories(int index) { + return pageCategories_.get(index); + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the value to return. + * @return The bytes of the pageCategories at the given index. + */ + public com.google.protobuf.ByteString getPageCategoriesBytes(int index) { + return pageCategories_.getByteString(index); + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param index The index to set the value at. + * @param value The pageCategories to set. + * @return This builder for chaining. + */ + public Builder setPageCategories(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageCategoriesIsMutable(); + pageCategories_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param value The pageCategories to add. + * @return This builder for chaining. + */ + public Builder addPageCategories(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageCategoriesIsMutable(); + pageCategories_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param values The pageCategories to add. + * @return This builder for chaining. + */ + public Builder addAllPageCategories(java.lang.Iterable values) { + ensurePageCategoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pageCategories_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageCategories() { + pageCategories_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param value The bytes of the pageCategories to add. + * @return This builder for chaining. + */ + public Builder addPageCategoriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePageCategoriesIsMutable(); + pageCategories_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ConditionOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ConditionOrBuilder.java index 642c74e69aba..0d6282bf19f5 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ConditionOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ConditionOrBuilder.java @@ -147,4 +147,67 @@ public interface ConditionOrBuilder * repeated .google.cloud.retail.v2.Condition.TimeRange active_time_range = 3; */ com.google.cloud.retail.v2.Condition.TimeRangeOrBuilder getActiveTimeRangeOrBuilder(int index); + + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @return A list containing the pageCategories. + */ + java.util.List getPageCategoriesList(); + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @return The count of pageCategories. + */ + int getPageCategoriesCount(); + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the element to return. + * @return The pageCategories at the given index. + */ + java.lang.String getPageCategories(int index); + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the value to return. + * @return The bytes of the pageCategories at the given index. + */ + com.google.protobuf.ByteString getPageCategoriesBytes(int index); } diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CustomAttribute.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CustomAttribute.java index a342ba9597d0..0a11b3660fac 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CustomAttribute.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CustomAttribute.java @@ -252,7 +252,7 @@ public double getNumbers(int index) { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2/common.proto;l=423 + * google/cloud/retail/v2/common.proto;l=508 * @return Whether the searchable field is set. */ @java.lang.Override @@ -282,7 +282,7 @@ public boolean hasSearchable() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2/common.proto;l=423 + * google/cloud/retail/v2/common.proto;l=508 * @return The searchable. */ @java.lang.Override @@ -319,7 +319,7 @@ public boolean getSearchable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2/common.proto;l=442 + * google/cloud/retail/v2/common.proto;l=527 * @return Whether the indexable field is set. */ @java.lang.Override @@ -353,7 +353,7 @@ public boolean hasIndexable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2/common.proto;l=442 + * google/cloud/retail/v2/common.proto;l=527 * @return The indexable. */ @java.lang.Override @@ -1275,7 +1275,7 @@ public Builder clearNumbers() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2/common.proto;l=423 + * google/cloud/retail/v2/common.proto;l=508 * @return Whether the searchable field is set. */ @java.lang.Override @@ -1305,7 +1305,7 @@ public boolean hasSearchable() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2/common.proto;l=423 + * google/cloud/retail/v2/common.proto;l=508 * @return The searchable. */ @java.lang.Override @@ -1335,7 +1335,7 @@ public boolean getSearchable() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2/common.proto;l=423 + * google/cloud/retail/v2/common.proto;l=508 * @param value The searchable to set. * @return This builder for chaining. */ @@ -1369,7 +1369,7 @@ public Builder setSearchable(boolean value) { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2/common.proto;l=423 + * google/cloud/retail/v2/common.proto;l=508 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1407,7 +1407,7 @@ public Builder clearSearchable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2/common.proto;l=442 + * google/cloud/retail/v2/common.proto;l=527 * @return Whether the indexable field is set. */ @java.lang.Override @@ -1441,7 +1441,7 @@ public boolean hasIndexable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2/common.proto;l=442 + * google/cloud/retail/v2/common.proto;l=527 * @return The indexable. */ @java.lang.Override @@ -1475,7 +1475,7 @@ public boolean getIndexable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2/common.proto;l=442 + * google/cloud/retail/v2/common.proto;l=527 * @param value The indexable to set. * @return This builder for chaining. */ @@ -1513,7 +1513,7 @@ public Builder setIndexable(boolean value) { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2/common.proto;l=442 + * google/cloud/retail/v2/common.proto;l=527 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CustomAttributeOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CustomAttributeOrBuilder.java index d1f4fa9a213f..a32d24c109ca 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CustomAttributeOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CustomAttributeOrBuilder.java @@ -182,7 +182,7 @@ public interface CustomAttributeOrBuilder * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2/common.proto;l=423 + * google/cloud/retail/v2/common.proto;l=508 * @return Whether the searchable field is set. */ @java.lang.Deprecated @@ -209,7 +209,7 @@ public interface CustomAttributeOrBuilder * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2/common.proto;l=423 + * google/cloud/retail/v2/common.proto;l=508 * @return The searchable. */ @java.lang.Deprecated @@ -241,7 +241,7 @@ public interface CustomAttributeOrBuilder * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2/common.proto;l=442 + * google/cloud/retail/v2/common.proto;l=527 * @return Whether the indexable field is set. */ @java.lang.Deprecated @@ -272,7 +272,7 @@ public interface CustomAttributeOrBuilder * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2/common.proto;l=442 + * google/cloud/retail/v2/common.proto;l=527 * @return The indexable. */ @java.lang.Deprecated diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ExperimentInfo.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ExperimentInfo.java index 5647cb9c01e3..bd28cb3df438 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ExperimentInfo.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ExperimentInfo.java @@ -23,7 +23,7 @@ * * *
- * Metadata for active A/B testing [Experiments][].
+ * Metadata for active A/B testing [Experiment][].
  * 
* * Protobuf type {@code google.cloud.retail.v2.ExperimentInfo} @@ -104,8 +104,8 @@ public interface ServingConfigExperimentOrBuilder * *
      * The fully qualified resource name of the serving config
-     * [VariantArm.serving_config_id][] responsible for generating the search
-     * response. For example:
+     * [Experiment.VariantArm.serving_config_id][] responsible for generating
+     * the search response. For example:
      * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
      * 
* @@ -119,8 +119,8 @@ public interface ServingConfigExperimentOrBuilder * *
      * The fully qualified resource name of the serving config
-     * [VariantArm.serving_config_id][] responsible for generating the search
-     * response. For example:
+     * [Experiment.VariantArm.serving_config_id][] responsible for generating
+     * the search response. For example:
      * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
      * 
* @@ -241,8 +241,8 @@ public com.google.protobuf.ByteString getOriginalServingConfigBytes() { * *
      * The fully qualified resource name of the serving config
-     * [VariantArm.serving_config_id][] responsible for generating the search
-     * response. For example:
+     * [Experiment.VariantArm.serving_config_id][] responsible for generating
+     * the search response. For example:
      * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
      * 
* @@ -267,8 +267,8 @@ public java.lang.String getExperimentServingConfig() { * *
      * The fully qualified resource name of the serving config
-     * [VariantArm.serving_config_id][] responsible for generating the search
-     * response. For example:
+     * [Experiment.VariantArm.serving_config_id][] responsible for generating
+     * the search response. For example:
      * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
      * 
* @@ -796,8 +796,8 @@ public Builder setOriginalServingConfigBytes(com.google.protobuf.ByteString valu * *
        * The fully qualified resource name of the serving config
-       * [VariantArm.serving_config_id][] responsible for generating the search
-       * response. For example:
+       * [Experiment.VariantArm.serving_config_id][] responsible for generating
+       * the search response. For example:
        * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        * 
* @@ -822,8 +822,8 @@ public java.lang.String getExperimentServingConfig() { * *
        * The fully qualified resource name of the serving config
-       * [VariantArm.serving_config_id][] responsible for generating the search
-       * response. For example:
+       * [Experiment.VariantArm.serving_config_id][] responsible for generating
+       * the search response. For example:
        * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        * 
* @@ -848,8 +848,8 @@ public com.google.protobuf.ByteString getExperimentServingConfigBytes() { * *
        * The fully qualified resource name of the serving config
-       * [VariantArm.serving_config_id][] responsible for generating the search
-       * response. For example:
+       * [Experiment.VariantArm.serving_config_id][] responsible for generating
+       * the search response. For example:
        * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        * 
* @@ -873,8 +873,8 @@ public Builder setExperimentServingConfig(java.lang.String value) { * *
        * The fully qualified resource name of the serving config
-       * [VariantArm.serving_config_id][] responsible for generating the search
-       * response. For example:
+       * [Experiment.VariantArm.serving_config_id][] responsible for generating
+       * the search response. For example:
        * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        * 
* @@ -894,8 +894,8 @@ public Builder clearExperimentServingConfig() { * *
        * The fully qualified resource name of the serving config
-       * [VariantArm.serving_config_id][] responsible for generating the search
-       * response. For example:
+       * [Experiment.VariantArm.serving_config_id][] responsible for generating
+       * the search response. For example:
        * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        * 
* @@ -1339,7 +1339,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Metadata for active A/B testing [Experiments][].
+   * Metadata for active A/B testing [Experiment][].
    * 
* * Protobuf type {@code google.cloud.retail.v2.ExperimentInfo} diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportMetadata.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportMetadata.java index e10fb880942b..488a6b930a22 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportMetadata.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportMetadata.java @@ -211,7 +211,7 @@ public long getFailureCount() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2/import_config.proto;l=330 + * google/cloud/retail/v2/import_config.proto;l=336 * @return The requestId. */ @java.lang.Override @@ -237,7 +237,7 @@ public java.lang.String getRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2/import_config.proto;l=330 + * google/cloud/retail/v2/import_config.proto;l=336 * @return The bytes for requestId. */ @java.lang.Override @@ -1295,7 +1295,7 @@ public Builder clearFailureCount() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2/import_config.proto;l=330 + * google/cloud/retail/v2/import_config.proto;l=336 * @return The requestId. */ @java.lang.Deprecated @@ -1320,7 +1320,7 @@ public java.lang.String getRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2/import_config.proto;l=330 + * google/cloud/retail/v2/import_config.proto;l=336 * @return The bytes for requestId. */ @java.lang.Deprecated @@ -1345,7 +1345,7 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2/import_config.proto;l=330 + * google/cloud/retail/v2/import_config.proto;l=336 * @param value The requestId to set. * @return This builder for chaining. */ @@ -1369,7 +1369,7 @@ public Builder setRequestId(java.lang.String value) { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2/import_config.proto;l=330 + * google/cloud/retail/v2/import_config.proto;l=336 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1389,7 +1389,7 @@ public Builder clearRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2/import_config.proto;l=330 + * google/cloud/retail/v2/import_config.proto;l=336 * @param value The bytes for requestId to set. * @return This builder for chaining. */ diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportMetadataOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportMetadataOrBuilder.java index 940fb3c14c25..677fd31652cc 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportMetadataOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportMetadataOrBuilder.java @@ -133,7 +133,7 @@ public interface ImportMetadataOrBuilder * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2/import_config.proto;l=330 + * google/cloud/retail/v2/import_config.proto;l=336 * @return The requestId. */ @java.lang.Deprecated @@ -148,7 +148,7 @@ public interface ImportMetadataOrBuilder * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2/import_config.proto;l=330 + * google/cloud/retail/v2/import_config.proto;l=336 * @return The bytes for requestId. */ @java.lang.Deprecated diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsRequest.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsRequest.java index b89ccd81783b..1d862b009ef7 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsRequest.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsRequest.java @@ -463,7 +463,8 @@ public com.google.cloud.retail.v2.ImportErrorsConfigOrBuilder getErrorsConfigOrB * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -479,7 +480,8 @@ public boolean hasUpdateMask() { * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -495,7 +497,8 @@ public com.google.protobuf.FieldMask getUpdateMask() { * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -566,9 +569,14 @@ public int getReconciliationModeValue() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -599,9 +607,14 @@ public java.lang.String getNotificationPubsubTopic() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -1809,7 +1822,8 @@ public com.google.cloud.retail.v2.ImportErrorsConfigOrBuilder getErrorsConfigOrB * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1824,7 +1838,8 @@ public boolean hasUpdateMask() { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1845,7 +1860,8 @@ public com.google.protobuf.FieldMask getUpdateMask() { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1868,7 +1884,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1888,7 +1905,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1916,7 +1934,8 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1936,7 +1955,8 @@ public Builder clearUpdateMask() { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1951,7 +1971,8 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1970,7 +1991,8 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -2120,9 +2142,14 @@ public Builder clearReconciliationMode() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -2152,9 +2179,14 @@ public java.lang.String getNotificationPubsubTopic() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -2184,9 +2216,14 @@ public com.google.protobuf.ByteString getNotificationPubsubTopicBytes() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -2215,9 +2252,14 @@ public Builder setNotificationPubsubTopic(java.lang.String value) { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -2242,9 +2284,14 @@ public Builder clearNotificationPubsubTopic() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsRequestOrBuilder.java index 5c3eec22b2af..5e45ce402677 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsRequestOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsRequestOrBuilder.java @@ -173,7 +173,8 @@ public interface ImportProductsRequestOrBuilder * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -186,7 +187,8 @@ public interface ImportProductsRequestOrBuilder * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -199,7 +201,8 @@ public interface ImportProductsRequestOrBuilder * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -249,9 +252,14 @@ public interface ImportProductsRequestOrBuilder * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -271,9 +279,14 @@ public interface ImportProductsRequestOrBuilder * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Model.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Model.java index 0d8f04542e1e..0742ce29eba7 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Model.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Model.java @@ -773,6 +773,174 @@ private DataState(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2.Model.DataState) } + /** + * + * + *
+   * Use single or multiple context products for recommendations.
+   * 
+ * + * Protobuf enum {@code google.cloud.retail.v2.Model.ContextProductsType} + */ + public enum ContextProductsType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified default value, should never be explicitly set.
+     * Defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * CONTEXT_PRODUCTS_TYPE_UNSPECIFIED = 0; + */ + CONTEXT_PRODUCTS_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Use only a single product as context for the recommendation. Typically
+     * used on pages like add-to-cart or product details.
+     * 
+ * + * SINGLE_CONTEXT_PRODUCT = 1; + */ + SINGLE_CONTEXT_PRODUCT(1), + /** + * + * + *
+     * Use one or multiple products as context for the recommendation. Typically
+     * used on shopping cart pages.
+     * 
+ * + * MULTIPLE_CONTEXT_PRODUCTS = 2; + */ + MULTIPLE_CONTEXT_PRODUCTS(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified default value, should never be explicitly set.
+     * Defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * CONTEXT_PRODUCTS_TYPE_UNSPECIFIED = 0; + */ + public static final int CONTEXT_PRODUCTS_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Use only a single product as context for the recommendation. Typically
+     * used on pages like add-to-cart or product details.
+     * 
+ * + * SINGLE_CONTEXT_PRODUCT = 1; + */ + public static final int SINGLE_CONTEXT_PRODUCT_VALUE = 1; + /** + * + * + *
+     * Use one or multiple products as context for the recommendation. Typically
+     * used on shopping cart pages.
+     * 
+ * + * MULTIPLE_CONTEXT_PRODUCTS = 2; + */ + public static final int MULTIPLE_CONTEXT_PRODUCTS_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 ContextProductsType 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 ContextProductsType forNumber(int value) { + switch (value) { + case 0: + return CONTEXT_PRODUCTS_TYPE_UNSPECIFIED; + case 1: + return SINGLE_CONTEXT_PRODUCT; + case 2: + return MULTIPLE_CONTEXT_PRODUCTS; + 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 ContextProductsType findValueByNumber(int number) { + return ContextProductsType.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2.Model.getDescriptor().getEnumTypes().get(4); + } + + private static final ContextProductsType[] VALUES = values(); + + public static ContextProductsType 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 ContextProductsType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2.Model.ContextProductsType) + } + public interface ServingConfigListOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.Model.ServingConfigList) @@ -1399,112 +1567,1704 @@ public com.google.protobuf.ByteString getServingConfigIdsBytes(int index) { * `PAGE_OPTIMIZATION`. * * - * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The servingConfigIds to set. + * @return This builder for chaining. + */ + public Builder setServingConfigIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingConfigIdsIsMutable(); + servingConfigIds_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The servingConfigIds to add. + * @return This builder for chaining. + */ + public Builder addServingConfigIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingConfigIdsIsMutable(); + servingConfigIds_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The servingConfigIds to add. + * @return This builder for chaining. + */ + public Builder addAllServingConfigIds(java.lang.Iterable values) { + ensureServingConfigIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, servingConfigIds_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearServingConfigIds() { + servingConfigIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the servingConfigIds to add. + * @return This builder for chaining. + */ + public Builder addServingConfigIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureServingConfigIdsIsMutable(); + servingConfigIds_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.Model.ServingConfigList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.Model.ServingConfigList) + private static final com.google.cloud.retail.v2.Model.ServingConfigList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2.Model.ServingConfigList(); + } + + public static com.google.cloud.retail.v2.Model.ServingConfigList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServingConfigList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2.Model.ServingConfigList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FrequentlyBoughtTogetherFeaturesConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Specifies the context of the model when it is used in predict
+     * requests. Can only be set for the `frequently-bought-together` type. If
+     * it isn't specified, it defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * + * .google.cloud.retail.v2.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for contextProductsType. + */ + int getContextProductsTypeValue(); + /** + * + * + *
+     * Optional. Specifies the context of the model when it is used in predict
+     * requests. Can only be set for the `frequently-bought-together` type. If
+     * it isn't specified, it defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * + * .google.cloud.retail.v2.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The contextProductsType. + */ + com.google.cloud.retail.v2.Model.ContextProductsType getContextProductsType(); + } + /** + * + * + *
+   * Additional configs for the frequently-bought-together model type.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig} + */ + public static final class FrequentlyBoughtTogetherFeaturesConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) + FrequentlyBoughtTogetherFeaturesConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use FrequentlyBoughtTogetherFeaturesConfig.newBuilder() to construct. + private FrequentlyBoughtTogetherFeaturesConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FrequentlyBoughtTogetherFeaturesConfig() { + contextProductsType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FrequentlyBoughtTogetherFeaturesConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.ModelProto + .internal_static_google_cloud_retail_v2_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.ModelProto + .internal_static_google_cloud_retail_v2_Model_FrequentlyBoughtTogetherFeaturesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig.class, + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder + .class); + } + + public static final int CONTEXT_PRODUCTS_TYPE_FIELD_NUMBER = 2; + private int contextProductsType_ = 0; + /** + * + * + *
+     * Optional. Specifies the context of the model when it is used in predict
+     * requests. Can only be set for the `frequently-bought-together` type. If
+     * it isn't specified, it defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * + * .google.cloud.retail.v2.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for contextProductsType. + */ + @java.lang.Override + public int getContextProductsTypeValue() { + return contextProductsType_; + } + /** + * + * + *
+     * Optional. Specifies the context of the model when it is used in predict
+     * requests. Can only be set for the `frequently-bought-together` type. If
+     * it isn't specified, it defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * + * .google.cloud.retail.v2.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The contextProductsType. + */ + @java.lang.Override + public com.google.cloud.retail.v2.Model.ContextProductsType getContextProductsType() { + com.google.cloud.retail.v2.Model.ContextProductsType result = + com.google.cloud.retail.v2.Model.ContextProductsType.forNumber(contextProductsType_); + return result == null + ? com.google.cloud.retail.v2.Model.ContextProductsType.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 (contextProductsType_ + != com.google.cloud.retail.v2.Model.ContextProductsType.CONTEXT_PRODUCTS_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, contextProductsType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (contextProductsType_ + != com.google.cloud.retail.v2.Model.ContextProductsType.CONTEXT_PRODUCTS_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, contextProductsType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig)) { + return super.equals(obj); + } + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig other = + (com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) obj; + + if (contextProductsType_ != other.contextProductsType_) 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_PRODUCTS_TYPE_FIELD_NUMBER; + hash = (53 * hash) + contextProductsType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Additional configs for the frequently-bought-together model type.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.ModelProto + .internal_static_google_cloud_retail_v2_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.ModelProto + .internal_static_google_cloud_retail_v2_Model_FrequentlyBoughtTogetherFeaturesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig.class, + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + contextProductsType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2.ModelProto + .internal_static_google_cloud_retail_v2_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + getDefaultInstanceForType() { + return com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig build() { + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + buildPartial() { + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig result = + new com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextProductsType_ = contextProductsType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) { + return mergeFrom( + (com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig other) { + if (other + == com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance()) return this; + if (other.contextProductsType_ != 0) { + setContextProductsTypeValue(other.getContextProductsTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: + { + contextProductsType_ = input.readEnum(); + bitField0_ |= 0x00000001; + 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 contextProductsType_ = 0; + /** + * + * + *
+       * Optional. Specifies the context of the model when it is used in predict
+       * requests. Can only be set for the `frequently-bought-together` type. If
+       * it isn't specified, it defaults to
+       * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+       * 
+ * + * + * .google.cloud.retail.v2.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for contextProductsType. + */ + @java.lang.Override + public int getContextProductsTypeValue() { + return contextProductsType_; + } + /** + * + * + *
+       * Optional. Specifies the context of the model when it is used in predict
+       * requests. Can only be set for the `frequently-bought-together` type. If
+       * it isn't specified, it defaults to
+       * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+       * 
+ * + * + * .google.cloud.retail.v2.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for contextProductsType to set. + * @return This builder for chaining. + */ + public Builder setContextProductsTypeValue(int value) { + contextProductsType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Specifies the context of the model when it is used in predict
+       * requests. Can only be set for the `frequently-bought-together` type. If
+       * it isn't specified, it defaults to
+       * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+       * 
+ * + * + * .google.cloud.retail.v2.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The contextProductsType. + */ + @java.lang.Override + public com.google.cloud.retail.v2.Model.ContextProductsType getContextProductsType() { + com.google.cloud.retail.v2.Model.ContextProductsType result = + com.google.cloud.retail.v2.Model.ContextProductsType.forNumber(contextProductsType_); + return result == null + ? com.google.cloud.retail.v2.Model.ContextProductsType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Optional. Specifies the context of the model when it is used in predict
+       * requests. Can only be set for the `frequently-bought-together` type. If
+       * it isn't specified, it defaults to
+       * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+       * 
+ * + * + * .google.cloud.retail.v2.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The contextProductsType to set. + * @return This builder for chaining. + */ + public Builder setContextProductsType( + com.google.cloud.retail.v2.Model.ContextProductsType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + contextProductsType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Specifies the context of the model when it is used in predict
+       * requests. Can only be set for the `frequently-bought-together` type. If
+       * it isn't specified, it defaults to
+       * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+       * 
+ * + * + * .google.cloud.retail.v2.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearContextProductsType() { + bitField0_ = (bitField0_ & ~0x00000001); + contextProductsType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) + private static final com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig(); + } + + public static com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FrequentlyBoughtTogetherFeaturesConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ModelFeaturesConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.Model.ModelFeaturesConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return Whether the frequentlyBoughtTogetherConfig field is set. + */ + boolean hasFrequentlyBoughtTogetherConfig(); + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return The frequentlyBoughtTogetherConfig. + */ + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + getFrequentlyBoughtTogetherConfig(); + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder + getFrequentlyBoughtTogetherConfigOrBuilder(); + + com.google.cloud.retail.v2.Model.ModelFeaturesConfig.TypeDedicatedConfigCase + getTypeDedicatedConfigCase(); + } + /** + * + * + *
+   * Additional model features config.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2.Model.ModelFeaturesConfig} + */ + public static final class ModelFeaturesConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.Model.ModelFeaturesConfig) + ModelFeaturesConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ModelFeaturesConfig.newBuilder() to construct. + private ModelFeaturesConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ModelFeaturesConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ModelFeaturesConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.ModelProto + .internal_static_google_cloud_retail_v2_Model_ModelFeaturesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.ModelProto + .internal_static_google_cloud_retail_v2_Model_ModelFeaturesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.Model.ModelFeaturesConfig.class, + com.google.cloud.retail.v2.Model.ModelFeaturesConfig.Builder.class); + } + + private int typeDedicatedConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object typeDedicatedConfig_; + + public enum TypeDedicatedConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FREQUENTLY_BOUGHT_TOGETHER_CONFIG(1), + TYPEDEDICATEDCONFIG_NOT_SET(0); + private final int value; + + private TypeDedicatedConfigCase(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 TypeDedicatedConfigCase valueOf(int value) { + return forNumber(value); + } + + public static TypeDedicatedConfigCase forNumber(int value) { + switch (value) { + case 1: + return FREQUENTLY_BOUGHT_TOGETHER_CONFIG; + case 0: + return TYPEDEDICATEDCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeDedicatedConfigCase getTypeDedicatedConfigCase() { + return TypeDedicatedConfigCase.forNumber(typeDedicatedConfigCase_); + } + + public static final int FREQUENTLY_BOUGHT_TOGETHER_CONFIG_FIELD_NUMBER = 1; + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return Whether the frequentlyBoughtTogetherConfig field is set. + */ + @java.lang.Override + public boolean hasFrequentlyBoughtTogetherConfig() { + return typeDedicatedConfigCase_ == 1; + } + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return The frequentlyBoughtTogetherConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + getFrequentlyBoughtTogetherConfig() { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_; + } + return com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder + getFrequentlyBoughtTogetherConfigOrBuilder() { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_; + } + return com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + .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 (typeDedicatedConfigCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeDedicatedConfigCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2.Model.ModelFeaturesConfig)) { + return super.equals(obj); + } + com.google.cloud.retail.v2.Model.ModelFeaturesConfig other = + (com.google.cloud.retail.v2.Model.ModelFeaturesConfig) obj; + + if (!getTypeDedicatedConfigCase().equals(other.getTypeDedicatedConfigCase())) return false; + switch (typeDedicatedConfigCase_) { + case 1: + if (!getFrequentlyBoughtTogetherConfig() + .equals(other.getFrequentlyBoughtTogetherConfig())) 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 (typeDedicatedConfigCase_) { + case 1: + hash = (37 * hash) + FREQUENTLY_BOUGHT_TOGETHER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getFrequentlyBoughtTogetherConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2.Model.ModelFeaturesConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.Model.ModelFeaturesConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Model.ModelFeaturesConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.Model.ModelFeaturesConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Model.ModelFeaturesConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.Model.ModelFeaturesConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Model.ModelFeaturesConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.Model.ModelFeaturesConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Model.ModelFeaturesConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.Model.ModelFeaturesConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Model.ModelFeaturesConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.Model.ModelFeaturesConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2.Model.ModelFeaturesConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Additional model features config.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2.Model.ModelFeaturesConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.Model.ModelFeaturesConfig) + com.google.cloud.retail.v2.Model.ModelFeaturesConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.ModelProto + .internal_static_google_cloud_retail_v2_Model_ModelFeaturesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.ModelProto + .internal_static_google_cloud_retail_v2_Model_ModelFeaturesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.Model.ModelFeaturesConfig.class, + com.google.cloud.retail.v2.Model.ModelFeaturesConfig.Builder.class); + } + + // Construct using com.google.cloud.retail.v2.Model.ModelFeaturesConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (frequentlyBoughtTogetherConfigBuilder_ != null) { + frequentlyBoughtTogetherConfigBuilder_.clear(); + } + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2.ModelProto + .internal_static_google_cloud_retail_v2_Model_ModelFeaturesConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2.Model.ModelFeaturesConfig getDefaultInstanceForType() { + return com.google.cloud.retail.v2.Model.ModelFeaturesConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2.Model.ModelFeaturesConfig build() { + com.google.cloud.retail.v2.Model.ModelFeaturesConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2.Model.ModelFeaturesConfig buildPartial() { + com.google.cloud.retail.v2.Model.ModelFeaturesConfig result = + new com.google.cloud.retail.v2.Model.ModelFeaturesConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2.Model.ModelFeaturesConfig result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.retail.v2.Model.ModelFeaturesConfig result) { + result.typeDedicatedConfigCase_ = typeDedicatedConfigCase_; + result.typeDedicatedConfig_ = this.typeDedicatedConfig_; + if (typeDedicatedConfigCase_ == 1 && frequentlyBoughtTogetherConfigBuilder_ != null) { + result.typeDedicatedConfig_ = frequentlyBoughtTogetherConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2.Model.ModelFeaturesConfig) { + return mergeFrom((com.google.cloud.retail.v2.Model.ModelFeaturesConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2.Model.ModelFeaturesConfig other) { + if (other == com.google.cloud.retail.v2.Model.ModelFeaturesConfig.getDefaultInstance()) + return this; + switch (other.getTypeDedicatedConfigCase()) { + case FREQUENTLY_BOUGHT_TOGETHER_CONFIG: + { + mergeFrequentlyBoughtTogetherConfig(other.getFrequentlyBoughtTogetherConfig()); + break; + } + case TYPEDEDICATEDCONFIG_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( + getFrequentlyBoughtTogetherConfigFieldBuilder().getBuilder(), + extensionRegistry); + typeDedicatedConfigCase_ = 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 typeDedicatedConfigCase_ = 0; + private java.lang.Object typeDedicatedConfig_; + + public TypeDedicatedConfigCase getTypeDedicatedConfigCase() { + return TypeDedicatedConfigCase.forNumber(typeDedicatedConfigCase_); + } + + public Builder clearTypeDedicatedConfig() { + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig, + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder, + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder> + frequentlyBoughtTogetherConfigBuilder_; + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return Whether the frequentlyBoughtTogetherConfig field is set. + */ + @java.lang.Override + public boolean hasFrequentlyBoughtTogetherConfig() { + return typeDedicatedConfigCase_ == 1; + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return The frequentlyBoughtTogetherConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + getFrequentlyBoughtTogetherConfig() { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_; + } + return com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } else { + if (typeDedicatedConfigCase_ == 1) { + return frequentlyBoughtTogetherConfigBuilder_.getMessage(); + } + return com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + public Builder setFrequentlyBoughtTogetherConfig( + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig value) { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeDedicatedConfig_ = value; + onChanged(); + } else { + frequentlyBoughtTogetherConfigBuilder_.setMessage(value); + } + typeDedicatedConfigCase_ = 1; + return this; + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + public Builder setFrequentlyBoughtTogetherConfig( + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder + builderForValue) { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + typeDedicatedConfig_ = builderForValue.build(); + onChanged(); + } else { + frequentlyBoughtTogetherConfigBuilder_.setMessage(builderForValue.build()); + } + typeDedicatedConfigCase_ = 1; + return this; + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; * - * - * @param index The index to set the value at. - * @param value The servingConfigIds to set. - * @return This builder for chaining. */ - public Builder setServingConfigIds(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder mergeFrequentlyBoughtTogetherConfig( + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig value) { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + if (typeDedicatedConfigCase_ == 1 + && typeDedicatedConfig_ + != com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance()) { + typeDedicatedConfig_ = + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig.newBuilder( + (com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + typeDedicatedConfig_ = value; + } + onChanged(); + } else { + if (typeDedicatedConfigCase_ == 1) { + frequentlyBoughtTogetherConfigBuilder_.mergeFrom(value); + } else { + frequentlyBoughtTogetherConfigBuilder_.setMessage(value); + } } - ensureServingConfigIdsIsMutable(); - servingConfigIds_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); + typeDedicatedConfigCase_ = 1; return this; } /** * * *
-       * Optional. A set of valid serving configs that may be used for
-       * `PAGE_OPTIMIZATION`.
+       * Additional configs for frequently-bought-together models.
        * 
* - * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; * - * - * @param value The servingConfigIds to add. - * @return This builder for chaining. */ - public Builder addServingConfigIds(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearFrequentlyBoughtTogetherConfig() { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + if (typeDedicatedConfigCase_ == 1) { + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + onChanged(); + } + } else { + if (typeDedicatedConfigCase_ == 1) { + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + } + frequentlyBoughtTogetherConfigBuilder_.clear(); } - ensureServingConfigIdsIsMutable(); - servingConfigIds_.add(value); - bitField0_ |= 0x00000001; - onChanged(); return this; } /** * * *
-       * Optional. A set of valid serving configs that may be used for
-       * `PAGE_OPTIMIZATION`.
+       * Additional configs for frequently-bought-together models.
        * 
* - * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; * - * - * @param values The servingConfigIds to add. - * @return This builder for chaining. */ - public Builder addAllServingConfigIds(java.lang.Iterable values) { - ensureServingConfigIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, servingConfigIds_); - bitField0_ |= 0x00000001; - onChanged(); - return this; + public com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder + getFrequentlyBoughtTogetherConfigBuilder() { + return getFrequentlyBoughtTogetherConfigFieldBuilder().getBuilder(); } /** * * *
-       * Optional. A set of valid serving configs that may be used for
-       * `PAGE_OPTIMIZATION`.
+       * Additional configs for frequently-bought-together models.
        * 
* - * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; * - * - * @return This builder for chaining. */ - public Builder clearServingConfigIds() { - servingConfigIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - ; - onChanged(); - return this; + @java.lang.Override + public com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder + getFrequentlyBoughtTogetherConfigOrBuilder() { + if ((typeDedicatedConfigCase_ == 1) && (frequentlyBoughtTogetherConfigBuilder_ != null)) { + return frequentlyBoughtTogetherConfigBuilder_.getMessageOrBuilder(); + } else { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_; + } + return com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } } /** * * *
-       * Optional. A set of valid serving configs that may be used for
-       * `PAGE_OPTIMIZATION`.
+       * Additional configs for frequently-bought-together models.
        * 
* - * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; * - * - * @param value The bytes of the servingConfigIds to add. - * @return This builder for chaining. */ - public Builder addServingConfigIdsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig, + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder, + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder> + getFrequentlyBoughtTogetherConfigFieldBuilder() { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + if (!(typeDedicatedConfigCase_ == 1)) { + typeDedicatedConfig_ = + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } + frequentlyBoughtTogetherConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig, + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder, + com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder>( + (com.google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_, + getParentForChildren(), + isClean()); + typeDedicatedConfig_ = null; } - checkByteStringIsUtf8(value); - ensureServingConfigIdsIsMutable(); - servingConfigIds_.add(value); - bitField0_ |= 0x00000001; + typeDedicatedConfigCase_ = 1; onChanged(); - return this; + return frequentlyBoughtTogetherConfigBuilder_; } @java.lang.Override @@ -1519,24 +3279,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.Model.ServingConfigList) + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.Model.ModelFeaturesConfig) } - // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.Model.ServingConfigList) - private static final com.google.cloud.retail.v2.Model.ServingConfigList DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.Model.ModelFeaturesConfig) + private static final com.google.cloud.retail.v2.Model.ModelFeaturesConfig DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.retail.v2.Model.ServingConfigList(); + DEFAULT_INSTANCE = new com.google.cloud.retail.v2.Model.ModelFeaturesConfig(); } - public static com.google.cloud.retail.v2.Model.ServingConfigList getDefaultInstance() { + public static com.google.cloud.retail.v2.Model.ModelFeaturesConfig 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 ServingConfigList parsePartialFrom( + public ModelFeaturesConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1556,17 +3316,17 @@ public ServingConfigList 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.retail.v2.Model.ServingConfigList getDefaultInstanceForType() { + public com.google.cloud.retail.v2.Model.ModelFeaturesConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } @@ -2410,6 +4170,63 @@ public com.google.cloud.retail.v2.Model.ServingConfigListOrBuilder getServingCon return servingConfigLists_.get(index); } + public static final int MODEL_FEATURES_CONFIG_FIELD_NUMBER = 22; + private com.google.cloud.retail.v2.Model.ModelFeaturesConfig modelFeaturesConfig_; + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the modelFeaturesConfig field is set. + */ + @java.lang.Override + public boolean hasModelFeaturesConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The modelFeaturesConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2.Model.ModelFeaturesConfig getModelFeaturesConfig() { + return modelFeaturesConfig_ == null + ? com.google.cloud.retail.v2.Model.ModelFeaturesConfig.getDefaultInstance() + : modelFeaturesConfig_; + } + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2.Model.ModelFeaturesConfigOrBuilder + getModelFeaturesConfigOrBuilder() { + return modelFeaturesConfig_ == null + ? com.google.cloud.retail.v2.Model.ModelFeaturesConfig.getDefaultInstance() + : modelFeaturesConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2474,6 +4291,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < servingConfigLists_.size(); i++) { output.writeMessage(19, servingConfigLists_.get(i)); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(22, getModelFeaturesConfig()); + } getUnknownFields().writeTo(output); } @@ -2534,6 +4354,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, servingConfigLists_.get(i)); } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(22, getModelFeaturesConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2572,6 +4396,10 @@ public boolean equals(final java.lang.Object obj) { if (dataState_ != other.dataState_) return false; if (filteringOption_ != other.filteringOption_) return false; if (!getServingConfigListsList().equals(other.getServingConfigListsList())) return false; + if (hasModelFeaturesConfig() != other.hasModelFeaturesConfig()) return false; + if (hasModelFeaturesConfig()) { + if (!getModelFeaturesConfig().equals(other.getModelFeaturesConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2619,6 +4447,10 @@ public int hashCode() { hash = (37 * hash) + SERVING_CONFIG_LISTS_FIELD_NUMBER; hash = (53 * hash) + getServingConfigListsList().hashCode(); } + if (hasModelFeaturesConfig()) { + hash = (37 * hash) + MODEL_FEATURES_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getModelFeaturesConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2766,6 +4598,7 @@ private void maybeForceBuilderInitialization() { getUpdateTimeFieldBuilder(); getLastTuneTimeFieldBuilder(); getServingConfigListsFieldBuilder(); + getModelFeaturesConfigFieldBuilder(); } } @@ -2805,6 +4638,11 @@ public Builder clear() { servingConfigListsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00002000); + modelFeaturesConfig_ = null; + if (modelFeaturesConfigBuilder_ != null) { + modelFeaturesConfigBuilder_.dispose(); + modelFeaturesConfigBuilder_ = null; + } return this; } @@ -2897,6 +4735,13 @@ private void buildPartial0(com.google.cloud.retail.v2.Model result) { if (((from_bitField0_ & 0x00001000) != 0)) { result.filteringOption_ = filteringOption_; } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.modelFeaturesConfig_ = + modelFeaturesConfigBuilder_ == null + ? modelFeaturesConfig_ + : modelFeaturesConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -3021,6 +4866,9 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Model other) { } } } + if (other.hasModelFeaturesConfig()) { + mergeModelFeaturesConfig(other.getModelFeaturesConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3139,6 +4987,13 @@ public Builder mergeFrom( } break; } // case 154 + case 178: + { + input.readMessage( + getModelFeaturesConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 178 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5578,6 +7433,215 @@ public com.google.cloud.retail.v2.Model.ServingConfigList.Builder addServingConf return servingConfigListsBuilder_; } + private com.google.cloud.retail.v2.Model.ModelFeaturesConfig modelFeaturesConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.Model.ModelFeaturesConfig, + com.google.cloud.retail.v2.Model.ModelFeaturesConfig.Builder, + com.google.cloud.retail.v2.Model.ModelFeaturesConfigOrBuilder> + modelFeaturesConfigBuilder_; + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the modelFeaturesConfig field is set. + */ + public boolean hasModelFeaturesConfig() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The modelFeaturesConfig. + */ + public com.google.cloud.retail.v2.Model.ModelFeaturesConfig getModelFeaturesConfig() { + if (modelFeaturesConfigBuilder_ == null) { + return modelFeaturesConfig_ == null + ? com.google.cloud.retail.v2.Model.ModelFeaturesConfig.getDefaultInstance() + : modelFeaturesConfig_; + } else { + return modelFeaturesConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setModelFeaturesConfig( + com.google.cloud.retail.v2.Model.ModelFeaturesConfig value) { + if (modelFeaturesConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelFeaturesConfig_ = value; + } else { + modelFeaturesConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setModelFeaturesConfig( + com.google.cloud.retail.v2.Model.ModelFeaturesConfig.Builder builderForValue) { + if (modelFeaturesConfigBuilder_ == null) { + modelFeaturesConfig_ = builderForValue.build(); + } else { + modelFeaturesConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeModelFeaturesConfig( + com.google.cloud.retail.v2.Model.ModelFeaturesConfig value) { + if (modelFeaturesConfigBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && modelFeaturesConfig_ != null + && modelFeaturesConfig_ + != com.google.cloud.retail.v2.Model.ModelFeaturesConfig.getDefaultInstance()) { + getModelFeaturesConfigBuilder().mergeFrom(value); + } else { + modelFeaturesConfig_ = value; + } + } else { + modelFeaturesConfigBuilder_.mergeFrom(value); + } + if (modelFeaturesConfig_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearModelFeaturesConfig() { + bitField0_ = (bitField0_ & ~0x00004000); + modelFeaturesConfig_ = null; + if (modelFeaturesConfigBuilder_ != null) { + modelFeaturesConfigBuilder_.dispose(); + modelFeaturesConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.retail.v2.Model.ModelFeaturesConfig.Builder + getModelFeaturesConfigBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getModelFeaturesConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.retail.v2.Model.ModelFeaturesConfigOrBuilder + getModelFeaturesConfigOrBuilder() { + if (modelFeaturesConfigBuilder_ != null) { + return modelFeaturesConfigBuilder_.getMessageOrBuilder(); + } else { + return modelFeaturesConfig_ == null + ? com.google.cloud.retail.v2.Model.ModelFeaturesConfig.getDefaultInstance() + : modelFeaturesConfig_; + } + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.Model.ModelFeaturesConfig, + com.google.cloud.retail.v2.Model.ModelFeaturesConfig.Builder, + com.google.cloud.retail.v2.Model.ModelFeaturesConfigOrBuilder> + getModelFeaturesConfigFieldBuilder() { + if (modelFeaturesConfigBuilder_ == null) { + modelFeaturesConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.Model.ModelFeaturesConfig, + com.google.cloud.retail.v2.Model.ModelFeaturesConfig.Builder, + com.google.cloud.retail.v2.Model.ModelFeaturesConfigOrBuilder>( + getModelFeaturesConfig(), getParentForChildren(), isClean()); + modelFeaturesConfig_ = null; + } + return modelFeaturesConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ModelOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ModelOrBuilder.java index f35a2b9f453d..bf1304a08f34 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ModelOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ModelOrBuilder.java @@ -620,4 +620,45 @@ public interface ModelOrBuilder */ com.google.cloud.retail.v2.Model.ServingConfigListOrBuilder getServingConfigListsOrBuilder( int index); + + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the modelFeaturesConfig field is set. + */ + boolean hasModelFeaturesConfig(); + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The modelFeaturesConfig. + */ + com.google.cloud.retail.v2.Model.ModelFeaturesConfig getModelFeaturesConfig(); + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.retail.v2.Model.ModelFeaturesConfigOrBuilder getModelFeaturesConfigOrBuilder(); } diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ModelProto.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ModelProto.java index d277d3220c4a..7d7b66dd5fc8 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ModelProto.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ModelProto.java @@ -36,6 +36,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2_Model_ServingConfigList_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2_Model_ServingConfigList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2_Model_FrequentlyBoughtTogetherFeaturesConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2_Model_ModelFeaturesConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2_Model_ModelFeaturesConfig_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -49,7 +57,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ogle.cloud.retail.v2\032\037google/api/field_b" + "ehavior.proto\032\031google/api/resource.proto" + "\032#google/cloud/retail/v2/common.proto\032\037g" - + "oogle/protobuf/timestamp.proto\"\242\n\n\005Model" + + "oogle/protobuf/timestamp.proto\"\227\016\n\005Model" + "\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\031\n\014display_name\030\002 \001(" + "\tB\003\340A\002\022H\n\016training_state\030\003 \001(\0162+.google." + "cloud.retail.v2.Model.TrainingStateB\003\340A\001" @@ -69,25 +77,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "etail.v2.RecommendationsFilteringOptionB" + "\003\340A\001\022R\n\024serving_config_lists\030\023 \003(\0132/.goo" + "gle.cloud.retail.v2.Model.ServingConfigL" - + "istB\003\340A\003\0324\n\021ServingConfigList\022\037\n\022serving" - + "_config_ids\030\001 \003(\tB\003\340A\001\"R\n\014ServingState\022\035" - + "\n\031SERVING_STATE_UNSPECIFIED\020\000\022\014\n\010INACTIV" - + "E\020\001\022\n\n\006ACTIVE\020\002\022\t\n\005TUNED\020\003\"I\n\rTrainingSt" - + "ate\022\036\n\032TRAINING_STATE_UNSPECIFIED\020\000\022\n\n\006P" - + "AUSED\020\001\022\014\n\010TRAINING\020\002\"\220\001\n\023PeriodicTuning" - + "State\022%\n!PERIODIC_TUNING_STATE_UNSPECIFI" - + "ED\020\000\022\034\n\030PERIODIC_TUNING_DISABLED\020\001\022\027\n\023AL" - + "L_TUNING_DISABLED\020\003\022\033\n\027PERIODIC_TUNING_E" - + "NABLED\020\002\"D\n\tDataState\022\032\n\026DATA_STATE_UNSP" - + "ECIFIED\020\000\022\013\n\007DATA_OK\020\001\022\016\n\nDATA_ERROR\020\002:k" - + "\352Ah\n\033retail.googleapis.com/Model\022Iprojec" - + "ts/{project}/locations/{location}/catalo" - + "gs/{catalog}/models/{model}B\265\001\n\032com.goog" - + "le.cloud.retail.v2B\nModelProtoP\001Z2cloud." - + "google.com/go/retail/apiv2/retailpb;reta" - + "ilpb\242\002\006RETAIL\252\002\026Google.Cloud.Retail.V2\312\002" - + "\026Google\\Cloud\\Retail\\V2\352\002\031Google::Cloud:" - + ":Retail::V2b\006proto3" + + "istB\003\340A\003\022U\n\025model_features_config\030\026 \001(\0132" + + "1.google.cloud.retail.v2.Model.ModelFeat" + + "uresConfigB\003\340A\001\0324\n\021ServingConfigList\022\037\n\022" + + "serving_config_ids\030\001 \003(\tB\003\340A\001\032\177\n&Frequen" + + "tlyBoughtTogetherFeaturesConfig\022U\n\025conte" + + "xt_products_type\030\002 \001(\01621.google.cloud.re" + + "tail.v2.Model.ContextProductsTypeB\003\340A\001\032\241" + + "\001\n\023ModelFeaturesConfig\022q\n!frequently_bou" + + "ght_together_config\030\001 \001(\0132D.google.cloud" + + ".retail.v2.Model.FrequentlyBoughtTogethe" + + "rFeaturesConfigH\000B\027\n\025type_dedicated_conf" + + "ig\"R\n\014ServingState\022\035\n\031SERVING_STATE_UNSP" + + "ECIFIED\020\000\022\014\n\010INACTIVE\020\001\022\n\n\006ACTIVE\020\002\022\t\n\005T" + + "UNED\020\003\"I\n\rTrainingState\022\036\n\032TRAINING_STAT" + + "E_UNSPECIFIED\020\000\022\n\n\006PAUSED\020\001\022\014\n\010TRAINING\020" + + "\002\"\220\001\n\023PeriodicTuningState\022%\n!PERIODIC_TU" + + "NING_STATE_UNSPECIFIED\020\000\022\034\n\030PERIODIC_TUN" + + "ING_DISABLED\020\001\022\027\n\023ALL_TUNING_DISABLED\020\003\022" + + "\033\n\027PERIODIC_TUNING_ENABLED\020\002\"D\n\tDataStat" + + "e\022\032\n\026DATA_STATE_UNSPECIFIED\020\000\022\013\n\007DATA_OK" + + "\020\001\022\016\n\nDATA_ERROR\020\002\"w\n\023ContextProductsTyp" + + "e\022%\n!CONTEXT_PRODUCTS_TYPE_UNSPECIFIED\020\000" + + "\022\032\n\026SINGLE_CONTEXT_PRODUCT\020\001\022\035\n\031MULTIPLE" + + "_CONTEXT_PRODUCTS\020\002:k\352Ah\n\033retail.googlea" + + "pis.com/Model\022Iprojects/{project}/locati" + + "ons/{location}/catalogs/{catalog}/models" + + "/{model}B\265\001\n\032com.google.cloud.retail.v2B" + + "\nModelProtoP\001Z2cloud.google.com/go/retai" + + "l/apiv2/retailpb;retailpb\242\002\006RETAIL\252\002\026Goo" + + "gle.Cloud.Retail.V2\312\002\026Google\\Cloud\\Retai" + + "l\\V2\352\002\031Google::Cloud::Retail::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -118,6 +138,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DataState", "FilteringOption", "ServingConfigLists", + "ModelFeaturesConfig", }); internal_static_google_cloud_retail_v2_Model_ServingConfigList_descriptor = internal_static_google_cloud_retail_v2_Model_descriptor.getNestedTypes().get(0); @@ -127,6 +148,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ServingConfigIds", }); + internal_static_google_cloud_retail_v2_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor = + internal_static_google_cloud_retail_v2_Model_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_retail_v2_Model_FrequentlyBoughtTogetherFeaturesConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor, + new java.lang.String[] { + "ContextProductsType", + }); + internal_static_google_cloud_retail_v2_Model_ModelFeaturesConfig_descriptor = + internal_static_google_cloud_retail_v2_Model_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_retail_v2_Model_ModelFeaturesConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2_Model_ModelFeaturesConfig_descriptor, + new java.lang.String[] { + "FrequentlyBoughtTogetherConfig", "TypeDedicatedConfig", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Product.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Product.java index d639f8e8784e..0833e12e27c1 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Product.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Product.java @@ -578,23 +578,22 @@ public ExpirationCase getExpirationCase() { * * *
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
-   * that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
-   * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
-   * In general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
-   * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
-   * product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2.Product] is already expired
+   * when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2.Product] is not expired when it
+   * is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
    * than [available_time][google.cloud.retail.v2.Product.available_time] and
@@ -617,23 +616,22 @@ public boolean hasExpireTime() {
    *
    *
    * 
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
-   * that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
-   * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
-   * In general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
-   * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
-   * product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2.Product] is already expired
+   * when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2.Product] is not expired when it
+   * is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
    * than [available_time][google.cloud.retail.v2.Product.available_time] and
@@ -659,23 +657,22 @@ public com.google.protobuf.Timestamp getExpireTime() {
    *
    *
    * 
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
-   * that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
-   * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
-   * In general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
-   * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
-   * product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2.Product] is already expired
+   * when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2.Product] is not expired when it
+   * is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
    * than [available_time][google.cloud.retail.v2.Product.available_time] and
@@ -1284,9 +1281,10 @@ public com.google.protobuf.ByteString getGtinBytes() {
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-   * Each value must be a UTF-8 encoded string with a length limit of 5,000
-   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -1331,9 +1329,10 @@ public com.google.protobuf.ProtocolStringList getCategoriesList() {
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-   * Each value must be a UTF-8 encoded string with a length limit of 5,000
-   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -1378,9 +1377,10 @@ public int getCategoriesCount() {
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-   * Each value must be a UTF-8 encoded string with a length limit of 5,000
-   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -1426,9 +1426,10 @@ public java.lang.String getCategories(int index) {
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-   * Each value must be a UTF-8 encoded string with a length limit of 5,000
-   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -1523,9 +1524,10 @@ public com.google.protobuf.ByteString getTitleBytes() {
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -1545,9 +1547,10 @@ public com.google.protobuf.ProtocolStringList getBrandsList() {
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -1567,9 +1570,10 @@ public int getBrandsCount() {
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -1590,9 +1594,10 @@ public java.lang.String getBrands(int index) {
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -3389,7 +3394,7 @@ public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() {
    * .google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
    *
    * @deprecated google.cloud.retail.v2.Product.retrievable_fields is deprecated. See
-   *     google/cloud/retail/v2/product.proto;l=562
+   *     google/cloud/retail/v2/product.proto;l=563
    * @return Whether the retrievableFields field is set.
    */
   @java.lang.Override
@@ -3465,7 +3470,7 @@ public boolean hasRetrievableFields() {
    * .google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
    *
    * @deprecated google.cloud.retail.v2.Product.retrievable_fields is deprecated. See
-   *     google/cloud/retail/v2/product.proto;l=562
+   *     google/cloud/retail/v2/product.proto;l=563
    * @return The retrievableFields.
    */
   @java.lang.Override
@@ -5453,23 +5458,22 @@ public Builder clearExpiration() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
-     * that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
-     * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
-     * In general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
-     * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
-     * product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2.Product] is not expired when it
+     * is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
      * than [available_time][google.cloud.retail.v2.Product.available_time] and
@@ -5492,23 +5496,22 @@ public boolean hasExpireTime() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
-     * that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
-     * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
-     * In general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
-     * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
-     * product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2.Product] is not expired when it
+     * is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
      * than [available_time][google.cloud.retail.v2.Product.available_time] and
@@ -5541,23 +5544,22 @@ public com.google.protobuf.Timestamp getExpireTime() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
-     * that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
-     * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
-     * In general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
-     * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
-     * product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2.Product] is not expired when it
+     * is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
      * than [available_time][google.cloud.retail.v2.Product.available_time] and
@@ -5587,23 +5589,22 @@ public Builder setExpireTime(com.google.protobuf.Timestamp value) {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
-     * that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
-     * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
-     * In general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
-     * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
-     * product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2.Product] is not expired when it
+     * is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
      * than [available_time][google.cloud.retail.v2.Product.available_time] and
@@ -5630,23 +5631,22 @@ public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForVal
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
-     * that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
-     * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
-     * In general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
-     * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
-     * product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2.Product] is not expired when it
+     * is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
      * than [available_time][google.cloud.retail.v2.Product.available_time] and
@@ -5685,23 +5685,22 @@ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
-     * that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
-     * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
-     * In general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
-     * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
-     * product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2.Product] is not expired when it
+     * is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
      * than [available_time][google.cloud.retail.v2.Product.available_time] and
@@ -5734,23 +5733,22 @@ public Builder clearExpireTime() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
-     * that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
-     * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
-     * In general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
-     * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
-     * product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2.Product] is not expired when it
+     * is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
      * than [available_time][google.cloud.retail.v2.Product.available_time] and
@@ -5770,23 +5768,22 @@ public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
-     * that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
-     * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
-     * In general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
-     * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
-     * product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2.Product] is not expired when it
+     * is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
      * than [available_time][google.cloud.retail.v2.Product.available_time] and
@@ -5814,23 +5811,22 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
-     * that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
-     * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
-     * In general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
-     * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
-     * product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2.Product] is not expired when it
+     * is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
      * than [available_time][google.cloud.retail.v2.Product.available_time] and
@@ -7324,9 +7320,10 @@ private void ensureCategoriesIsMutable() {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-     * Each value must be a UTF-8 encoded string with a length limit of 5,000
-     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7372,9 +7369,10 @@ public com.google.protobuf.ProtocolStringList getCategoriesList() {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-     * Each value must be a UTF-8 encoded string with a length limit of 5,000
-     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7419,9 +7417,10 @@ public int getCategoriesCount() {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-     * Each value must be a UTF-8 encoded string with a length limit of 5,000
-     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7467,9 +7466,10 @@ public java.lang.String getCategories(int index) {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-     * Each value must be a UTF-8 encoded string with a length limit of 5,000
-     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7515,9 +7515,10 @@ public com.google.protobuf.ByteString getCategoriesBytes(int index) {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-     * Each value must be a UTF-8 encoded string with a length limit of 5,000
-     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7571,9 +7572,10 @@ public Builder setCategories(int index, java.lang.String value) {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-     * Each value must be a UTF-8 encoded string with a length limit of 5,000
-     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7626,9 +7628,10 @@ public Builder addCategories(java.lang.String value) {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-     * Each value must be a UTF-8 encoded string with a length limit of 5,000
-     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7678,9 +7681,10 @@ public Builder addAllCategories(java.lang.Iterable values) {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-     * Each value must be a UTF-8 encoded string with a length limit of 5,000
-     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7729,9 +7733,10 @@ public Builder clearCategories() {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-     * Each value must be a UTF-8 encoded string with a length limit of 5,000
-     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7914,9 +7919,10 @@ private void ensureBrandsIsMutable() {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -7937,9 +7943,10 @@ public com.google.protobuf.ProtocolStringList getBrandsList() {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -7959,9 +7966,10 @@ public int getBrandsCount() {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -7982,9 +7990,10 @@ public java.lang.String getBrands(int index) {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8005,9 +8014,10 @@ public com.google.protobuf.ByteString getBrandsBytes(int index) {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8036,9 +8046,10 @@ public Builder setBrands(int index, java.lang.String value) {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8066,9 +8077,10 @@ public Builder addBrands(java.lang.String value) {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8093,9 +8105,10 @@ public Builder addAllBrands(java.lang.Iterable values) {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8119,9 +8132,10 @@ public Builder clearBrands() {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -13419,7 +13433,7 @@ public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() {
      * .google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
      *
      * @deprecated google.cloud.retail.v2.Product.retrievable_fields is deprecated. See
-     *     google/cloud/retail/v2/product.proto;l=562
+     *     google/cloud/retail/v2/product.proto;l=563
      * @return Whether the retrievableFields field is set.
      */
     @java.lang.Deprecated
@@ -13494,7 +13508,7 @@ public boolean hasRetrievableFields() {
      * .google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
      *
      * @deprecated google.cloud.retail.v2.Product.retrievable_fields is deprecated. See
-     *     google/cloud/retail/v2/product.proto;l=562
+     *     google/cloud/retail/v2/product.proto;l=563
      * @return The retrievableFields.
      */
     @java.lang.Deprecated
diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductOrBuilder.java
index 8bd816236ee3..c713cf8ec205 100644
--- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductOrBuilder.java
+++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductOrBuilder.java
@@ -28,23 +28,22 @@ public interface ProductOrBuilder
    *
    *
    * 
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
-   * that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
-   * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
-   * In general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
-   * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
-   * product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2.Product] is already expired
+   * when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2.Product] is not expired when it
+   * is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
    * than [available_time][google.cloud.retail.v2.Product.available_time] and
@@ -64,23 +63,22 @@ public interface ProductOrBuilder
    *
    *
    * 
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
-   * that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
-   * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
-   * In general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
-   * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
-   * product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2.Product] is already expired
+   * when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2.Product] is not expired when it
+   * is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
    * than [available_time][google.cloud.retail.v2.Product.available_time] and
@@ -100,23 +98,22 @@ public interface ProductOrBuilder
    *
    *
    * 
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
-   * that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
-   * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
-   * In general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
-   * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
-   * product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2.Product] is already expired
+   * when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2.Product] is not expired when it
+   * is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
    * than [available_time][google.cloud.retail.v2.Product.available_time] and
@@ -571,9 +568,10 @@ public interface ProductOrBuilder
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-   * Each value must be a UTF-8 encoded string with a length limit of 5,000
-   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -616,9 +614,10 @@ public interface ProductOrBuilder
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-   * Each value must be a UTF-8 encoded string with a length limit of 5,000
-   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -661,9 +660,10 @@ public interface ProductOrBuilder
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-   * Each value must be a UTF-8 encoded string with a length limit of 5,000
-   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -707,9 +707,10 @@ public interface ProductOrBuilder
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
-   * Each value must be a UTF-8 encoded string with a length limit of 5,000
-   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -771,9 +772,10 @@ public interface ProductOrBuilder
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -791,9 +793,10 @@ public interface ProductOrBuilder
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -811,9 +814,10 @@ public interface ProductOrBuilder
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -832,9 +836,10 @@ public interface ProductOrBuilder
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -2297,7 +2302,7 @@ com.google.cloud.retail.v2.CustomAttribute getAttributesOrDefault(
    * .google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
    *
    * @deprecated google.cloud.retail.v2.Product.retrievable_fields is deprecated. See
-   *     google/cloud/retail/v2/product.proto;l=562
+   *     google/cloud/retail/v2/product.proto;l=563
    * @return Whether the retrievableFields field is set.
    */
   @java.lang.Deprecated
@@ -2370,7 +2375,7 @@ com.google.cloud.retail.v2.CustomAttribute getAttributesOrDefault(
    * .google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
    *
    * @deprecated google.cloud.retail.v2.Product.retrievable_fields is deprecated. See
-   *     google/cloud/retail/v2/product.proto;l=562
+   *     google/cloud/retail/v2/product.proto;l=563
    * @return The retrievableFields.
    */
   @java.lang.Deprecated
diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductServiceProto.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductServiceProto.java
index 20dadad5d4b0..4932a99b384e 100644
--- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductServiceProto.java
+++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductServiceProto.java
@@ -128,143 +128,151 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "google/api/resource.proto\032#google/cloud/"
           + "retail/v2/common.proto\032*google/cloud/ret"
           + "ail/v2/import_config.proto\032$google/cloud"
-          + "/retail/v2/product.proto\032#google/longrun"
-          + "ning/operations.proto\032\033google/protobuf/e"
-          + "mpty.proto\032 google/protobuf/field_mask.p"
-          + "roto\032\037google/protobuf/timestamp.proto\"\234\001"
-          + "\n\024CreateProductRequest\0224\n\006parent\030\001 \001(\tB$"
-          + "\340A\002\372A\036\n\034retail.googleapis.com/Branch\0225\n\007"
-          + "product\030\002 \001(\0132\037.google.cloud.retail.v2.P"
-          + "roductB\003\340A\002\022\027\n\nproduct_id\030\003 \001(\tB\003\340A\002\"H\n\021"
-          + "GetProductRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n"
-          + "\035retail.googleapis.com/Product\"\225\001\n\024Updat"
-          + "eProductRequest\0225\n\007product\030\001 \001(\0132\037.googl"
-          + "e.cloud.retail.v2.ProductB\003\340A\002\022/\n\013update"
-          + "_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\022"
-          + "\025\n\rallow_missing\030\003 \001(\010\"K\n\024DeleteProductR"
-          + "equest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035retail.goo"
-          + "gleapis.com/Product\"\261\001\n\023ListProductsRequ"
-          + "est\0224\n\006parent\030\001 \001(\tB$\340A\002\372A\036\n\034retail.goog"
-          + "leapis.com/Branch\022\021\n\tpage_size\030\002 \001(\005\022\022\n\n"
-          + "page_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022-\n\tread"
-          + "_mask\030\005 \001(\0132\032.google.protobuf.FieldMask\""
-          + "b\n\024ListProductsResponse\0221\n\010products\030\001 \003("
-          + "\0132\037.google.cloud.retail.v2.Product\022\027\n\017ne"
-          + "xt_page_token\030\002 \001(\t\"\301\001\n\023SetInventoryRequ"
-          + "est\0227\n\tinventory\030\001 \001(\0132\037.google.cloud.re"
-          + "tail.v2.ProductB\003\340A\002\022,\n\010set_mask\030\002 \001(\0132\032"
-          + ".google.protobuf.FieldMask\022,\n\010set_time\030\003"
-          + " \001(\0132\032.google.protobuf.Timestamp\022\025\n\rallo"
-          + "w_missing\030\004 \001(\010\"\026\n\024SetInventoryMetadata\""
-          + "\026\n\024SetInventoryResponse\"\305\001\n\033AddFulfillme"
-          + "ntPlacesRequest\0226\n\007product\030\001 \001(\tB%\340A\002\372A\037"
-          + "\n\035retail.googleapis.com/Product\022\021\n\004type\030"
-          + "\002 \001(\tB\003\340A\002\022\026\n\tplace_ids\030\003 \003(\tB\003\340A\002\022,\n\010ad"
-          + "d_time\030\004 \001(\0132\032.google.protobuf.Timestamp"
-          + "\022\025\n\rallow_missing\030\005 \001(\010\"\036\n\034AddFulfillmen"
-          + "tPlacesMetadata\"\036\n\034AddFulfillmentPlacesR"
-          + "esponse\"\217\002\n\032AddLocalInventoriesRequest\0226"
-          + "\n\007product\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googleap"
-          + "is.com/Product\022F\n\021local_inventories\030\002 \003("
-          + "\0132&.google.cloud.retail.v2.LocalInventor"
-          + "yB\003\340A\002\022,\n\010add_mask\030\004 \001(\0132\032.google.protob"
-          + "uf.FieldMask\022,\n\010add_time\030\005 \001(\0132\032.google."
-          + "protobuf.Timestamp\022\025\n\rallow_missing\030\006 \001("
-          + "\010\"\035\n\033AddLocalInventoriesMetadata\"\035\n\033AddL"
-          + "ocalInventoriesResponse\"\267\001\n\035RemoveLocalI"
-          + "nventoriesRequest\0226\n\007product\030\001 \001(\tB%\340A\002\372"
-          + "A\037\n\035retail.googleapis.com/Product\022\026\n\tpla"
-          + "ce_ids\030\002 \003(\tB\003\340A\002\022/\n\013remove_time\030\005 \001(\0132\032"
-          + ".google.protobuf.Timestamp\022\025\n\rallow_miss"
-          + "ing\030\003 \001(\010\" \n\036RemoveLocalInventoriesMetad"
-          + "ata\" \n\036RemoveLocalInventoriesResponse\"\313\001"
-          + "\n\036RemoveFulfillmentPlacesRequest\0226\n\007prod"
-          + "uct\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googleapis.com"
-          + "/Product\022\021\n\004type\030\002 \001(\tB\003\340A\002\022\026\n\tplace_ids"
-          + "\030\003 \003(\tB\003\340A\002\022/\n\013remove_time\030\004 \001(\0132\032.googl"
-          + "e.protobuf.Timestamp\022\025\n\rallow_missing\030\005 "
-          + "\001(\010\"!\n\037RemoveFulfillmentPlacesMetadata\"!"
-          + "\n\037RemoveFulfillmentPlacesResponse2\256\027\n\016Pr"
-          + "oductService\022\317\001\n\rCreateProduct\022,.google."
-          + "cloud.retail.v2.CreateProductRequest\032\037.g"
-          + "oogle.cloud.retail.v2.Product\"o\332A\031parent"
-          + ",product,product_id\202\323\344\223\002M\"B/v2/{parent=p"
-          + "rojects/*/locations/*/catalogs/*/branche"
-          + "s/*}/products:\007product\022\254\001\n\nGetProduct\022)."
-          + "google.cloud.retail.v2.GetProductRequest"
-          + "\032\037.google.cloud.retail.v2.Product\"R\332A\004na"
-          + "me\202\323\344\223\002E\022C/v2/{name=projects/*/locations"
-          + "/*/catalogs/*/branches/*/products/**}\022\276\001"
-          + "\n\014ListProducts\022+.google.cloud.retail.v2."
-          + "ListProductsRequest\032,.google.cloud.retai"
-          + "l.v2.ListProductsResponse\"S\332A\006parent\202\323\344\223"
-          + "\002D\022B/v2/{parent=projects/*/locations/*/c"
-          + "atalogs/*/branches/*}/products\022\322\001\n\rUpdat"
-          + "eProduct\022,.google.cloud.retail.v2.Update"
-          + "ProductRequest\032\037.google.cloud.retail.v2."
-          + "Product\"r\332A\023product,update_mask\202\323\344\223\002V2K/"
-          + "v2/{product.name=projects/*/locations/*/"
-          + "catalogs/*/branches/*/products/**}:\007prod"
-          + "uct\022\251\001\n\rDeleteProduct\022,.google.cloud.ret"
-          + "ail.v2.DeleteProductRequest\032\026.google.pro"
-          + "tobuf.Empty\"R\332A\004name\202\323\344\223\002E*C/v2/{name=pr"
-          + "ojects/*/locations/*/catalogs/*/branches"
-          + "/*/products/**}\022\216\002\n\016ImportProducts\022-.goo"
-          + "gle.cloud.retail.v2.ImportProductsReques"
-          + "t\032\035.google.longrunning.Operation\"\255\001\312AV\n-"
-          + "google.cloud.retail.v2.ImportProductsRes"
-          + "ponse\022%google.cloud.retail.v2.ImportMeta"
-          + "data\202\323\344\223\002N\"I/v2/{parent=projects/*/locat"
-          + "ions/*/catalogs/*/branches/*}/products:i"
-          + "mport:\001*\022\264\002\n\014SetInventory\022+.google.cloud"
-          + ".retail.v2.SetInventoryRequest\032\035.google."
-          + "longrunning.Operation\"\327\001\312AZ\n+google.clou"
-          + "d.retail.v2.SetInventoryResponse\022+google"
-          + ".cloud.retail.v2.SetInventoryMetadata\332A\022"
-          + "inventory,set_mask\202\323\344\223\002_\"Z/v2/{inventory"
-          + ".name=projects/*/locations/*/catalogs/*/"
-          + "branches/*/products/**}:setInventory:\001*\022"
-          + "\312\002\n\024AddFulfillmentPlaces\0223.google.cloud."
-          + "retail.v2.AddFulfillmentPlacesRequest\032\035."
-          + "google.longrunning.Operation\"\335\001\312Aj\n3goog"
-          + "le.cloud.retail.v2.AddFulfillmentPlacesR"
-          + "esponse\0223google.cloud.retail.v2.AddFulfi"
-          + "llmentPlacesMetadata\332A\007product\202\323\344\223\002`\"[/v"
-          + "2/{product=projects/*/locations/*/catalo"
-          + "gs/*/branches/*/products/**}:addFulfillm"
-          + "entPlaces:\001*\022\331\002\n\027RemoveFulfillmentPlaces"
-          + "\0226.google.cloud.retail.v2.RemoveFulfillm"
-          + "entPlacesRequest\032\035.google.longrunning.Op"
-          + "eration\"\346\001\312Ap\n6google.cloud.retail.v2.Re"
-          + "moveFulfillmentPlacesResponse\0226google.cl"
-          + "oud.retail.v2.RemoveFulfillmentPlacesMet"
-          + "adata\332A\007product\202\323\344\223\002c\"^/v2/{product=proj"
-          + "ects/*/locations/*/catalogs/*/branches/*"
-          + "/products/**}:removeFulfillmentPlaces:\001*"
-          + "\022\305\002\n\023AddLocalInventories\0222.google.cloud."
-          + "retail.v2.AddLocalInventoriesRequest\032\035.g"
-          + "oogle.longrunning.Operation\"\332\001\312Ah\n2googl"
-          + "e.cloud.retail.v2.AddLocalInventoriesRes"
-          + "ponse\0222google.cloud.retail.v2.AddLocalIn"
-          + "ventoriesMetadata\332A\007product\202\323\344\223\002_\"Z/v2/{"
-          + "product=projects/*/locations/*/catalogs/"
-          + "*/branches/*/products/**}:addLocalInvent"
-          + "ories:\001*\022\324\002\n\026RemoveLocalInventories\0225.go"
-          + "ogle.cloud.retail.v2.RemoveLocalInventor"
-          + "iesRequest\032\035.google.longrunning.Operatio"
-          + "n\"\343\001\312An\n5google.cloud.retail.v2.RemoveLo"
-          + "calInventoriesResponse\0225google.cloud.ret"
-          + "ail.v2.RemoveLocalInventoriesMetadata\332A\007"
-          + "product\202\323\344\223\002b\"]/v2/{product=projects/*/l"
-          + "ocations/*/catalogs/*/branches/*/product"
-          + "s/**}:removeLocalInventories:\001*\032I\312A\025reta"
-          + "il.googleapis.com\322A.https://www.googleap"
-          + "is.com/auth/cloud-platformB\276\001\n\032com.googl"
-          + "e.cloud.retail.v2B\023ProductServiceProtoP\001"
-          + "Z2cloud.google.com/go/retail/apiv2/retai"
-          + "lpb;retailpb\242\002\006RETAIL\252\002\026Google.Cloud.Ret"
-          + "ail.V2\312\002\026Google\\Cloud\\Retail\\V2\352\002\031Google"
-          + "::Cloud::Retail::V2b\006proto3"
+          + "/retail/v2/product.proto\032)google/cloud/r"
+          + "etail/v2/purge_config.proto\032#google/long"
+          + "running/operations.proto\032\033google/protobu"
+          + "f/empty.proto\032 google/protobuf/field_mas"
+          + "k.proto\032\037google/protobuf/timestamp.proto"
+          + "\"\234\001\n\024CreateProductRequest\0224\n\006parent\030\001 \001("
+          + "\tB$\340A\002\372A\036\n\034retail.googleapis.com/Branch\022"
+          + "5\n\007product\030\002 \001(\0132\037.google.cloud.retail.v"
+          + "2.ProductB\003\340A\002\022\027\n\nproduct_id\030\003 \001(\tB\003\340A\002\""
+          + "H\n\021GetProductRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372"
+          + "A\037\n\035retail.googleapis.com/Product\"\225\001\n\024Up"
+          + "dateProductRequest\0225\n\007product\030\001 \001(\0132\037.go"
+          + "ogle.cloud.retail.v2.ProductB\003\340A\002\022/\n\013upd"
+          + "ate_mask\030\002 \001(\0132\032.google.protobuf.FieldMa"
+          + "sk\022\025\n\rallow_missing\030\003 \001(\010\"K\n\024DeleteProdu"
+          + "ctRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035retail."
+          + "googleapis.com/Product\"\261\001\n\023ListProductsR"
+          + "equest\0224\n\006parent\030\001 \001(\tB$\340A\002\372A\036\n\034retail.g"
+          + "oogleapis.com/Branch\022\021\n\tpage_size\030\002 \001(\005\022"
+          + "\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022-\n\tr"
+          + "ead_mask\030\005 \001(\0132\032.google.protobuf.FieldMa"
+          + "sk\"b\n\024ListProductsResponse\0221\n\010products\030\001"
+          + " \003(\0132\037.google.cloud.retail.v2.Product\022\027\n"
+          + "\017next_page_token\030\002 \001(\t\"\301\001\n\023SetInventoryR"
+          + "equest\0227\n\tinventory\030\001 \001(\0132\037.google.cloud"
+          + ".retail.v2.ProductB\003\340A\002\022,\n\010set_mask\030\002 \001("
+          + "\0132\032.google.protobuf.FieldMask\022,\n\010set_tim"
+          + "e\030\003 \001(\0132\032.google.protobuf.Timestamp\022\025\n\ra"
+          + "llow_missing\030\004 \001(\010\"\026\n\024SetInventoryMetada"
+          + "ta\"\026\n\024SetInventoryResponse\"\305\001\n\033AddFulfil"
+          + "lmentPlacesRequest\0226\n\007product\030\001 \001(\tB%\340A\002"
+          + "\372A\037\n\035retail.googleapis.com/Product\022\021\n\004ty"
+          + "pe\030\002 \001(\tB\003\340A\002\022\026\n\tplace_ids\030\003 \003(\tB\003\340A\002\022,\n"
+          + "\010add_time\030\004 \001(\0132\032.google.protobuf.Timest"
+          + "amp\022\025\n\rallow_missing\030\005 \001(\010\"\036\n\034AddFulfill"
+          + "mentPlacesMetadata\"\036\n\034AddFulfillmentPlac"
+          + "esResponse\"\217\002\n\032AddLocalInventoriesReques"
+          + "t\0226\n\007product\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googl"
+          + "eapis.com/Product\022F\n\021local_inventories\030\002"
+          + " \003(\0132&.google.cloud.retail.v2.LocalInven"
+          + "toryB\003\340A\002\022,\n\010add_mask\030\004 \001(\0132\032.google.pro"
+          + "tobuf.FieldMask\022,\n\010add_time\030\005 \001(\0132\032.goog"
+          + "le.protobuf.Timestamp\022\025\n\rallow_missing\030\006"
+          + " \001(\010\"\035\n\033AddLocalInventoriesMetadata\"\035\n\033A"
+          + "ddLocalInventoriesResponse\"\267\001\n\035RemoveLoc"
+          + "alInventoriesRequest\0226\n\007product\030\001 \001(\tB%\340"
+          + "A\002\372A\037\n\035retail.googleapis.com/Product\022\026\n\t"
+          + "place_ids\030\002 \003(\tB\003\340A\002\022/\n\013remove_time\030\005 \001("
+          + "\0132\032.google.protobuf.Timestamp\022\025\n\rallow_m"
+          + "issing\030\003 \001(\010\" \n\036RemoveLocalInventoriesMe"
+          + "tadata\" \n\036RemoveLocalInventoriesResponse"
+          + "\"\313\001\n\036RemoveFulfillmentPlacesRequest\0226\n\007p"
+          + "roduct\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googleapis."
+          + "com/Product\022\021\n\004type\030\002 \001(\tB\003\340A\002\022\026\n\tplace_"
+          + "ids\030\003 \003(\tB\003\340A\002\022/\n\013remove_time\030\004 \001(\0132\032.go"
+          + "ogle.protobuf.Timestamp\022\025\n\rallow_missing"
+          + "\030\005 \001(\010\"!\n\037RemoveFulfillmentPlacesMetadat"
+          + "a\"!\n\037RemoveFulfillmentPlacesResponse2\302\031\n"
+          + "\016ProductService\022\317\001\n\rCreateProduct\022,.goog"
+          + "le.cloud.retail.v2.CreateProductRequest\032"
+          + "\037.google.cloud.retail.v2.Product\"o\332A\031par"
+          + "ent,product,product_id\202\323\344\223\002M\"B/v2/{paren"
+          + "t=projects/*/locations/*/catalogs/*/bran"
+          + "ches/*}/products:\007product\022\254\001\n\nGetProduct"
+          + "\022).google.cloud.retail.v2.GetProductRequ"
+          + "est\032\037.google.cloud.retail.v2.Product\"R\332A"
+          + "\004name\202\323\344\223\002E\022C/v2/{name=projects/*/locati"
+          + "ons/*/catalogs/*/branches/*/products/**}"
+          + "\022\276\001\n\014ListProducts\022+.google.cloud.retail."
+          + "v2.ListProductsRequest\032,.google.cloud.re"
+          + "tail.v2.ListProductsResponse\"S\332A\006parent\202"
+          + "\323\344\223\002D\022B/v2/{parent=projects/*/locations/"
+          + "*/catalogs/*/branches/*}/products\022\322\001\n\rUp"
+          + "dateProduct\022,.google.cloud.retail.v2.Upd"
+          + "ateProductRequest\032\037.google.cloud.retail."
+          + "v2.Product\"r\332A\023product,update_mask\202\323\344\223\002V"
+          + "2K/v2/{product.name=projects/*/locations"
+          + "/*/catalogs/*/branches/*/products/**}:\007p"
+          + "roduct\022\251\001\n\rDeleteProduct\022,.google.cloud."
+          + "retail.v2.DeleteProductRequest\032\026.google."
+          + "protobuf.Empty\"R\332A\004name\202\323\344\223\002E*C/v2/{name"
+          + "=projects/*/locations/*/catalogs/*/branc"
+          + "hes/*/products/**}\022\221\002\n\rPurgeProducts\022,.g"
+          + "oogle.cloud.retail.v2.PurgeProductsReque"
+          + "st\032\035.google.longrunning.Operation\"\262\001\312A\\\n"
+          + ",google.cloud.retail.v2.PurgeProductsRes"
+          + "ponse\022,google.cloud.retail.v2.PurgeProdu"
+          + "ctsMetadata\202\323\344\223\002M\"H/v2/{parent=projects/"
+          + "*/locations/*/catalogs/*/branches/*}/pro"
+          + "ducts:purge:\001*\022\216\002\n\016ImportProducts\022-.goog"
+          + "le.cloud.retail.v2.ImportProductsRequest"
+          + "\032\035.google.longrunning.Operation\"\255\001\312AV\n-g"
+          + "oogle.cloud.retail.v2.ImportProductsResp"
+          + "onse\022%google.cloud.retail.v2.ImportMetad"
+          + "ata\202\323\344\223\002N\"I/v2/{parent=projects/*/locati"
+          + "ons/*/catalogs/*/branches/*}/products:im"
+          + "port:\001*\022\264\002\n\014SetInventory\022+.google.cloud."
+          + "retail.v2.SetInventoryRequest\032\035.google.l"
+          + "ongrunning.Operation\"\327\001\312AZ\n+google.cloud"
+          + ".retail.v2.SetInventoryResponse\022+google."
+          + "cloud.retail.v2.SetInventoryMetadata\332A\022i"
+          + "nventory,set_mask\202\323\344\223\002_\"Z/v2/{inventory."
+          + "name=projects/*/locations/*/catalogs/*/b"
+          + "ranches/*/products/**}:setInventory:\001*\022\312"
+          + "\002\n\024AddFulfillmentPlaces\0223.google.cloud.r"
+          + "etail.v2.AddFulfillmentPlacesRequest\032\035.g"
+          + "oogle.longrunning.Operation\"\335\001\312Aj\n3googl"
+          + "e.cloud.retail.v2.AddFulfillmentPlacesRe"
+          + "sponse\0223google.cloud.retail.v2.AddFulfil"
+          + "lmentPlacesMetadata\332A\007product\202\323\344\223\002`\"[/v2"
+          + "/{product=projects/*/locations/*/catalog"
+          + "s/*/branches/*/products/**}:addFulfillme"
+          + "ntPlaces:\001*\022\331\002\n\027RemoveFulfillmentPlaces\022"
+          + "6.google.cloud.retail.v2.RemoveFulfillme"
+          + "ntPlacesRequest\032\035.google.longrunning.Ope"
+          + "ration\"\346\001\312Ap\n6google.cloud.retail.v2.Rem"
+          + "oveFulfillmentPlacesResponse\0226google.clo"
+          + "ud.retail.v2.RemoveFulfillmentPlacesMeta"
+          + "data\332A\007product\202\323\344\223\002c\"^/v2/{product=proje"
+          + "cts/*/locations/*/catalogs/*/branches/*/"
+          + "products/**}:removeFulfillmentPlaces:\001*\022"
+          + "\305\002\n\023AddLocalInventories\0222.google.cloud.r"
+          + "etail.v2.AddLocalInventoriesRequest\032\035.go"
+          + "ogle.longrunning.Operation\"\332\001\312Ah\n2google"
+          + ".cloud.retail.v2.AddLocalInventoriesResp"
+          + "onse\0222google.cloud.retail.v2.AddLocalInv"
+          + "entoriesMetadata\332A\007product\202\323\344\223\002_\"Z/v2/{p"
+          + "roduct=projects/*/locations/*/catalogs/*"
+          + "/branches/*/products/**}:addLocalInvento"
+          + "ries:\001*\022\324\002\n\026RemoveLocalInventories\0225.goo"
+          + "gle.cloud.retail.v2.RemoveLocalInventori"
+          + "esRequest\032\035.google.longrunning.Operation"
+          + "\"\343\001\312An\n5google.cloud.retail.v2.RemoveLoc"
+          + "alInventoriesResponse\0225google.cloud.reta"
+          + "il.v2.RemoveLocalInventoriesMetadata\332A\007p"
+          + "roduct\202\323\344\223\002b\"]/v2/{product=projects/*/lo"
+          + "cations/*/catalogs/*/branches/*/products"
+          + "/**}:removeLocalInventories:\001*\032I\312A\025retai"
+          + "l.googleapis.com\322A.https://www.googleapi"
+          + "s.com/auth/cloud-platformB\276\001\n\032com.google"
+          + ".cloud.retail.v2B\023ProductServiceProtoP\001Z"
+          + "2cloud.google.com/go/retail/apiv2/retail"
+          + "pb;retailpb\242\002\006RETAIL\252\002\026Google.Cloud.Reta"
+          + "il.V2\312\002\026Google\\Cloud\\Retail\\V2\352\002\031Google:"
+          + ":Cloud::Retail::V2b\006proto3"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -277,6 +285,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               com.google.cloud.retail.v2.CommonProto.getDescriptor(),
               com.google.cloud.retail.v2.ImportConfigProto.getDescriptor(),
               com.google.cloud.retail.v2.ProductProto.getDescriptor(),
+              com.google.cloud.retail.v2.PurgeConfigProto.getDescriptor(),
               com.google.longrunning.OperationsProto.getDescriptor(),
               com.google.protobuf.EmptyProto.getDescriptor(),
               com.google.protobuf.FieldMaskProto.getDescriptor(),
@@ -448,6 +457,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
     com.google.cloud.retail.v2.CommonProto.getDescriptor();
     com.google.cloud.retail.v2.ImportConfigProto.getDescriptor();
     com.google.cloud.retail.v2.ProductProto.getDescriptor();
+    com.google.cloud.retail.v2.PurgeConfigProto.getDescriptor();
     com.google.longrunning.OperationsProto.getDescriptor();
     com.google.protobuf.EmptyProto.getDescriptor();
     com.google.protobuf.FieldMaskProto.getDescriptor();
diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Promotion.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Promotion.java
index 1bacf533ec3d..e4765671aba1 100644
--- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Promotion.java
+++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Promotion.java
@@ -78,8 +78,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is
    * returned.
    *
-   * Google Merchant Center property
-   * [promotion](https://support.google.com/merchants/answer/7050148).
+   * Corresponds to Google Merchant Center property
+   * [promotion_id](https://support.google.com/merchants/answer/7050148).
    * 
* * string promotion_id = 1; @@ -109,8 +109,8 @@ public java.lang.String getPromotionId() { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -480,8 +480,8 @@ public Builder mergeFrom( * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -510,8 +510,8 @@ public java.lang.String getPromotionId() { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -540,8 +540,8 @@ public com.google.protobuf.ByteString getPromotionIdBytes() { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -569,8 +569,8 @@ public Builder setPromotionId(java.lang.String value) { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -594,8 +594,8 @@ public Builder clearPromotionId() { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PromotionOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PromotionOrBuilder.java index 2262d6ea70cf..ff499d4bf8b6 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PromotionOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PromotionOrBuilder.java @@ -35,8 +35,8 @@ public interface PromotionOrBuilder * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -55,8 +55,8 @@ public interface PromotionOrBuilder * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeConfigProto.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeConfigProto.java index d7ac1d47fcd1..062e1b982742 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeConfigProto.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeConfigProto.java @@ -32,6 +32,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2_PurgeMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2_PurgeMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2_PurgeProductsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2_PurgeProductsMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2_PurgeProductsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2_PurgeProductsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2_PurgeProductsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2_PurgeProductsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_retail_v2_PurgeUserEventsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -52,16 +64,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n)google/cloud/retail/v2/purge_config.pr" + "oto\022\026google.cloud.retail.v2\032\037google/api/" + "field_behavior.proto\032\031google/api/resourc" - + "e.proto\"\017\n\rPurgeMetadata\"s\n\026PurgeUserEve" - + "ntsRequest\0225\n\006parent\030\001 \001(\tB%\340A\002\372A\037\n\035reta" - + "il.googleapis.com/Catalog\022\023\n\006filter\030\002 \001(" - + "\tB\003\340A\002\022\r\n\005force\030\003 \001(\010\"6\n\027PurgeUserEvents" - + "Response\022\033\n\023purged_events_count\030\001 \001(\003B\273\001" - + "\n\032com.google.cloud.retail.v2B\020PurgeConfi" - + "gProtoP\001Z2cloud.google.com/go/retail/api" - + "v2/retailpb;retailpb\242\002\006RETAIL\252\002\026Google.C" - + "loud.Retail.V2\312\002\026Google\\Cloud\\Retail\\V2\352" - + "\002\031Google::Cloud::Retail::V2b\006proto3" + + "e.proto\032\037google/protobuf/timestamp.proto" + + "\"\017\n\rPurgeMetadata\"\247\001\n\025PurgeProductsMetad" + + "ata\022/\n\013create_time\030\001 \001(\0132\032.google.protob" + + "uf.Timestamp\022/\n\013update_time\030\002 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022\025\n\rsuccess_count\030\003" + + " \001(\003\022\025\n\rfailure_count\030\004 \001(\003\"p\n\024PurgeProd" + + "uctsRequest\0224\n\006parent\030\001 \001(\tB$\340A\002\372A\036\n\034ret" + + "ail.googleapis.com/Branch\022\023\n\006filter\030\002 \001(" + + "\tB\003\340A\002\022\r\n\005force\030\003 \001(\010\"f\n\025PurgeProductsRe" + + "sponse\022\023\n\013purge_count\030\001 \001(\003\0228\n\014purge_sam" + + "ple\030\002 \003(\tB\"\372A\037\n\035retail.googleapis.com/Pr" + + "oduct\"s\n\026PurgeUserEventsRequest\0225\n\006paren" + + "t\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googleapis.com/C" + + "atalog\022\023\n\006filter\030\002 \001(\tB\003\340A\002\022\r\n\005force\030\003 \001" + + "(\010\"6\n\027PurgeUserEventsResponse\022\033\n\023purged_" + + "events_count\030\001 \001(\003B\273\001\n\032com.google.cloud." + + "retail.v2B\020PurgeConfigProtoP\001Z2cloud.goo" + + "gle.com/go/retail/apiv2/retailpb;retailp" + + "b\242\002\006RETAIL\252\002\026Google.Cloud.Retail.V2\312\002\026Go" + + "ogle\\Cloud\\Retail\\V2\352\002\031Google::Cloud::Re" + + "tail::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -69,6 +92,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_retail_v2_PurgeMetadata_descriptor = getDescriptor().getMessageTypes().get(0); @@ -76,8 +100,32 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2_PurgeMetadata_descriptor, new java.lang.String[] {}); - internal_static_google_cloud_retail_v2_PurgeUserEventsRequest_descriptor = + internal_static_google_cloud_retail_v2_PurgeProductsMetadata_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_retail_v2_PurgeProductsMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2_PurgeProductsMetadata_descriptor, + new java.lang.String[] { + "CreateTime", "UpdateTime", "SuccessCount", "FailureCount", + }); + internal_static_google_cloud_retail_v2_PurgeProductsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_retail_v2_PurgeProductsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2_PurgeProductsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "Force", + }); + internal_static_google_cloud_retail_v2_PurgeProductsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_retail_v2_PurgeProductsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2_PurgeProductsResponse_descriptor, + new java.lang.String[] { + "PurgeCount", "PurgeSample", + }); + internal_static_google_cloud_retail_v2_PurgeUserEventsRequest_descriptor = + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_retail_v2_PurgeUserEventsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2_PurgeUserEventsRequest_descriptor, @@ -85,7 +133,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "Force", }); internal_static_google_cloud_retail_v2_PurgeUserEventsResponse_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_retail_v2_PurgeUserEventsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2_PurgeUserEventsResponse_descriptor, @@ -100,6 +148,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsMetadata.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsMetadata.java new file mode 100644 index 000000000000..565e386e1ce6 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsMetadata.java @@ -0,0 +1,1181 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2/purge_config.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2; + +/** + * + * + *
+ * Metadata related to the progress of the PurgeProducts operation.
+ * This will be returned by the google.longrunning.Operation.metadata field.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2.PurgeProductsMetadata} + */ +public final class PurgeProductsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.PurgeProductsMetadata) + PurgeProductsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use PurgeProductsMetadata.newBuilder() to construct. + private PurgeProductsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PurgeProductsMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PurgeProductsMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.PurgeConfigProto + .internal_static_google_cloud_retail_v2_PurgeProductsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.PurgeConfigProto + .internal_static_google_cloud_retail_v2_PurgeProductsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.PurgeProductsMetadata.class, + com.google.cloud.retail.v2.PurgeProductsMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int SUCCESS_COUNT_FIELD_NUMBER = 3; + private long successCount_ = 0L; + /** + * + * + *
+   * Count of entries that were deleted successfully.
+   * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + + public static final int FAILURE_COUNT_FIELD_NUMBER = 4; + private long failureCount_ = 0L; + /** + * + * + *
+   * Count of entries that encountered errors while processing.
+   * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateTime()); + } + if (successCount_ != 0L) { + output.writeInt64(3, successCount_); + } + if (failureCount_ != 0L) { + output.writeInt64(4, failureCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + if (successCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, successCount_); + } + if (failureCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, failureCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2.PurgeProductsMetadata)) { + return super.equals(obj); + } + com.google.cloud.retail.v2.PurgeProductsMetadata other = + (com.google.cloud.retail.v2.PurgeProductsMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (getSuccessCount() != other.getSuccessCount()) return false; + if (getFailureCount() != other.getFailureCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + SUCCESS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSuccessCount()); + hash = (37 * hash) + FAILURE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailureCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2.PurgeProductsMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.PurgeProductsMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.PurgeProductsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.PurgeProductsMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.PurgeProductsMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.PurgeProductsMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.PurgeProductsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.PurgeProductsMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.PurgeProductsMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.PurgeProductsMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.PurgeProductsMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.PurgeProductsMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2.PurgeProductsMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata related to the progress of the PurgeProducts operation.
+   * This will be returned by the google.longrunning.Operation.metadata field.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2.PurgeProductsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.PurgeProductsMetadata) + com.google.cloud.retail.v2.PurgeProductsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.PurgeConfigProto + .internal_static_google_cloud_retail_v2_PurgeProductsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.PurgeConfigProto + .internal_static_google_cloud_retail_v2_PurgeProductsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.PurgeProductsMetadata.class, + com.google.cloud.retail.v2.PurgeProductsMetadata.Builder.class); + } + + // Construct using com.google.cloud.retail.v2.PurgeProductsMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + successCount_ = 0L; + failureCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2.PurgeConfigProto + .internal_static_google_cloud_retail_v2_PurgeProductsMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2.PurgeProductsMetadata getDefaultInstanceForType() { + return com.google.cloud.retail.v2.PurgeProductsMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2.PurgeProductsMetadata build() { + com.google.cloud.retail.v2.PurgeProductsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2.PurgeProductsMetadata buildPartial() { + com.google.cloud.retail.v2.PurgeProductsMetadata result = + new com.google.cloud.retail.v2.PurgeProductsMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2.PurgeProductsMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.successCount_ = successCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.failureCount_ = failureCount_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2.PurgeProductsMetadata) { + return mergeFrom((com.google.cloud.retail.v2.PurgeProductsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2.PurgeProductsMetadata other) { + if (other == com.google.cloud.retail.v2.PurgeProductsMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.getSuccessCount() != 0L) { + setSuccessCount(other.getSuccessCount()); + } + if (other.getFailureCount() != 0L) { + setFailureCount(other.getFailureCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + successCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + failureCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private long successCount_; + /** + * + * + *
+     * Count of entries that were deleted successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + /** + * + * + *
+     * Count of entries that were deleted successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @param value The successCount to set. + * @return This builder for chaining. + */ + public Builder setSuccessCount(long value) { + + successCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of entries that were deleted successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearSuccessCount() { + bitField0_ = (bitField0_ & ~0x00000004); + successCount_ = 0L; + onChanged(); + return this; + } + + private long failureCount_; + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @param value The failureCount to set. + * @return This builder for chaining. + */ + public Builder setFailureCount(long value) { + + failureCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearFailureCount() { + bitField0_ = (bitField0_ & ~0x00000008); + failureCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.PurgeProductsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.PurgeProductsMetadata) + private static final com.google.cloud.retail.v2.PurgeProductsMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2.PurgeProductsMetadata(); + } + + public static com.google.cloud.retail.v2.PurgeProductsMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurgeProductsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2.PurgeProductsMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsMetadataOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsMetadataOrBuilder.java new file mode 100644 index 000000000000..e80ff891bbc7 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsMetadataOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2/purge_config.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2; + +public interface PurgeProductsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.PurgeProductsMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Count of entries that were deleted successfully.
+   * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + long getSuccessCount(); + + /** + * + * + *
+   * Count of entries that encountered errors while processing.
+   * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + long getFailureCount(); +} diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsRequest.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsRequest.java new file mode 100644 index 000000000000..8f9c62a7506d --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsRequest.java @@ -0,0 +1,1202 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2/purge_config.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2; + +/** + * + * + *
+ * Request message for PurgeProducts method.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2.PurgeProductsRequest} + */ +public final class PurgeProductsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.PurgeProductsRequest) + PurgeProductsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PurgeProductsRequest.newBuilder() to construct. + private PurgeProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PurgeProductsRequest() { + parent_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PurgeProductsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.PurgeConfigProto + .internal_static_google_cloud_retail_v2_PurgeProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.PurgeConfigProto + .internal_static_google_cloud_retail_v2_PurgeProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.PurgeProductsRequest.class, + com.google.cloud.retail.v2.PurgeProductsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the branch under which the products are
+   * created. The format is
+   * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+   * 
+ * + * + * 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 branch under which the products are
+   * created. The format is
+   * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Required. The filter string to specify the products to be deleted with a
+   * length limit of 5,000 characters.
+   *
+   * Empty string filter is not allowed. "*" implies delete all items in a
+   * branch.
+   *
+   * The eligible fields for filtering are:
+   *
+   * * `availability`: Double quoted
+   * [Product.availability][google.cloud.retail.v2.Product.availability] string.
+   * * `create_time` : in ISO 8601 "zulu" format.
+   *
+   * Supported syntax:
+   *
+   * * Comparators (">", "<", ">=", "<=", "=").
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z"
+   *   * availability = "IN_STOCK"
+   *
+   * * Conjunctions ("AND")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+   *
+   * * Disjunctions ("OR")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+   *
+   * * Can support nested queries.
+   *   Examples:
+   *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+   *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+   *
+   * * Filter Limits:
+   *   * Filter should not contain more than 6 conditions.
+   *   * Max nesting depth should not exceed 2 levels.
+   *
+   * Examples queries:
+   * * Delete back order products created before a timestamp.
+   *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The filter string to specify the products to be deleted with a
+   * length limit of 5,000 characters.
+   *
+   * Empty string filter is not allowed. "*" implies delete all items in a
+   * branch.
+   *
+   * The eligible fields for filtering are:
+   *
+   * * `availability`: Double quoted
+   * [Product.availability][google.cloud.retail.v2.Product.availability] string.
+   * * `create_time` : in ISO 8601 "zulu" format.
+   *
+   * Supported syntax:
+   *
+   * * Comparators (">", "<", ">=", "<=", "=").
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z"
+   *   * availability = "IN_STOCK"
+   *
+   * * Conjunctions ("AND")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+   *
+   * * Disjunctions ("OR")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+   *
+   * * Can support nested queries.
+   *   Examples:
+   *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+   *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+   *
+   * * Filter Limits:
+   *   * Filter should not contain more than 6 conditions.
+   *   * Max nesting depth should not exceed 2 levels.
+   *
+   * Examples queries:
+   * * Delete back order products created before a timestamp.
+   *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_ = false; + /** + * + * + *
+   * Actually perform the purge.
+   * If `force` is set to false, the method will return the expected purge count
+   * without deleting any products.
+   * 
+ * + * bool force = 3; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2.PurgeProductsRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2.PurgeProductsRequest other = + (com.google.cloud.retail.v2.PurgeProductsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2.PurgeProductsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.PurgeProductsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.PurgeProductsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.PurgeProductsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.PurgeProductsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.PurgeProductsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.PurgeProductsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.PurgeProductsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.PurgeProductsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.PurgeProductsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.PurgeProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.PurgeProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2.PurgeProductsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for PurgeProducts method.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2.PurgeProductsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.PurgeProductsRequest) + com.google.cloud.retail.v2.PurgeProductsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.PurgeConfigProto + .internal_static_google_cloud_retail_v2_PurgeProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.PurgeConfigProto + .internal_static_google_cloud_retail_v2_PurgeProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.PurgeProductsRequest.class, + com.google.cloud.retail.v2.PurgeProductsRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2.PurgeProductsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2.PurgeConfigProto + .internal_static_google_cloud_retail_v2_PurgeProductsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2.PurgeProductsRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2.PurgeProductsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2.PurgeProductsRequest build() { + com.google.cloud.retail.v2.PurgeProductsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2.PurgeProductsRequest buildPartial() { + com.google.cloud.retail.v2.PurgeProductsRequest result = + new com.google.cloud.retail.v2.PurgeProductsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2.PurgeProductsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2.PurgeProductsRequest) { + return mergeFrom((com.google.cloud.retail.v2.PurgeProductsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2.PurgeProductsRequest other) { + if (other == com.google.cloud.retail.v2.PurgeProductsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the branch under which the products are
+     * created. The format is
+     * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+     * 
+ * + * + * 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 branch under which the products are
+     * created. The format is
+     * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+     * 
+ * + * + * 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 branch under which the products are
+     * created. The format is
+     * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the branch under which the products are
+     * created. The format is
+     * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the branch under which the products are
+     * created. The format is
+     * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Required. The filter string to specify the products to be deleted with a
+     * length limit of 5,000 characters.
+     *
+     * Empty string filter is not allowed. "*" implies delete all items in a
+     * branch.
+     *
+     * The eligible fields for filtering are:
+     *
+     * * `availability`: Double quoted
+     * [Product.availability][google.cloud.retail.v2.Product.availability] string.
+     * * `create_time` : in ISO 8601 "zulu" format.
+     *
+     * Supported syntax:
+     *
+     * * Comparators (">", "<", ">=", "<=", "=").
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z"
+     *   * availability = "IN_STOCK"
+     *
+     * * Conjunctions ("AND")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+     *
+     * * Disjunctions ("OR")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+     *
+     * * Can support nested queries.
+     *   Examples:
+     *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+     *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+     *
+     * * Filter Limits:
+     *   * Filter should not contain more than 6 conditions.
+     *   * Max nesting depth should not exceed 2 levels.
+     *
+     * Examples queries:
+     * * Delete back order products created before a timestamp.
+     *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The filter string to specify the products to be deleted with a
+     * length limit of 5,000 characters.
+     *
+     * Empty string filter is not allowed. "*" implies delete all items in a
+     * branch.
+     *
+     * The eligible fields for filtering are:
+     *
+     * * `availability`: Double quoted
+     * [Product.availability][google.cloud.retail.v2.Product.availability] string.
+     * * `create_time` : in ISO 8601 "zulu" format.
+     *
+     * Supported syntax:
+     *
+     * * Comparators (">", "<", ">=", "<=", "=").
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z"
+     *   * availability = "IN_STOCK"
+     *
+     * * Conjunctions ("AND")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+     *
+     * * Disjunctions ("OR")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+     *
+     * * Can support nested queries.
+     *   Examples:
+     *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+     *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+     *
+     * * Filter Limits:
+     *   * Filter should not contain more than 6 conditions.
+     *   * Max nesting depth should not exceed 2 levels.
+     *
+     * Examples queries:
+     * * Delete back order products created before a timestamp.
+     *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The filter string to specify the products to be deleted with a
+     * length limit of 5,000 characters.
+     *
+     * Empty string filter is not allowed. "*" implies delete all items in a
+     * branch.
+     *
+     * The eligible fields for filtering are:
+     *
+     * * `availability`: Double quoted
+     * [Product.availability][google.cloud.retail.v2.Product.availability] string.
+     * * `create_time` : in ISO 8601 "zulu" format.
+     *
+     * Supported syntax:
+     *
+     * * Comparators (">", "<", ">=", "<=", "=").
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z"
+     *   * availability = "IN_STOCK"
+     *
+     * * Conjunctions ("AND")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+     *
+     * * Disjunctions ("OR")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+     *
+     * * Can support nested queries.
+     *   Examples:
+     *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+     *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+     *
+     * * Filter Limits:
+     *   * Filter should not contain more than 6 conditions.
+     *   * Max nesting depth should not exceed 2 levels.
+     *
+     * Examples queries:
+     * * Delete back order products created before a timestamp.
+     *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The filter string to specify the products to be deleted with a
+     * length limit of 5,000 characters.
+     *
+     * Empty string filter is not allowed. "*" implies delete all items in a
+     * branch.
+     *
+     * The eligible fields for filtering are:
+     *
+     * * `availability`: Double quoted
+     * [Product.availability][google.cloud.retail.v2.Product.availability] string.
+     * * `create_time` : in ISO 8601 "zulu" format.
+     *
+     * Supported syntax:
+     *
+     * * Comparators (">", "<", ">=", "<=", "=").
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z"
+     *   * availability = "IN_STOCK"
+     *
+     * * Conjunctions ("AND")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+     *
+     * * Disjunctions ("OR")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+     *
+     * * Can support nested queries.
+     *   Examples:
+     *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+     *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+     *
+     * * Filter Limits:
+     *   * Filter should not contain more than 6 conditions.
+     *   * Max nesting depth should not exceed 2 levels.
+     *
+     * Examples queries:
+     * * Delete back order products created before a timestamp.
+     *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The filter string to specify the products to be deleted with a
+     * length limit of 5,000 characters.
+     *
+     * Empty string filter is not allowed. "*" implies delete all items in a
+     * branch.
+     *
+     * The eligible fields for filtering are:
+     *
+     * * `availability`: Double quoted
+     * [Product.availability][google.cloud.retail.v2.Product.availability] string.
+     * * `create_time` : in ISO 8601 "zulu" format.
+     *
+     * Supported syntax:
+     *
+     * * Comparators (">", "<", ">=", "<=", "=").
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z"
+     *   * availability = "IN_STOCK"
+     *
+     * * Conjunctions ("AND")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+     *
+     * * Disjunctions ("OR")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+     *
+     * * Can support nested queries.
+     *   Examples:
+     *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+     *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+     *
+     * * Filter Limits:
+     *   * Filter should not contain more than 6 conditions.
+     *   * Max nesting depth should not exceed 2 levels.
+     *
+     * Examples queries:
+     * * Delete back order products created before a timestamp.
+     *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * Actually perform the purge.
+     * If `force` is set to false, the method will return the expected purge count
+     * without deleting any products.
+     * 
+ * + * bool force = 3; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * Actually perform the purge.
+     * If `force` is set to false, the method will return the expected purge count
+     * without deleting any products.
+     * 
+ * + * bool force = 3; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Actually perform the purge.
+     * If `force` is set to false, the method will return the expected purge count
+     * without deleting any products.
+     * 
+ * + * bool force = 3; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000004); + force_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.PurgeProductsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.PurgeProductsRequest) + private static final com.google.cloud.retail.v2.PurgeProductsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2.PurgeProductsRequest(); + } + + public static com.google.cloud.retail.v2.PurgeProductsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurgeProductsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2.PurgeProductsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsRequestOrBuilder.java new file mode 100644 index 000000000000..6d8601968804 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsRequestOrBuilder.java @@ -0,0 +1,175 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2/purge_config.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2; + +public interface PurgeProductsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.PurgeProductsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the branch under which the products are
+   * created. The format is
+   * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+   * 
+ * + * + * 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 branch under which the products are
+   * created. The format is
+   * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The filter string to specify the products to be deleted with a
+   * length limit of 5,000 characters.
+   *
+   * Empty string filter is not allowed. "*" implies delete all items in a
+   * branch.
+   *
+   * The eligible fields for filtering are:
+   *
+   * * `availability`: Double quoted
+   * [Product.availability][google.cloud.retail.v2.Product.availability] string.
+   * * `create_time` : in ISO 8601 "zulu" format.
+   *
+   * Supported syntax:
+   *
+   * * Comparators (">", "<", ">=", "<=", "=").
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z"
+   *   * availability = "IN_STOCK"
+   *
+   * * Conjunctions ("AND")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+   *
+   * * Disjunctions ("OR")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+   *
+   * * Can support nested queries.
+   *   Examples:
+   *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+   *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+   *
+   * * Filter Limits:
+   *   * Filter should not contain more than 6 conditions.
+   *   * Max nesting depth should not exceed 2 levels.
+   *
+   * Examples queries:
+   * * Delete back order products created before a timestamp.
+   *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Required. The filter string to specify the products to be deleted with a
+   * length limit of 5,000 characters.
+   *
+   * Empty string filter is not allowed. "*" implies delete all items in a
+   * branch.
+   *
+   * The eligible fields for filtering are:
+   *
+   * * `availability`: Double quoted
+   * [Product.availability][google.cloud.retail.v2.Product.availability] string.
+   * * `create_time` : in ISO 8601 "zulu" format.
+   *
+   * Supported syntax:
+   *
+   * * Comparators (">", "<", ">=", "<=", "=").
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z"
+   *   * availability = "IN_STOCK"
+   *
+   * * Conjunctions ("AND")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+   *
+   * * Disjunctions ("OR")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+   *
+   * * Can support nested queries.
+   *   Examples:
+   *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+   *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+   *
+   * * Filter Limits:
+   *   * Filter should not contain more than 6 conditions.
+   *   * Max nesting depth should not exceed 2 levels.
+   *
+   * Examples queries:
+   * * Delete back order products created before a timestamp.
+   *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Actually perform the purge.
+   * If `force` is set to false, the method will return the expected purge count
+   * without deleting any products.
+   * 
+ * + * bool force = 3; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsResponse.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsResponse.java new file mode 100644 index 000000000000..61b55a6ce89e --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsResponse.java @@ -0,0 +1,843 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2/purge_config.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2; + +/** + * + * + *
+ * Response of the PurgeProductsRequest. If the long running operation is
+ * successfully done, then this message is returned by the
+ * google.longrunning.Operations.response field.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2.PurgeProductsResponse} + */ +public final class PurgeProductsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.PurgeProductsResponse) + PurgeProductsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use PurgeProductsResponse.newBuilder() to construct. + private PurgeProductsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PurgeProductsResponse() { + purgeSample_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PurgeProductsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.PurgeConfigProto + .internal_static_google_cloud_retail_v2_PurgeProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.PurgeConfigProto + .internal_static_google_cloud_retail_v2_PurgeProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.PurgeProductsResponse.class, + com.google.cloud.retail.v2.PurgeProductsResponse.Builder.class); + } + + public static final int PURGE_COUNT_FIELD_NUMBER = 1; + private long purgeCount_ = 0L; + /** + * + * + *
+   * The total count of products purged as a result of the operation.
+   * 
+ * + * int64 purge_count = 1; + * + * @return The purgeCount. + */ + @java.lang.Override + public long getPurgeCount() { + return purgeCount_; + } + + public static final int PURGE_SAMPLE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList purgeSample_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the purgeSample. + */ + public com.google.protobuf.ProtocolStringList getPurgeSampleList() { + return purgeSample_; + } + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return The count of purgeSample. + */ + public int getPurgeSampleCount() { + return purgeSample_.size(); + } + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The purgeSample at the given index. + */ + public java.lang.String getPurgeSample(int index) { + return purgeSample_.get(index); + } + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the purgeSample at the given index. + */ + public com.google.protobuf.ByteString getPurgeSampleBytes(int index) { + return purgeSample_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (purgeCount_ != 0L) { + output.writeInt64(1, purgeCount_); + } + for (int i = 0; i < purgeSample_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, purgeSample_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (purgeCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, purgeCount_); + } + { + int dataSize = 0; + for (int i = 0; i < purgeSample_.size(); i++) { + dataSize += computeStringSizeNoTag(purgeSample_.getRaw(i)); + } + size += dataSize; + size += 1 * getPurgeSampleList().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.retail.v2.PurgeProductsResponse)) { + return super.equals(obj); + } + com.google.cloud.retail.v2.PurgeProductsResponse other = + (com.google.cloud.retail.v2.PurgeProductsResponse) obj; + + if (getPurgeCount() != other.getPurgeCount()) return false; + if (!getPurgeSampleList().equals(other.getPurgeSampleList())) 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) + PURGE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPurgeCount()); + if (getPurgeSampleCount() > 0) { + hash = (37 * hash) + PURGE_SAMPLE_FIELD_NUMBER; + hash = (53 * hash) + getPurgeSampleList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2.PurgeProductsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.PurgeProductsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.PurgeProductsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.PurgeProductsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.PurgeProductsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.PurgeProductsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.PurgeProductsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.PurgeProductsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.PurgeProductsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.PurgeProductsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.PurgeProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.PurgeProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2.PurgeProductsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response of the PurgeProductsRequest. If the long running operation is
+   * successfully done, then this message is returned by the
+   * google.longrunning.Operations.response field.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2.PurgeProductsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.PurgeProductsResponse) + com.google.cloud.retail.v2.PurgeProductsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.PurgeConfigProto + .internal_static_google_cloud_retail_v2_PurgeProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.PurgeConfigProto + .internal_static_google_cloud_retail_v2_PurgeProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.PurgeProductsResponse.class, + com.google.cloud.retail.v2.PurgeProductsResponse.Builder.class); + } + + // Construct using com.google.cloud.retail.v2.PurgeProductsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + purgeCount_ = 0L; + purgeSample_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2.PurgeConfigProto + .internal_static_google_cloud_retail_v2_PurgeProductsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2.PurgeProductsResponse getDefaultInstanceForType() { + return com.google.cloud.retail.v2.PurgeProductsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2.PurgeProductsResponse build() { + com.google.cloud.retail.v2.PurgeProductsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2.PurgeProductsResponse buildPartial() { + com.google.cloud.retail.v2.PurgeProductsResponse result = + new com.google.cloud.retail.v2.PurgeProductsResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2.PurgeProductsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.purgeCount_ = purgeCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + purgeSample_.makeImmutable(); + result.purgeSample_ = purgeSample_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2.PurgeProductsResponse) { + return mergeFrom((com.google.cloud.retail.v2.PurgeProductsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2.PurgeProductsResponse other) { + if (other == com.google.cloud.retail.v2.PurgeProductsResponse.getDefaultInstance()) + return this; + if (other.getPurgeCount() != 0L) { + setPurgeCount(other.getPurgeCount()); + } + if (!other.purgeSample_.isEmpty()) { + if (purgeSample_.isEmpty()) { + purgeSample_ = other.purgeSample_; + bitField0_ |= 0x00000002; + } else { + ensurePurgeSampleIsMutable(); + purgeSample_.addAll(other.purgeSample_); + } + 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: + { + purgeCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePurgeSampleIsMutable(); + purgeSample_.add(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 bitField0_; + + private long purgeCount_; + /** + * + * + *
+     * The total count of products purged as a result of the operation.
+     * 
+ * + * int64 purge_count = 1; + * + * @return The purgeCount. + */ + @java.lang.Override + public long getPurgeCount() { + return purgeCount_; + } + /** + * + * + *
+     * The total count of products purged as a result of the operation.
+     * 
+ * + * int64 purge_count = 1; + * + * @param value The purgeCount to set. + * @return This builder for chaining. + */ + public Builder setPurgeCount(long value) { + + purgeCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The total count of products purged as a result of the operation.
+     * 
+ * + * int64 purge_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearPurgeCount() { + bitField0_ = (bitField0_ & ~0x00000001); + purgeCount_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList purgeSample_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePurgeSampleIsMutable() { + if (!purgeSample_.isModifiable()) { + purgeSample_ = new com.google.protobuf.LazyStringArrayList(purgeSample_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the purgeSample. + */ + public com.google.protobuf.ProtocolStringList getPurgeSampleList() { + purgeSample_.makeImmutable(); + return purgeSample_; + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return The count of purgeSample. + */ + public int getPurgeSampleCount() { + return purgeSample_.size(); + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The purgeSample at the given index. + */ + public java.lang.String getPurgeSample(int index) { + return purgeSample_.get(index); + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the purgeSample at the given index. + */ + public com.google.protobuf.ByteString getPurgeSampleBytes(int index) { + return purgeSample_.getByteString(index); + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index to set the value at. + * @param value The purgeSample to set. + * @return This builder for chaining. + */ + public Builder setPurgeSample(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePurgeSampleIsMutable(); + purgeSample_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The purgeSample to add. + * @return This builder for chaining. + */ + public Builder addPurgeSample(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePurgeSampleIsMutable(); + purgeSample_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param values The purgeSample to add. + * @return This builder for chaining. + */ + public Builder addAllPurgeSample(java.lang.Iterable values) { + ensurePurgeSampleIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, purgeSample_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearPurgeSample() { + purgeSample_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes of the purgeSample to add. + * @return This builder for chaining. + */ + public Builder addPurgeSampleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePurgeSampleIsMutable(); + purgeSample_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.PurgeProductsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.PurgeProductsResponse) + private static final com.google.cloud.retail.v2.PurgeProductsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2.PurgeProductsResponse(); + } + + public static com.google.cloud.retail.v2.PurgeProductsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurgeProductsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2.PurgeProductsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsResponseOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsResponseOrBuilder.java new file mode 100644 index 000000000000..61c257e42b21 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeProductsResponseOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2/purge_config.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2; + +public interface PurgeProductsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.PurgeProductsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The total count of products purged as a result of the operation.
+   * 
+ * + * int64 purge_count = 1; + * + * @return The purgeCount. + */ + long getPurgeCount(); + + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the purgeSample. + */ + java.util.List getPurgeSampleList(); + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return The count of purgeSample. + */ + int getPurgeSampleCount(); + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The purgeSample at the given index. + */ + java.lang.String getPurgeSample(int index); + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the purgeSample at the given index. + */ + com.google.protobuf.ByteString getPurgeSampleBytes(int index); +} diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Rule.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Rule.java index cf72dd1c60ed..d04cb2ad4781 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Rule.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Rule.java @@ -1022,10 +1022,9 @@ public interface FilterActionOrBuilder * * * [filter][google.cloud.retail.v2.Rule.FilterAction.filter] must be set. * * Filter syntax is identical to - * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. See + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. For * more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1047,10 +1046,9 @@ public interface FilterActionOrBuilder * * * [filter][google.cloud.retail.v2.Rule.FilterAction.filter] must be set. * * Filter syntax is identical to - * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. See + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. For * more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1070,17 +1068,19 @@ public interface FilterActionOrBuilder * *
    * * Rule Condition:
-   *   - No
-   *   [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]
-   *   provided is a global match.
-   *   - 1 or more
-   *   [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]
-   *   provided are combined with OR operator.
+   *     - No
+   *     [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]
+   *     provided is a global match.
+   *     - 1 or more
+   *     [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]
+   *     provided are combined with OR operator.
+   *
    * * Action Input: The request query and filter that are applied to the
    * retrieved products, in addition to any filters already provided with the
    * SearchRequest. The AND operator is used to combine the query's existing
    * filters with the filter rule(s). NOTE: May result in 0 results when
    * filters conflict.
+   *
    * * Action Result: Filters the returned objects to be ONLY those that passed
    * the filter.
    * 
@@ -1134,10 +1134,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * * [filter][google.cloud.retail.v2.Rule.FilterAction.filter] must be set. * * Filter syntax is identical to - * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. See + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. For * more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1170,10 +1169,9 @@ public java.lang.String getFilter() { * * * [filter][google.cloud.retail.v2.Rule.FilterAction.filter] must be set. * * Filter syntax is identical to - * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. See + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. For * more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1364,17 +1362,19 @@ protected Builder newBuilderForType( * *
      * * Rule Condition:
-     *   - No
-     *   [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]
-     *   provided is a global match.
-     *   - 1 or more
-     *   [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]
-     *   provided are combined with OR operator.
+     *     - No
+     *     [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]
+     *     provided is a global match.
+     *     - 1 or more
+     *     [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]
+     *     provided are combined with OR operator.
+     *
      * * Action Input: The request query and filter that are applied to the
      * retrieved products, in addition to any filters already provided with the
      * SearchRequest. The AND operator is used to combine the query's existing
      * filters with the filter rule(s). NOTE: May result in 0 results when
      * filters conflict.
+     *
      * * Action Result: Filters the returned objects to be ONLY those that passed
      * the filter.
      * 
@@ -1566,10 +1566,9 @@ public Builder mergeFrom( * * * [filter][google.cloud.retail.v2.Rule.FilterAction.filter] must be set. * * Filter syntax is identical to - * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. See + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. For * more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1601,10 +1600,9 @@ public java.lang.String getFilter() { * * * [filter][google.cloud.retail.v2.Rule.FilterAction.filter] must be set. * * Filter syntax is identical to - * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. See + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. For * more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1636,10 +1634,9 @@ public com.google.protobuf.ByteString getFilterBytes() { * * * [filter][google.cloud.retail.v2.Rule.FilterAction.filter] must be set. * * Filter syntax is identical to - * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. See + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. For * more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1670,10 +1667,9 @@ public Builder setFilter(java.lang.String value) { * * * [filter][google.cloud.retail.v2.Rule.FilterAction.filter] must be set. * * Filter syntax is identical to - * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. See + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. For * more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1700,10 +1696,9 @@ public Builder clearFilter() { * * * [filter][google.cloud.retail.v2.Rule.FilterAction.filter] must be set. * * Filter syntax is identical to - * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. See + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. For * more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1829,7 +1824,7 @@ public interface RedirectActionOrBuilder * Redirects a shopper to a specific page. * * * Rule Condition: - * - Must specify + * Must specify * [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]. * * Action Input: Request Query * * Action Result: Redirects shopper to provided uri. @@ -2090,7 +2085,7 @@ protected Builder newBuilderForType( * Redirects a shopper to a specific page. * * * Rule Condition: - * - Must specify + * Must specify * [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]. * * Action Input: Request Query * * Action Result: Redirects shopper to provided uri. @@ -8214,211 +8209,3055 @@ public com.google.cloud.retail.v2.Rule.IgnoreAction getDefaultInstanceForType() } } - private int bitField0_; - private int actionCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object action_; - - public enum ActionCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - BOOST_ACTION(2), - REDIRECT_ACTION(3), - ONEWAY_SYNONYMS_ACTION(6), - DO_NOT_ASSOCIATE_ACTION(7), - REPLACEMENT_ACTION(8), - IGNORE_ACTION(9), - FILTER_ACTION(10), - TWOWAY_SYNONYMS_ACTION(11), - ACTION_NOT_SET(0); - private final int value; + public interface ForceReturnFacetActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.Rule.ForceReturnFacetAction) + com.google.protobuf.MessageOrBuilder { - private ActionCase(int value) { - this.value = value; - } /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * */ - @java.lang.Deprecated - public static ActionCase valueOf(int value) { - return forNumber(value); - } - - public static ActionCase forNumber(int value) { - switch (value) { - case 2: - return BOOST_ACTION; - case 3: - return REDIRECT_ACTION; - case 6: - return ONEWAY_SYNONYMS_ACTION; - case 7: - return DO_NOT_ASSOCIATE_ACTION; - case 8: - return REPLACEMENT_ACTION; - case 9: - return IGNORE_ACTION; - case 10: - return FILTER_ACTION; - case 11: - return TWOWAY_SYNONYMS_ACTION; - case 0: - return ACTION_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ActionCase getActionCase() { - return ActionCase.forNumber(actionCase_); + java.util.List + getFacetPositionAdjustmentsList(); + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getFacetPositionAdjustments(int index); + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + int getFacetPositionAdjustmentsCount(); + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder> + getFacetPositionAdjustmentsOrBuilderList(); + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustmentOrBuilder + getFacetPositionAdjustmentsOrBuilder(int index); } - - public static final int BOOST_ACTION_FIELD_NUMBER = 2; /** * * *
-   * A boost action.
-   * 
- * - * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; - * - * @return Whether the boostAction field is set. - */ - @java.lang.Override - public boolean hasBoostAction() { - return actionCase_ == 2; - } - /** + * Force returns an attribute/facet in the request around a certain position + * or above. * - * - *
-   * A boost action.
+   * * Rule Condition:
+   *   Must specify non-empty
+   *   [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]
+   *   (for search only) or
+   *   [Condition.page_categories][google.cloud.retail.v2.Condition.page_categories]
+   *   (for browse only), but can't specify both.
+   *
+   * * Action Inputs: attribute name, position
+   *
+   * * Action Result: Will force return a facet key around a certain position
+   * or above if the condition is satisfied.
+   *
+   * Example: Suppose the query is "shoes", the
+   * [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms] is
+   * "shoes", the
+   * [ForceReturnFacetAction.FacetPositionAdjustment.attribute_name][google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment.attribute_name]
+   * is "size" and the
+   * [ForceReturnFacetAction.FacetPositionAdjustment.position][google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment.position]
+   * is 8.
+   *
+   * Two cases: a) The facet key "size" is not already in the top 8 slots, then
+   * the facet "size" will appear at a position close to 8. b) The facet key
+   * "size" in among the top 8 positions in the request, then it will stay at
+   * its current rank.
    * 
* - * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; - * - * @return The boostAction. + * Protobuf type {@code google.cloud.retail.v2.Rule.ForceReturnFacetAction} */ - @java.lang.Override - public com.google.cloud.retail.v2.Rule.BoostAction getBoostAction() { - if (actionCase_ == 2) { - return (com.google.cloud.retail.v2.Rule.BoostAction) action_; + public static final class ForceReturnFacetAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.Rule.ForceReturnFacetAction) + ForceReturnFacetActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ForceReturnFacetAction.newBuilder() to construct. + private ForceReturnFacetAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - return com.google.cloud.retail.v2.Rule.BoostAction.getDefaultInstance(); - } - /** - * - * - *
-   * A boost action.
-   * 
- * - * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; - */ - @java.lang.Override - public com.google.cloud.retail.v2.Rule.BoostActionOrBuilder getBoostActionOrBuilder() { - if (actionCase_ == 2) { - return (com.google.cloud.retail.v2.Rule.BoostAction) action_; + + private ForceReturnFacetAction() { + facetPositionAdjustments_ = java.util.Collections.emptyList(); } - return com.google.cloud.retail.v2.Rule.BoostAction.getDefaultInstance(); - } - public static final int REDIRECT_ACTION_FIELD_NUMBER = 3; - /** - * - * - *
-   * Redirects a shopper to a specific page.
-   * 
- * - * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; - * - * @return Whether the redirectAction field is set. - */ - @java.lang.Override - public boolean hasRedirectAction() { - return actionCase_ == 3; - } - /** - * - * - *
-   * Redirects a shopper to a specific page.
-   * 
- * - * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; - * - * @return The redirectAction. - */ - @java.lang.Override - public com.google.cloud.retail.v2.Rule.RedirectAction getRedirectAction() { - if (actionCase_ == 3) { - return (com.google.cloud.retail.v2.Rule.RedirectAction) action_; + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ForceReturnFacetAction(); } - return com.google.cloud.retail.v2.Rule.RedirectAction.getDefaultInstance(); - } - /** - * - * - *
-   * Redirects a shopper to a specific page.
-   * 
- * - * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; - */ - @java.lang.Override - public com.google.cloud.retail.v2.Rule.RedirectActionOrBuilder getRedirectActionOrBuilder() { - if (actionCase_ == 3) { - return (com.google.cloud.retail.v2.Rule.RedirectAction) action_; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_descriptor; } - return com.google.cloud.retail.v2.Rule.RedirectAction.getDefaultInstance(); - } - public static final int ONEWAY_SYNONYMS_ACTION_FIELD_NUMBER = 6; - /** - * - * - *
-   * Treats specific term as a synonym with a group of terms.
-   * Group of terms will not be treated as synonyms with the specific term.
-   * 
- * - * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * - * @return Whether the onewaySynonymsAction field is set. - */ - @java.lang.Override - public boolean hasOnewaySynonymsAction() { - return actionCase_ == 6; - } - /** - * - * - *
-   * Treats specific term as a synonym with a group of terms.
-   * Group of terms will not be treated as synonyms with the specific term.
-   * 
- * - * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * - * @return The onewaySynonymsAction. - */ - @java.lang.Override - public com.google.cloud.retail.v2.Rule.OnewaySynonymsAction getOnewaySynonymsAction() { - if (actionCase_ == 6) { - return (com.google.cloud.retail.v2.Rule.OnewaySynonymsAction) action_; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.class, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.Builder.class); } - return com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.getDefaultInstance(); + + public interface FacetPositionAdjustmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The attribute name to force return as a facet. Each attribute name
+       * should be a valid attribute name, be non-empty and contain at most 80
+       * characters long.
+       * 
+ * + * string attribute_name = 1; + * + * @return The attributeName. + */ + java.lang.String getAttributeName(); + /** + * + * + *
+       * The attribute name to force return as a facet. Each attribute name
+       * should be a valid attribute name, be non-empty and contain at most 80
+       * characters long.
+       * 
+ * + * string attribute_name = 1; + * + * @return The bytes for attributeName. + */ + com.google.protobuf.ByteString getAttributeNameBytes(); + + /** + * + * + *
+       * This is the position in the request as explained above. It should be
+       * strictly positive be at most 100.
+       * 
+ * + * int32 position = 2; + * + * @return The position. + */ + int getPosition(); + } + /** + * + * + *
+     * Each facet position adjustment consists of a single attribute name (i.e.
+     * facet key) along with a specified position.
+     * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment} + */ + public static final class FacetPositionAdjustment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + FacetPositionAdjustmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use FacetPositionAdjustment.newBuilder() to construct. + private FacetPositionAdjustment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FacetPositionAdjustment() { + attributeName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FacetPositionAdjustment(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_FacetPositionAdjustment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .class, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder.class); + } + + public static final int ATTRIBUTE_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object attributeName_ = ""; + /** + * + * + *
+       * The attribute name to force return as a facet. Each attribute name
+       * should be a valid attribute name, be non-empty and contain at most 80
+       * characters long.
+       * 
+ * + * string attribute_name = 1; + * + * @return The attributeName. + */ + @java.lang.Override + public java.lang.String getAttributeName() { + java.lang.Object ref = attributeName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeName_ = s; + return s; + } + } + /** + * + * + *
+       * The attribute name to force return as a facet. Each attribute name
+       * should be a valid attribute name, be non-empty and contain at most 80
+       * characters long.
+       * 
+ * + * string attribute_name = 1; + * + * @return The bytes for attributeName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttributeNameBytes() { + java.lang.Object ref = attributeName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POSITION_FIELD_NUMBER = 2; + private int position_ = 0; + /** + * + * + *
+       * This is the position in the request as explained above. It should be
+       * strictly positive be at most 100.
+       * 
+ * + * int32 position = 2; + * + * @return The position. + */ + @java.lang.Override + public int getPosition() { + return position_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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.GeneratedMessageV3.isStringEmpty(attributeName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeName_); + } + if (position_ != 0) { + output.writeInt32(2, position_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeName_); + } + if (position_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, 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.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment)) { + return super.equals(obj); + } + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment other = + (com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment) obj; + + if (!getAttributeName().equals(other.getAttributeName())) return false; + if (getPosition() != other.getPosition()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ATTRIBUTE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAttributeName().hashCode(); + hash = (37 * hash) + POSITION_FIELD_NUMBER; + hash = (53 * hash) + getPosition(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Each facet position adjustment consists of a single attribute name (i.e.
+       * facet key) along with a specified position.
+       * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_FacetPositionAdjustment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .class, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder.class); + } + + // Construct using + // com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeName_ = ""; + position_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getDefaultInstanceForType() { + return com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + build() { + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + buildPartial() { + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment result = + new com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attributeName_ = attributeName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.position_ = position_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment) { + return mergeFrom( + (com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment other) { + if (other + == com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .getDefaultInstance()) return this; + if (!other.getAttributeName().isEmpty()) { + attributeName_ = other.attributeName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPosition() != 0) { + setPosition(other.getPosition()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attributeName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + position_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object attributeName_ = ""; + /** + * + * + *
+         * The attribute name to force return as a facet. Each attribute name
+         * should be a valid attribute name, be non-empty and contain at most 80
+         * characters long.
+         * 
+ * + * string attribute_name = 1; + * + * @return The attributeName. + */ + public java.lang.String getAttributeName() { + java.lang.Object ref = attributeName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The attribute name to force return as a facet. Each attribute name
+         * should be a valid attribute name, be non-empty and contain at most 80
+         * characters long.
+         * 
+ * + * string attribute_name = 1; + * + * @return The bytes for attributeName. + */ + public com.google.protobuf.ByteString getAttributeNameBytes() { + java.lang.Object ref = attributeName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The attribute name to force return as a facet. Each attribute name
+         * should be a valid attribute name, be non-empty and contain at most 80
+         * characters long.
+         * 
+ * + * string attribute_name = 1; + * + * @param value The attributeName to set. + * @return This builder for chaining. + */ + public Builder setAttributeName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + attributeName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The attribute name to force return as a facet. Each attribute name
+         * should be a valid attribute name, be non-empty and contain at most 80
+         * characters long.
+         * 
+ * + * string attribute_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearAttributeName() { + attributeName_ = getDefaultInstance().getAttributeName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * The attribute name to force return as a facet. Each attribute name
+         * should be a valid attribute name, be non-empty and contain at most 80
+         * characters long.
+         * 
+ * + * string attribute_name = 1; + * + * @param value The bytes for attributeName to set. + * @return This builder for chaining. + */ + public Builder setAttributeNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + attributeName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int position_; + /** + * + * + *
+         * This is the position in the request as explained above. It should be
+         * strictly positive be at most 100.
+         * 
+ * + * int32 position = 2; + * + * @return The position. + */ + @java.lang.Override + public int getPosition() { + return position_; + } + /** + * + * + *
+         * This is the position in the request as explained above. It should be
+         * strictly positive be at most 100.
+         * 
+ * + * int32 position = 2; + * + * @param value The position to set. + * @return This builder for chaining. + */ + public Builder setPosition(int value) { + + position_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * This is the position in the request as explained above. It should be
+         * strictly positive be at most 100.
+         * 
+ * + * int32 position = 2; + * + * @return This builder for chaining. + */ + public Builder clearPosition() { + bitField0_ = (bitField0_ & ~0x00000002); + position_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + private static final com.google.cloud.retail.v2.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment(); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FacetPositionAdjustment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int FACET_POSITION_ADJUSTMENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment> + facetPositionAdjustments_; + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment> + getFacetPositionAdjustmentsList() { + return facetPositionAdjustments_; + } + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder> + getFacetPositionAdjustmentsOrBuilderList() { + return facetPositionAdjustments_; + } + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + @java.lang.Override + public int getFacetPositionAdjustmentsCount() { + return facetPositionAdjustments_.size(); + } + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getFacetPositionAdjustments(int index) { + return facetPositionAdjustments_.get(index); + } + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustmentOrBuilder + getFacetPositionAdjustmentsOrBuilder(int index) { + return facetPositionAdjustments_.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 < facetPositionAdjustments_.size(); i++) { + output.writeMessage(1, facetPositionAdjustments_.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 < facetPositionAdjustments_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, facetPositionAdjustments_.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.retail.v2.Rule.ForceReturnFacetAction)) { + return super.equals(obj); + } + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction other = + (com.google.cloud.retail.v2.Rule.ForceReturnFacetAction) obj; + + if (!getFacetPositionAdjustmentsList().equals(other.getFacetPositionAdjustmentsList())) + 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 (getFacetPositionAdjustmentsCount() > 0) { + hash = (37 * hash) + FACET_POSITION_ADJUSTMENTS_FIELD_NUMBER; + hash = (53 * hash) + getFacetPositionAdjustmentsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2.Rule.ForceReturnFacetAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Force returns an attribute/facet in the request around a certain position
+     * or above.
+     *
+     * * Rule Condition:
+     *   Must specify non-empty
+     *   [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]
+     *   (for search only) or
+     *   [Condition.page_categories][google.cloud.retail.v2.Condition.page_categories]
+     *   (for browse only), but can't specify both.
+     *
+     * * Action Inputs: attribute name, position
+     *
+     * * Action Result: Will force return a facet key around a certain position
+     * or above if the condition is satisfied.
+     *
+     * Example: Suppose the query is "shoes", the
+     * [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms] is
+     * "shoes", the
+     * [ForceReturnFacetAction.FacetPositionAdjustment.attribute_name][google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment.attribute_name]
+     * is "size" and the
+     * [ForceReturnFacetAction.FacetPositionAdjustment.position][google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment.position]
+     * is 8.
+     *
+     * Two cases: a) The facet key "size" is not already in the top 8 slots, then
+     * the facet "size" will appear at a position close to 8. b) The facet key
+     * "size" in among the top 8 positions in the request, then it will stay at
+     * its current rank.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2.Rule.ForceReturnFacetAction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.Rule.ForceReturnFacetAction) + com.google.cloud.retail.v2.Rule.ForceReturnFacetActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.class, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.Builder.class); + } + + // Construct using com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (facetPositionAdjustmentsBuilder_ == null) { + facetPositionAdjustments_ = java.util.Collections.emptyList(); + } else { + facetPositionAdjustments_ = null; + facetPositionAdjustmentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_ForceReturnFacetAction_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction getDefaultInstanceForType() { + return com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction build() { + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction buildPartial() { + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction result = + new com.google.cloud.retail.v2.Rule.ForceReturnFacetAction(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction result) { + if (facetPositionAdjustmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + facetPositionAdjustments_ = + java.util.Collections.unmodifiableList(facetPositionAdjustments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.facetPositionAdjustments_ = facetPositionAdjustments_; + } else { + result.facetPositionAdjustments_ = facetPositionAdjustmentsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.retail.v2.Rule.ForceReturnFacetAction result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2.Rule.ForceReturnFacetAction) { + return mergeFrom((com.google.cloud.retail.v2.Rule.ForceReturnFacetAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2.Rule.ForceReturnFacetAction other) { + if (other == com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.getDefaultInstance()) + return this; + if (facetPositionAdjustmentsBuilder_ == null) { + if (!other.facetPositionAdjustments_.isEmpty()) { + if (facetPositionAdjustments_.isEmpty()) { + facetPositionAdjustments_ = other.facetPositionAdjustments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.addAll(other.facetPositionAdjustments_); + } + onChanged(); + } + } else { + if (!other.facetPositionAdjustments_.isEmpty()) { + if (facetPositionAdjustmentsBuilder_.isEmpty()) { + facetPositionAdjustmentsBuilder_.dispose(); + facetPositionAdjustmentsBuilder_ = null; + facetPositionAdjustments_ = other.facetPositionAdjustments_; + bitField0_ = (bitField0_ & ~0x00000001); + facetPositionAdjustmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFacetPositionAdjustmentsFieldBuilder() + : null; + } else { + facetPositionAdjustmentsBuilder_.addAllMessages(other.facetPositionAdjustments_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment m = + input.readMessage( + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction + .FacetPositionAdjustment.parser(), + extensionRegistry); + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.add(m); + } else { + facetPositionAdjustmentsBuilder_.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.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment> + facetPositionAdjustments_ = java.util.Collections.emptyList(); + + private void ensureFacetPositionAdjustmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + facetPositionAdjustments_ = + new java.util.ArrayList< + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment>( + facetPositionAdjustments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder> + facetPositionAdjustmentsBuilder_; + + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public java.util.List< + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment> + getFacetPositionAdjustmentsList() { + if (facetPositionAdjustmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(facetPositionAdjustments_); + } else { + return facetPositionAdjustmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public int getFacetPositionAdjustmentsCount() { + if (facetPositionAdjustmentsBuilder_ == null) { + return facetPositionAdjustments_.size(); + } else { + return facetPositionAdjustmentsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getFacetPositionAdjustments(int index) { + if (facetPositionAdjustmentsBuilder_ == null) { + return facetPositionAdjustments_.get(index); + } else { + return facetPositionAdjustmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder setFacetPositionAdjustments( + int index, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment value) { + if (facetPositionAdjustmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.set(index, value); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder setFacetPositionAdjustments( + int index, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder + builderForValue) { + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.set(index, builderForValue.build()); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder addFacetPositionAdjustments( + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment value) { + if (facetPositionAdjustmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.add(value); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder addFacetPositionAdjustments( + int index, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment value) { + if (facetPositionAdjustmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.add(index, value); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder addFacetPositionAdjustments( + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder + builderForValue) { + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.add(builderForValue.build()); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder addFacetPositionAdjustments( + int index, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder + builderForValue) { + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.add(index, builderForValue.build()); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder addAllFacetPositionAdjustments( + java.lang.Iterable< + ? extends + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction + .FacetPositionAdjustment> + values) { + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, facetPositionAdjustments_); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder clearFacetPositionAdjustments() { + if (facetPositionAdjustmentsBuilder_ == null) { + facetPositionAdjustments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder removeFacetPositionAdjustments(int index) { + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.remove(index); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder + getFacetPositionAdjustmentsBuilder(int index) { + return getFacetPositionAdjustmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustmentOrBuilder + getFacetPositionAdjustmentsOrBuilder(int index) { + if (facetPositionAdjustmentsBuilder_ == null) { + return facetPositionAdjustments_.get(index); + } else { + return facetPositionAdjustmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder> + getFacetPositionAdjustmentsOrBuilderList() { + if (facetPositionAdjustmentsBuilder_ != null) { + return facetPositionAdjustmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(facetPositionAdjustments_); + } + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder + addFacetPositionAdjustmentsBuilder() { + return getFacetPositionAdjustmentsFieldBuilder() + .addBuilder( + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder + addFacetPositionAdjustmentsBuilder(int index) { + return getFacetPositionAdjustmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public java.util.List< + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder> + getFacetPositionAdjustmentsBuilderList() { + return getFacetPositionAdjustmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder> + getFacetPositionAdjustmentsFieldBuilder() { + if (facetPositionAdjustmentsBuilder_ == null) { + facetPositionAdjustmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder>( + facetPositionAdjustments_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + facetPositionAdjustments_ = null; + } + return facetPositionAdjustmentsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.Rule.ForceReturnFacetAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.Rule.ForceReturnFacetAction) + private static final com.google.cloud.retail.v2.Rule.ForceReturnFacetAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2.Rule.ForceReturnFacetAction(); + } + + public static com.google.cloud.retail.v2.Rule.ForceReturnFacetAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ForceReturnFacetAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2.Rule.ForceReturnFacetAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RemoveFacetActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2.Rule.RemoveFacetAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @return A list containing the attributeNames. + */ + java.util.List getAttributeNamesList(); + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @return The count of attributeNames. + */ + int getAttributeNamesCount(); + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the element to return. + * @return The attributeNames at the given index. + */ + java.lang.String getAttributeNames(int index); + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the attributeNames at the given index. + */ + com.google.protobuf.ByteString getAttributeNamesBytes(int index); + } + /** + * + * + *
+   * Removes an attribute/facet in the request if is present.
+   *
+   * * Rule Condition:
+   *   Must specify non-empty
+   *   [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]
+   *   (for search only) or
+   *   [Condition.page_categories][google.cloud.retail.v2.Condition.page_categories]
+   *   (for browse only), but can't specify both.
+   *
+   * * Action Input: attribute name
+   *
+   * * Action Result: Will remove the attribute (as a facet) from the request
+   * if it is present.
+   *
+   * Example: Suppose the query is "shoes", the
+   * [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms] is
+   * "shoes" and the attribute name "size", then facet key "size" will be
+   * removed from the request (if it is present).
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2.Rule.RemoveFacetAction} + */ + public static final class RemoveFacetAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.Rule.RemoveFacetAction) + RemoveFacetActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveFacetAction.newBuilder() to construct. + private RemoveFacetAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveFacetAction() { + attributeNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveFacetAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_RemoveFacetAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_RemoveFacetAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.Rule.RemoveFacetAction.class, + com.google.cloud.retail.v2.Rule.RemoveFacetAction.Builder.class); + } + + public static final int ATTRIBUTE_NAMES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList attributeNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @return A list containing the attributeNames. + */ + public com.google.protobuf.ProtocolStringList getAttributeNamesList() { + return attributeNames_; + } + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @return The count of attributeNames. + */ + public int getAttributeNamesCount() { + return attributeNames_.size(); + } + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the element to return. + * @return The attributeNames at the given index. + */ + public java.lang.String getAttributeNames(int index) { + return attributeNames_.get(index); + } + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the attributeNames at the given index. + */ + public com.google.protobuf.ByteString getAttributeNamesBytes(int index) { + return attributeNames_.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 < attributeNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeNames_.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 < attributeNames_.size(); i++) { + dataSize += computeStringSizeNoTag(attributeNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getAttributeNamesList().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.retail.v2.Rule.RemoveFacetAction)) { + return super.equals(obj); + } + com.google.cloud.retail.v2.Rule.RemoveFacetAction other = + (com.google.cloud.retail.v2.Rule.RemoveFacetAction) obj; + + if (!getAttributeNamesList().equals(other.getAttributeNamesList())) 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 (getAttributeNamesCount() > 0) { + hash = (37 * hash) + ATTRIBUTE_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getAttributeNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2.Rule.RemoveFacetAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.Rule.RemoveFacetAction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Rule.RemoveFacetAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.Rule.RemoveFacetAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Rule.RemoveFacetAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2.Rule.RemoveFacetAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Rule.RemoveFacetAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.Rule.RemoveFacetAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Rule.RemoveFacetAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.Rule.RemoveFacetAction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2.Rule.RemoveFacetAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2.Rule.RemoveFacetAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2.Rule.RemoveFacetAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Removes an attribute/facet in the request if is present.
+     *
+     * * Rule Condition:
+     *   Must specify non-empty
+     *   [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]
+     *   (for search only) or
+     *   [Condition.page_categories][google.cloud.retail.v2.Condition.page_categories]
+     *   (for browse only), but can't specify both.
+     *
+     * * Action Input: attribute name
+     *
+     * * Action Result: Will remove the attribute (as a facet) from the request
+     * if it is present.
+     *
+     * Example: Suppose the query is "shoes", the
+     * [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms] is
+     * "shoes" and the attribute name "size", then facet key "size" will be
+     * removed from the request (if it is present).
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2.Rule.RemoveFacetAction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.Rule.RemoveFacetAction) + com.google.cloud.retail.v2.Rule.RemoveFacetActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_RemoveFacetAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_RemoveFacetAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2.Rule.RemoveFacetAction.class, + com.google.cloud.retail.v2.Rule.RemoveFacetAction.Builder.class); + } + + // Construct using com.google.cloud.retail.v2.Rule.RemoveFacetAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_RemoveFacetAction_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2.Rule.RemoveFacetAction getDefaultInstanceForType() { + return com.google.cloud.retail.v2.Rule.RemoveFacetAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2.Rule.RemoveFacetAction build() { + com.google.cloud.retail.v2.Rule.RemoveFacetAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2.Rule.RemoveFacetAction buildPartial() { + com.google.cloud.retail.v2.Rule.RemoveFacetAction result = + new com.google.cloud.retail.v2.Rule.RemoveFacetAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2.Rule.RemoveFacetAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + attributeNames_.makeImmutable(); + result.attributeNames_ = attributeNames_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2.Rule.RemoveFacetAction) { + return mergeFrom((com.google.cloud.retail.v2.Rule.RemoveFacetAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2.Rule.RemoveFacetAction other) { + if (other == com.google.cloud.retail.v2.Rule.RemoveFacetAction.getDefaultInstance()) + return this; + if (!other.attributeNames_.isEmpty()) { + if (attributeNames_.isEmpty()) { + attributeNames_ = other.attributeNames_; + bitField0_ |= 0x00000001; + } else { + ensureAttributeNamesIsMutable(); + attributeNames_.addAll(other.attributeNames_); + } + 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(); + ensureAttributeNamesIsMutable(); + attributeNames_.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 attributeNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAttributeNamesIsMutable() { + if (!attributeNames_.isModifiable()) { + attributeNames_ = new com.google.protobuf.LazyStringArrayList(attributeNames_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @return A list containing the attributeNames. + */ + public com.google.protobuf.ProtocolStringList getAttributeNamesList() { + attributeNames_.makeImmutable(); + return attributeNames_; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @return The count of attributeNames. + */ + public int getAttributeNamesCount() { + return attributeNames_.size(); + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the element to return. + * @return The attributeNames at the given index. + */ + public java.lang.String getAttributeNames(int index) { + return attributeNames_.get(index); + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the attributeNames at the given index. + */ + public com.google.protobuf.ByteString getAttributeNamesBytes(int index) { + return attributeNames_.getByteString(index); + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index to set the value at. + * @param value The attributeNames to set. + * @return This builder for chaining. + */ + public Builder setAttributeNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributeNamesIsMutable(); + attributeNames_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param value The attributeNames to add. + * @return This builder for chaining. + */ + public Builder addAttributeNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributeNamesIsMutable(); + attributeNames_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param values The attributeNames to add. + * @return This builder for chaining. + */ + public Builder addAllAttributeNames(java.lang.Iterable values) { + ensureAttributeNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributeNames_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @return This builder for chaining. + */ + public Builder clearAttributeNames() { + attributeNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param value The bytes of the attributeNames to add. + * @return This builder for chaining. + */ + public Builder addAttributeNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAttributeNamesIsMutable(); + attributeNames_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.Rule.RemoveFacetAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.Rule.RemoveFacetAction) + private static final com.google.cloud.retail.v2.Rule.RemoveFacetAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2.Rule.RemoveFacetAction(); + } + + public static com.google.cloud.retail.v2.Rule.RemoveFacetAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveFacetAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2.Rule.RemoveFacetAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int actionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object action_; + + public enum ActionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BOOST_ACTION(2), + REDIRECT_ACTION(3), + ONEWAY_SYNONYMS_ACTION(6), + DO_NOT_ASSOCIATE_ACTION(7), + REPLACEMENT_ACTION(8), + IGNORE_ACTION(9), + FILTER_ACTION(10), + TWOWAY_SYNONYMS_ACTION(11), + FORCE_RETURN_FACET_ACTION(12), + REMOVE_FACET_ACTION(13), + ACTION_NOT_SET(0); + private final int value; + + private ActionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ActionCase valueOf(int value) { + return forNumber(value); + } + + public static ActionCase forNumber(int value) { + switch (value) { + case 2: + return BOOST_ACTION; + case 3: + return REDIRECT_ACTION; + case 6: + return ONEWAY_SYNONYMS_ACTION; + case 7: + return DO_NOT_ASSOCIATE_ACTION; + case 8: + return REPLACEMENT_ACTION; + case 9: + return IGNORE_ACTION; + case 10: + return FILTER_ACTION; + case 11: + return TWOWAY_SYNONYMS_ACTION; + case 12: + return FORCE_RETURN_FACET_ACTION; + case 13: + return REMOVE_FACET_ACTION; + case 0: + return ACTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); + } + + public static final int BOOST_ACTION_FIELD_NUMBER = 2; + /** + * + * + *
+   * A boost action.
+   * 
+ * + * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + * + * @return Whether the boostAction field is set. + */ + @java.lang.Override + public boolean hasBoostAction() { + return actionCase_ == 2; + } + /** + * + * + *
+   * A boost action.
+   * 
+ * + * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + * + * @return The boostAction. + */ + @java.lang.Override + public com.google.cloud.retail.v2.Rule.BoostAction getBoostAction() { + if (actionCase_ == 2) { + return (com.google.cloud.retail.v2.Rule.BoostAction) action_; + } + return com.google.cloud.retail.v2.Rule.BoostAction.getDefaultInstance(); + } + /** + * + * + *
+   * A boost action.
+   * 
+ * + * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + */ + @java.lang.Override + public com.google.cloud.retail.v2.Rule.BoostActionOrBuilder getBoostActionOrBuilder() { + if (actionCase_ == 2) { + return (com.google.cloud.retail.v2.Rule.BoostAction) action_; + } + return com.google.cloud.retail.v2.Rule.BoostAction.getDefaultInstance(); + } + + public static final int REDIRECT_ACTION_FIELD_NUMBER = 3; + /** + * + * + *
+   * Redirects a shopper to a specific page.
+   * 
+ * + * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + * + * @return Whether the redirectAction field is set. + */ + @java.lang.Override + public boolean hasRedirectAction() { + return actionCase_ == 3; + } + /** + * + * + *
+   * Redirects a shopper to a specific page.
+   * 
+ * + * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + * + * @return The redirectAction. + */ + @java.lang.Override + public com.google.cloud.retail.v2.Rule.RedirectAction getRedirectAction() { + if (actionCase_ == 3) { + return (com.google.cloud.retail.v2.Rule.RedirectAction) action_; + } + return com.google.cloud.retail.v2.Rule.RedirectAction.getDefaultInstance(); + } + /** + * + * + *
+   * Redirects a shopper to a specific page.
+   * 
+ * + * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + */ + @java.lang.Override + public com.google.cloud.retail.v2.Rule.RedirectActionOrBuilder getRedirectActionOrBuilder() { + if (actionCase_ == 3) { + return (com.google.cloud.retail.v2.Rule.RedirectAction) action_; + } + return com.google.cloud.retail.v2.Rule.RedirectAction.getDefaultInstance(); + } + + public static final int ONEWAY_SYNONYMS_ACTION_FIELD_NUMBER = 6; + /** + * + * + *
+   * Treats specific term as a synonym with a group of terms.
+   * Group of terms will not be treated as synonyms with the specific term.
+   * 
+ * + * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * + * @return Whether the onewaySynonymsAction field is set. + */ + @java.lang.Override + public boolean hasOnewaySynonymsAction() { + return actionCase_ == 6; + } + /** + * + * + *
+   * Treats specific term as a synonym with a group of terms.
+   * Group of terms will not be treated as synonyms with the specific term.
+   * 
+ * + * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * + * @return The onewaySynonymsAction. + */ + @java.lang.Override + public com.google.cloud.retail.v2.Rule.OnewaySynonymsAction getOnewaySynonymsAction() { + if (actionCase_ == 6) { + return (com.google.cloud.retail.v2.Rule.OnewaySynonymsAction) action_; + } + return com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.getDefaultInstance(); } /** * @@ -8697,6 +11536,113 @@ public com.google.cloud.retail.v2.Rule.TwowaySynonymsAction getTwowaySynonymsAct return com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.getDefaultInstance(); } + public static final int FORCE_RETURN_FACET_ACTION_FIELD_NUMBER = 12; + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + * + * @return Whether the forceReturnFacetAction field is set. + */ + @java.lang.Override + public boolean hasForceReturnFacetAction() { + return actionCase_ == 12; + } + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + * + * @return The forceReturnFacetAction. + */ + @java.lang.Override + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction getForceReturnFacetAction() { + if (actionCase_ == 12) { + return (com.google.cloud.retail.v2.Rule.ForceReturnFacetAction) action_; + } + return com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.getDefaultInstance(); + } + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2.Rule.ForceReturnFacetActionOrBuilder + getForceReturnFacetActionOrBuilder() { + if (actionCase_ == 12) { + return (com.google.cloud.retail.v2.Rule.ForceReturnFacetAction) action_; + } + return com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.getDefaultInstance(); + } + + public static final int REMOVE_FACET_ACTION_FIELD_NUMBER = 13; + /** + * + * + *
+   * Remove an attribute as a facet in the request (if present).
+   * 
+ * + * .google.cloud.retail.v2.Rule.RemoveFacetAction remove_facet_action = 13; + * + * @return Whether the removeFacetAction field is set. + */ + @java.lang.Override + public boolean hasRemoveFacetAction() { + return actionCase_ == 13; + } + /** + * + * + *
+   * Remove an attribute as a facet in the request (if present).
+   * 
+ * + * .google.cloud.retail.v2.Rule.RemoveFacetAction remove_facet_action = 13; + * + * @return The removeFacetAction. + */ + @java.lang.Override + public com.google.cloud.retail.v2.Rule.RemoveFacetAction getRemoveFacetAction() { + if (actionCase_ == 13) { + return (com.google.cloud.retail.v2.Rule.RemoveFacetAction) action_; + } + return com.google.cloud.retail.v2.Rule.RemoveFacetAction.getDefaultInstance(); + } + /** + * + * + *
+   * Remove an attribute as a facet in the request (if present).
+   * 
+ * + * .google.cloud.retail.v2.Rule.RemoveFacetAction remove_facet_action = 13; + */ + @java.lang.Override + public com.google.cloud.retail.v2.Rule.RemoveFacetActionOrBuilder + getRemoveFacetActionOrBuilder() { + if (actionCase_ == 13) { + return (com.google.cloud.retail.v2.Rule.RemoveFacetAction) action_; + } + return com.google.cloud.retail.v2.Rule.RemoveFacetAction.getDefaultInstance(); + } + public static final int CONDITION_FIELD_NUMBER = 1; private com.google.cloud.retail.v2.Condition condition_; /** @@ -8797,6 +11743,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (actionCase_ == 11) { output.writeMessage(11, (com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) action_); } + if (actionCase_ == 12) { + output.writeMessage(12, (com.google.cloud.retail.v2.Rule.ForceReturnFacetAction) action_); + } + if (actionCase_ == 13) { + output.writeMessage(13, (com.google.cloud.retail.v2.Rule.RemoveFacetAction) action_); + } getUnknownFields().writeTo(output); } @@ -8849,6 +11801,16 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 11, (com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) action_); } + if (actionCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.cloud.retail.v2.Rule.ForceReturnFacetAction) action_); + } + if (actionCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.cloud.retail.v2.Rule.RemoveFacetAction) action_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -8894,6 +11856,12 @@ public boolean equals(final java.lang.Object obj) { case 11: if (!getTwowaySynonymsAction().equals(other.getTwowaySynonymsAction())) return false; break; + case 12: + if (!getForceReturnFacetAction().equals(other.getForceReturnFacetAction())) return false; + break; + case 13: + if (!getRemoveFacetAction().equals(other.getRemoveFacetAction())) return false; + break; case 0: default: } @@ -8945,6 +11913,14 @@ public int hashCode() { hash = (37 * hash) + TWOWAY_SYNONYMS_ACTION_FIELD_NUMBER; hash = (53 * hash) + getTwowaySynonymsAction().hashCode(); break; + case 12: + hash = (37 * hash) + FORCE_RETURN_FACET_ACTION_FIELD_NUMBER; + hash = (53 * hash) + getForceReturnFacetAction().hashCode(); + break; + case 13: + hash = (37 * hash) + REMOVE_FACET_ACTION_FIELD_NUMBER; + hash = (53 * hash) + getRemoveFacetAction().hashCode(); + break; case 0: default: } @@ -9079,444 +12055,906 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.retail.v2.Rule.class, com.google.cloud.retail.v2.Rule.Builder.class); } - // Construct using com.google.cloud.retail.v2.Rule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + // Construct using com.google.cloud.retail.v2.Rule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConditionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (boostActionBuilder_ != null) { + boostActionBuilder_.clear(); + } + if (redirectActionBuilder_ != null) { + redirectActionBuilder_.clear(); + } + if (onewaySynonymsActionBuilder_ != null) { + onewaySynonymsActionBuilder_.clear(); + } + if (doNotAssociateActionBuilder_ != null) { + doNotAssociateActionBuilder_.clear(); + } + if (replacementActionBuilder_ != null) { + replacementActionBuilder_.clear(); + } + if (ignoreActionBuilder_ != null) { + ignoreActionBuilder_.clear(); + } + if (filterActionBuilder_ != null) { + filterActionBuilder_.clear(); + } + if (twowaySynonymsActionBuilder_ != null) { + twowaySynonymsActionBuilder_.clear(); + } + if (forceReturnFacetActionBuilder_ != null) { + forceReturnFacetActionBuilder_.clear(); + } + if (removeFacetActionBuilder_ != null) { + removeFacetActionBuilder_.clear(); + } + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + actionCase_ = 0; + action_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2.CommonProto + .internal_static_google_cloud_retail_v2_Rule_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2.Rule getDefaultInstanceForType() { + return com.google.cloud.retail.v2.Rule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2.Rule build() { + com.google.cloud.retail.v2.Rule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2.Rule buildPartial() { + com.google.cloud.retail.v2.Rule result = new com.google.cloud.retail.v2.Rule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2.Rule result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000400) != 0)) { + result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.retail.v2.Rule result) { + result.actionCase_ = actionCase_; + result.action_ = this.action_; + if (actionCase_ == 2 && boostActionBuilder_ != null) { + result.action_ = boostActionBuilder_.build(); + } + if (actionCase_ == 3 && redirectActionBuilder_ != null) { + result.action_ = redirectActionBuilder_.build(); + } + if (actionCase_ == 6 && onewaySynonymsActionBuilder_ != null) { + result.action_ = onewaySynonymsActionBuilder_.build(); + } + if (actionCase_ == 7 && doNotAssociateActionBuilder_ != null) { + result.action_ = doNotAssociateActionBuilder_.build(); + } + if (actionCase_ == 8 && replacementActionBuilder_ != null) { + result.action_ = replacementActionBuilder_.build(); + } + if (actionCase_ == 9 && ignoreActionBuilder_ != null) { + result.action_ = ignoreActionBuilder_.build(); + } + if (actionCase_ == 10 && filterActionBuilder_ != null) { + result.action_ = filterActionBuilder_.build(); + } + if (actionCase_ == 11 && twowaySynonymsActionBuilder_ != null) { + result.action_ = twowaySynonymsActionBuilder_.build(); + } + if (actionCase_ == 12 && forceReturnFacetActionBuilder_ != null) { + result.action_ = forceReturnFacetActionBuilder_.build(); + } + if (actionCase_ == 13 && removeFacetActionBuilder_ != null) { + result.action_ = removeFacetActionBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConditionFieldBuilder(); - } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (boostActionBuilder_ != null) { - boostActionBuilder_.clear(); - } - if (redirectActionBuilder_ != null) { - redirectActionBuilder_.clear(); - } - if (onewaySynonymsActionBuilder_ != null) { - onewaySynonymsActionBuilder_.clear(); - } - if (doNotAssociateActionBuilder_ != null) { - doNotAssociateActionBuilder_.clear(); - } - if (replacementActionBuilder_ != null) { - replacementActionBuilder_.clear(); - } - if (ignoreActionBuilder_ != null) { - ignoreActionBuilder_.clear(); - } - if (filterActionBuilder_ != null) { - filterActionBuilder_.clear(); + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2.Rule) { + return mergeFrom((com.google.cloud.retail.v2.Rule) other); + } else { + super.mergeFrom(other); + return this; } - if (twowaySynonymsActionBuilder_ != null) { - twowaySynonymsActionBuilder_.clear(); + } + + public Builder mergeFrom(com.google.cloud.retail.v2.Rule other) { + if (other == com.google.cloud.retail.v2.Rule.getDefaultInstance()) return this; + if (other.hasCondition()) { + mergeCondition(other.getCondition()); } - condition_ = null; - if (conditionBuilder_ != null) { - conditionBuilder_.dispose(); - conditionBuilder_ = null; + switch (other.getActionCase()) { + case BOOST_ACTION: + { + mergeBoostAction(other.getBoostAction()); + break; + } + case REDIRECT_ACTION: + { + mergeRedirectAction(other.getRedirectAction()); + break; + } + case ONEWAY_SYNONYMS_ACTION: + { + mergeOnewaySynonymsAction(other.getOnewaySynonymsAction()); + break; + } + case DO_NOT_ASSOCIATE_ACTION: + { + mergeDoNotAssociateAction(other.getDoNotAssociateAction()); + break; + } + case REPLACEMENT_ACTION: + { + mergeReplacementAction(other.getReplacementAction()); + break; + } + case IGNORE_ACTION: + { + mergeIgnoreAction(other.getIgnoreAction()); + break; + } + case FILTER_ACTION: + { + mergeFilterAction(other.getFilterAction()); + break; + } + case TWOWAY_SYNONYMS_ACTION: + { + mergeTwowaySynonymsAction(other.getTwowaySynonymsAction()); + break; + } + case FORCE_RETURN_FACET_ACTION: + { + mergeForceReturnFacetAction(other.getForceReturnFacetAction()); + break; + } + case REMOVE_FACET_ACTION: + { + mergeRemoveFacetAction(other.getRemoveFacetAction()); + break; + } + case ACTION_NOT_SET: + { + break; + } } - actionCase_ = 0; - action_ = null; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); return this; } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.retail.v2.CommonProto - .internal_static_google_cloud_retail_v2_Rule_descriptor; + public final boolean isInitialized() { + return true; } @java.lang.Override - public com.google.cloud.retail.v2.Rule getDefaultInstanceForType() { - return com.google.cloud.retail.v2.Rule.getDefaultInstance(); + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 10 + case 18: + { + input.readMessage(getBoostActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getRedirectActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 3; + break; + } // case 26 + case 50: + { + input.readMessage( + getOnewaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + getDoNotAssociateActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + getReplacementActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage(getIgnoreActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage(getFilterActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage( + getTwowaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage( + getForceReturnFacetActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage( + getRemoveFacetActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 13; + break; + } // case 106 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - @java.lang.Override - public com.google.cloud.retail.v2.Rule build() { - com.google.cloud.retail.v2.Rule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + private int actionCase_ = 0; + private java.lang.Object action_; + + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); + } + + public Builder clearAction() { + actionCase_ = 0; + action_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.Rule.BoostAction, + com.google.cloud.retail.v2.Rule.BoostAction.Builder, + com.google.cloud.retail.v2.Rule.BoostActionOrBuilder> + boostActionBuilder_; + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + * + * @return Whether the boostAction field is set. + */ + @java.lang.Override + public boolean hasBoostAction() { + return actionCase_ == 2; } - + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + * + * @return The boostAction. + */ @java.lang.Override - public com.google.cloud.retail.v2.Rule buildPartial() { - com.google.cloud.retail.v2.Rule result = new com.google.cloud.retail.v2.Rule(this); - if (bitField0_ != 0) { - buildPartial0(result); + public com.google.cloud.retail.v2.Rule.BoostAction getBoostAction() { + if (boostActionBuilder_ == null) { + if (actionCase_ == 2) { + return (com.google.cloud.retail.v2.Rule.BoostAction) action_; + } + return com.google.cloud.retail.v2.Rule.BoostAction.getDefaultInstance(); + } else { + if (actionCase_ == 2) { + return boostActionBuilder_.getMessage(); + } + return com.google.cloud.retail.v2.Rule.BoostAction.getDefaultInstance(); } - buildPartialOneofs(result); - onBuilt(); - return result; } - - private void buildPartial0(com.google.cloud.retail.v2.Rule result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000100) != 0)) { - result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build(); - to_bitField0_ |= 0x00000001; + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + */ + public Builder setBoostAction(com.google.cloud.retail.v2.Rule.BoostAction value) { + if (boostActionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + boostActionBuilder_.setMessage(value); } - result.bitField0_ |= to_bitField0_; + actionCase_ = 2; + return this; } - - private void buildPartialOneofs(com.google.cloud.retail.v2.Rule result) { - result.actionCase_ = actionCase_; - result.action_ = this.action_; - if (actionCase_ == 2 && boostActionBuilder_ != null) { - result.action_ = boostActionBuilder_.build(); - } - if (actionCase_ == 3 && redirectActionBuilder_ != null) { - result.action_ = redirectActionBuilder_.build(); - } - if (actionCase_ == 6 && onewaySynonymsActionBuilder_ != null) { - result.action_ = onewaySynonymsActionBuilder_.build(); - } - if (actionCase_ == 7 && doNotAssociateActionBuilder_ != null) { - result.action_ = doNotAssociateActionBuilder_.build(); - } - if (actionCase_ == 8 && replacementActionBuilder_ != null) { - result.action_ = replacementActionBuilder_.build(); - } - if (actionCase_ == 9 && ignoreActionBuilder_ != null) { - result.action_ = ignoreActionBuilder_.build(); - } - if (actionCase_ == 10 && filterActionBuilder_ != null) { - result.action_ = filterActionBuilder_.build(); - } - if (actionCase_ == 11 && twowaySynonymsActionBuilder_ != null) { - result.action_ = twowaySynonymsActionBuilder_.build(); + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + */ + public Builder setBoostAction( + com.google.cloud.retail.v2.Rule.BoostAction.Builder builderForValue) { + if (boostActionBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + boostActionBuilder_.setMessage(builderForValue.build()); } + actionCase_ = 2; + return this; } - - @java.lang.Override - public Builder clone() { - return super.clone(); + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + */ + public Builder mergeBoostAction(com.google.cloud.retail.v2.Rule.BoostAction value) { + if (boostActionBuilder_ == null) { + if (actionCase_ == 2 + && action_ != com.google.cloud.retail.v2.Rule.BoostAction.getDefaultInstance()) { + action_ = + com.google.cloud.retail.v2.Rule.BoostAction.newBuilder( + (com.google.cloud.retail.v2.Rule.BoostAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 2) { + boostActionBuilder_.mergeFrom(value); + } else { + boostActionBuilder_.setMessage(value); + } + } + actionCase_ = 2; + return this; } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + */ + public Builder clearBoostAction() { + if (boostActionBuilder_ == null) { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + } + boostActionBuilder_.clear(); + } + return this; } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + */ + public com.google.cloud.retail.v2.Rule.BoostAction.Builder getBoostActionBuilder() { + return getBoostActionFieldBuilder().getBuilder(); } - + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + */ @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + public com.google.cloud.retail.v2.Rule.BoostActionOrBuilder getBoostActionOrBuilder() { + if ((actionCase_ == 2) && (boostActionBuilder_ != null)) { + return boostActionBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 2) { + return (com.google.cloud.retail.v2.Rule.BoostAction) action_; + } + return com.google.cloud.retail.v2.Rule.BoostAction.getDefaultInstance(); + } } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.Rule.BoostAction, + com.google.cloud.retail.v2.Rule.BoostAction.Builder, + com.google.cloud.retail.v2.Rule.BoostActionOrBuilder> + getBoostActionFieldBuilder() { + if (boostActionBuilder_ == null) { + if (!(actionCase_ == 2)) { + action_ = com.google.cloud.retail.v2.Rule.BoostAction.getDefaultInstance(); + } + boostActionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.Rule.BoostAction, + com.google.cloud.retail.v2.Rule.BoostAction.Builder, + com.google.cloud.retail.v2.Rule.BoostActionOrBuilder>( + (com.google.cloud.retail.v2.Rule.BoostAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 2; + onChanged(); + return boostActionBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.Rule.RedirectAction, + com.google.cloud.retail.v2.Rule.RedirectAction.Builder, + com.google.cloud.retail.v2.Rule.RedirectActionOrBuilder> + redirectActionBuilder_; + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + * + * @return Whether the redirectAction field is set. + */ @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + public boolean hasRedirectAction() { + return actionCase_ == 3; } - + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + * + * @return The redirectAction. + */ @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.retail.v2.Rule) { - return mergeFrom((com.google.cloud.retail.v2.Rule) other); + public com.google.cloud.retail.v2.Rule.RedirectAction getRedirectAction() { + if (redirectActionBuilder_ == null) { + if (actionCase_ == 3) { + return (com.google.cloud.retail.v2.Rule.RedirectAction) action_; + } + return com.google.cloud.retail.v2.Rule.RedirectAction.getDefaultInstance(); } else { - super.mergeFrom(other); - return this; + if (actionCase_ == 3) { + return redirectActionBuilder_.getMessage(); + } + return com.google.cloud.retail.v2.Rule.RedirectAction.getDefaultInstance(); } } - - public Builder mergeFrom(com.google.cloud.retail.v2.Rule other) { - if (other == com.google.cloud.retail.v2.Rule.getDefaultInstance()) return this; - if (other.hasCondition()) { - mergeCondition(other.getCondition()); - } - switch (other.getActionCase()) { - case BOOST_ACTION: - { - mergeBoostAction(other.getBoostAction()); - break; - } - case REDIRECT_ACTION: - { - mergeRedirectAction(other.getRedirectAction()); - break; - } - case ONEWAY_SYNONYMS_ACTION: - { - mergeOnewaySynonymsAction(other.getOnewaySynonymsAction()); - break; - } - case DO_NOT_ASSOCIATE_ACTION: - { - mergeDoNotAssociateAction(other.getDoNotAssociateAction()); - break; - } - case REPLACEMENT_ACTION: - { - mergeReplacementAction(other.getReplacementAction()); - break; - } - case IGNORE_ACTION: - { - mergeIgnoreAction(other.getIgnoreAction()); - break; - } - case FILTER_ACTION: - { - mergeFilterAction(other.getFilterAction()); - break; - } - case TWOWAY_SYNONYMS_ACTION: - { - mergeTwowaySynonymsAction(other.getTwowaySynonymsAction()); - break; - } - case ACTION_NOT_SET: - { - break; - } + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + */ + public Builder setRedirectAction(com.google.cloud.retail.v2.Rule.RedirectAction value) { + if (redirectActionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + redirectActionBuilder_.setMessage(value); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); + actionCase_ = 3; return this; } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + */ + public Builder setRedirectAction( + com.google.cloud.retail.v2.Rule.RedirectAction.Builder builderForValue) { + if (redirectActionBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + redirectActionBuilder_.setMessage(builderForValue.build()); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 10 - case 18: - { - input.readMessage(getBoostActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 2; - break; - } // case 18 - case 26: - { - input.readMessage(getRedirectActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 3; - break; - } // case 26 - case 50: - { - input.readMessage( - getOnewaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 6; - break; - } // case 50 - case 58: - { - input.readMessage( - getDoNotAssociateActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 7; - break; - } // case 58 - case 66: - { - input.readMessage( - getReplacementActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 8; - break; - } // case 66 - case 74: - { - input.readMessage(getIgnoreActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 9; - break; - } // case 74 - case 82: - { - input.readMessage(getFilterActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 10; - break; - } // case 82 - case 90: - { - input.readMessage( - getTwowaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 11; - 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 { + actionCase_ = 3; + return this; + } + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + */ + public Builder mergeRedirectAction(com.google.cloud.retail.v2.Rule.RedirectAction value) { + if (redirectActionBuilder_ == null) { + if (actionCase_ == 3 + && action_ != com.google.cloud.retail.v2.Rule.RedirectAction.getDefaultInstance()) { + action_ = + com.google.cloud.retail.v2.Rule.RedirectAction.newBuilder( + (com.google.cloud.retail.v2.Rule.RedirectAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } onChanged(); - } // finally + } else { + if (actionCase_ == 3) { + redirectActionBuilder_.mergeFrom(value); + } else { + redirectActionBuilder_.setMessage(value); + } + } + actionCase_ = 3; + return this; + } + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + */ + public Builder clearRedirectAction() { + if (redirectActionBuilder_ == null) { + if (actionCase_ == 3) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 3) { + actionCase_ = 0; + action_ = null; + } + redirectActionBuilder_.clear(); + } return this; } - - private int actionCase_ = 0; - private java.lang.Object action_; - - public ActionCase getActionCase() { - return ActionCase.forNumber(actionCase_); + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + */ + public com.google.cloud.retail.v2.Rule.RedirectAction.Builder getRedirectActionBuilder() { + return getRedirectActionFieldBuilder().getBuilder(); } - - public Builder clearAction() { - actionCase_ = 0; - action_ = null; + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + */ + @java.lang.Override + public com.google.cloud.retail.v2.Rule.RedirectActionOrBuilder getRedirectActionOrBuilder() { + if ((actionCase_ == 3) && (redirectActionBuilder_ != null)) { + return redirectActionBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 3) { + return (com.google.cloud.retail.v2.Rule.RedirectAction) action_; + } + return com.google.cloud.retail.v2.Rule.RedirectAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.Rule.RedirectAction, + com.google.cloud.retail.v2.Rule.RedirectAction.Builder, + com.google.cloud.retail.v2.Rule.RedirectActionOrBuilder> + getRedirectActionFieldBuilder() { + if (redirectActionBuilder_ == null) { + if (!(actionCase_ == 3)) { + action_ = com.google.cloud.retail.v2.Rule.RedirectAction.getDefaultInstance(); + } + redirectActionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2.Rule.RedirectAction, + com.google.cloud.retail.v2.Rule.RedirectAction.Builder, + com.google.cloud.retail.v2.Rule.RedirectActionOrBuilder>( + (com.google.cloud.retail.v2.Rule.RedirectAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 3; onChanged(); - return this; + return redirectActionBuilder_; } - private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.BoostAction, - com.google.cloud.retail.v2.Rule.BoostAction.Builder, - com.google.cloud.retail.v2.Rule.BoostActionOrBuilder> - boostActionBuilder_; + com.google.cloud.retail.v2.Rule.OnewaySynonymsAction, + com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.Builder, + com.google.cloud.retail.v2.Rule.OnewaySynonymsActionOrBuilder> + onewaySynonymsActionBuilder_; /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; * - * @return Whether the boostAction field is set. + * @return Whether the onewaySynonymsAction field is set. */ @java.lang.Override - public boolean hasBoostAction() { - return actionCase_ == 2; + public boolean hasOnewaySynonymsAction() { + return actionCase_ == 6; } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; * - * @return The boostAction. + * @return The onewaySynonymsAction. */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.BoostAction getBoostAction() { - if (boostActionBuilder_ == null) { - if (actionCase_ == 2) { - return (com.google.cloud.retail.v2.Rule.BoostAction) action_; + public com.google.cloud.retail.v2.Rule.OnewaySynonymsAction getOnewaySynonymsAction() { + if (onewaySynonymsActionBuilder_ == null) { + if (actionCase_ == 6) { + return (com.google.cloud.retail.v2.Rule.OnewaySynonymsAction) action_; } - return com.google.cloud.retail.v2.Rule.BoostAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.getDefaultInstance(); } else { - if (actionCase_ == 2) { - return boostActionBuilder_.getMessage(); + if (actionCase_ == 6) { + return onewaySynonymsActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2.Rule.BoostAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.getDefaultInstance(); } } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; */ - public Builder setBoostAction(com.google.cloud.retail.v2.Rule.BoostAction value) { - if (boostActionBuilder_ == null) { + public Builder setOnewaySynonymsAction( + com.google.cloud.retail.v2.Rule.OnewaySynonymsAction value) { + if (onewaySynonymsActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - boostActionBuilder_.setMessage(value); + onewaySynonymsActionBuilder_.setMessage(value); } - actionCase_ = 2; + actionCase_ = 6; return this; } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; */ - public Builder setBoostAction( - com.google.cloud.retail.v2.Rule.BoostAction.Builder builderForValue) { - if (boostActionBuilder_ == null) { + public Builder setOnewaySynonymsAction( + com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.Builder builderForValue) { + if (onewaySynonymsActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - boostActionBuilder_.setMessage(builderForValue.build()); + onewaySynonymsActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 2; + actionCase_ = 6; return this; } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; */ - public Builder mergeBoostAction(com.google.cloud.retail.v2.Rule.BoostAction value) { - if (boostActionBuilder_ == null) { - if (actionCase_ == 2 - && action_ != com.google.cloud.retail.v2.Rule.BoostAction.getDefaultInstance()) { + public Builder mergeOnewaySynonymsAction( + com.google.cloud.retail.v2.Rule.OnewaySynonymsAction value) { + if (onewaySynonymsActionBuilder_ == null) { + if (actionCase_ == 6 + && action_ + != com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2.Rule.BoostAction.newBuilder( - (com.google.cloud.retail.v2.Rule.BoostAction) action_) + com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.newBuilder( + (com.google.cloud.retail.v2.Rule.OnewaySynonymsAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -9524,37 +12962,38 @@ public Builder mergeBoostAction(com.google.cloud.retail.v2.Rule.BoostAction valu } onChanged(); } else { - if (actionCase_ == 2) { - boostActionBuilder_.mergeFrom(value); + if (actionCase_ == 6) { + onewaySynonymsActionBuilder_.mergeFrom(value); } else { - boostActionBuilder_.setMessage(value); + onewaySynonymsActionBuilder_.setMessage(value); } } - actionCase_ = 2; + actionCase_ = 6; return this; } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; */ - public Builder clearBoostAction() { - if (boostActionBuilder_ == null) { - if (actionCase_ == 2) { + public Builder clearOnewaySynonymsAction() { + if (onewaySynonymsActionBuilder_ == null) { + if (actionCase_ == 6) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 2) { + if (actionCase_ == 6) { actionCase_ = 0; action_ = null; } - boostActionBuilder_.clear(); + onewaySynonymsActionBuilder_.clear(); } return this; } @@ -9562,170 +13001,178 @@ public Builder clearBoostAction() { * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; */ - public com.google.cloud.retail.v2.Rule.BoostAction.Builder getBoostActionBuilder() { - return getBoostActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.Builder + getOnewaySynonymsActionBuilder() { + return getOnewaySynonymsActionFieldBuilder().getBuilder(); } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.BoostActionOrBuilder getBoostActionOrBuilder() { - if ((actionCase_ == 2) && (boostActionBuilder_ != null)) { - return boostActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2.Rule.OnewaySynonymsActionOrBuilder + getOnewaySynonymsActionOrBuilder() { + if ((actionCase_ == 6) && (onewaySynonymsActionBuilder_ != null)) { + return onewaySynonymsActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 2) { - return (com.google.cloud.retail.v2.Rule.BoostAction) action_; + if (actionCase_ == 6) { + return (com.google.cloud.retail.v2.Rule.OnewaySynonymsAction) action_; } - return com.google.cloud.retail.v2.Rule.BoostAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.getDefaultInstance(); } } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.BoostAction, - com.google.cloud.retail.v2.Rule.BoostAction.Builder, - com.google.cloud.retail.v2.Rule.BoostActionOrBuilder> - getBoostActionFieldBuilder() { - if (boostActionBuilder_ == null) { - if (!(actionCase_ == 2)) { - action_ = com.google.cloud.retail.v2.Rule.BoostAction.getDefaultInstance(); + com.google.cloud.retail.v2.Rule.OnewaySynonymsAction, + com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.Builder, + com.google.cloud.retail.v2.Rule.OnewaySynonymsActionOrBuilder> + getOnewaySynonymsActionFieldBuilder() { + if (onewaySynonymsActionBuilder_ == null) { + if (!(actionCase_ == 6)) { + action_ = com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.getDefaultInstance(); } - boostActionBuilder_ = + onewaySynonymsActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.BoostAction, - com.google.cloud.retail.v2.Rule.BoostAction.Builder, - com.google.cloud.retail.v2.Rule.BoostActionOrBuilder>( - (com.google.cloud.retail.v2.Rule.BoostAction) action_, + com.google.cloud.retail.v2.Rule.OnewaySynonymsAction, + com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.Builder, + com.google.cloud.retail.v2.Rule.OnewaySynonymsActionOrBuilder>( + (com.google.cloud.retail.v2.Rule.OnewaySynonymsAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 2; + actionCase_ = 6; onChanged(); - return boostActionBuilder_; + return onewaySynonymsActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.RedirectAction, - com.google.cloud.retail.v2.Rule.RedirectAction.Builder, - com.google.cloud.retail.v2.Rule.RedirectActionOrBuilder> - redirectActionBuilder_; + com.google.cloud.retail.v2.Rule.DoNotAssociateAction, + com.google.cloud.retail.v2.Rule.DoNotAssociateAction.Builder, + com.google.cloud.retail.v2.Rule.DoNotAssociateActionOrBuilder> + doNotAssociateActionBuilder_; /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; * - * @return Whether the redirectAction field is set. + * @return Whether the doNotAssociateAction field is set. */ @java.lang.Override - public boolean hasRedirectAction() { - return actionCase_ == 3; + public boolean hasDoNotAssociateAction() { + return actionCase_ == 7; } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; * - * @return The redirectAction. + * @return The doNotAssociateAction. */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.RedirectAction getRedirectAction() { - if (redirectActionBuilder_ == null) { - if (actionCase_ == 3) { - return (com.google.cloud.retail.v2.Rule.RedirectAction) action_; + public com.google.cloud.retail.v2.Rule.DoNotAssociateAction getDoNotAssociateAction() { + if (doNotAssociateActionBuilder_ == null) { + if (actionCase_ == 7) { + return (com.google.cloud.retail.v2.Rule.DoNotAssociateAction) action_; } - return com.google.cloud.retail.v2.Rule.RedirectAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.DoNotAssociateAction.getDefaultInstance(); } else { - if (actionCase_ == 3) { - return redirectActionBuilder_.getMessage(); + if (actionCase_ == 7) { + return doNotAssociateActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2.Rule.RedirectAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.DoNotAssociateAction.getDefaultInstance(); } } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; */ - public Builder setRedirectAction(com.google.cloud.retail.v2.Rule.RedirectAction value) { - if (redirectActionBuilder_ == null) { + public Builder setDoNotAssociateAction( + com.google.cloud.retail.v2.Rule.DoNotAssociateAction value) { + if (doNotAssociateActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - redirectActionBuilder_.setMessage(value); + doNotAssociateActionBuilder_.setMessage(value); } - actionCase_ = 3; + actionCase_ = 7; return this; } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; */ - public Builder setRedirectAction( - com.google.cloud.retail.v2.Rule.RedirectAction.Builder builderForValue) { - if (redirectActionBuilder_ == null) { + public Builder setDoNotAssociateAction( + com.google.cloud.retail.v2.Rule.DoNotAssociateAction.Builder builderForValue) { + if (doNotAssociateActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - redirectActionBuilder_.setMessage(builderForValue.build()); + doNotAssociateActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 3; + actionCase_ = 7; return this; } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; */ - public Builder mergeRedirectAction(com.google.cloud.retail.v2.Rule.RedirectAction value) { - if (redirectActionBuilder_ == null) { - if (actionCase_ == 3 - && action_ != com.google.cloud.retail.v2.Rule.RedirectAction.getDefaultInstance()) { + public Builder mergeDoNotAssociateAction( + com.google.cloud.retail.v2.Rule.DoNotAssociateAction value) { + if (doNotAssociateActionBuilder_ == null) { + if (actionCase_ == 7 + && action_ + != com.google.cloud.retail.v2.Rule.DoNotAssociateAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2.Rule.RedirectAction.newBuilder( - (com.google.cloud.retail.v2.Rule.RedirectAction) action_) + com.google.cloud.retail.v2.Rule.DoNotAssociateAction.newBuilder( + (com.google.cloud.retail.v2.Rule.DoNotAssociateAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -9733,37 +13180,37 @@ public Builder mergeRedirectAction(com.google.cloud.retail.v2.Rule.RedirectActio } onChanged(); } else { - if (actionCase_ == 3) { - redirectActionBuilder_.mergeFrom(value); + if (actionCase_ == 7) { + doNotAssociateActionBuilder_.mergeFrom(value); } else { - redirectActionBuilder_.setMessage(value); + doNotAssociateActionBuilder_.setMessage(value); } } - actionCase_ = 3; + actionCase_ = 7; return this; } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; */ - public Builder clearRedirectAction() { - if (redirectActionBuilder_ == null) { - if (actionCase_ == 3) { + public Builder clearDoNotAssociateAction() { + if (doNotAssociateActionBuilder_ == null) { + if (actionCase_ == 7) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 3) { + if (actionCase_ == 7) { actionCase_ = 0; action_ = null; } - redirectActionBuilder_.clear(); + doNotAssociateActionBuilder_.clear(); } return this; } @@ -9771,178 +13218,172 @@ public Builder clearRedirectAction() { * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; */ - public com.google.cloud.retail.v2.Rule.RedirectAction.Builder getRedirectActionBuilder() { - return getRedirectActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2.Rule.DoNotAssociateAction.Builder + getDoNotAssociateActionBuilder() { + return getDoNotAssociateActionFieldBuilder().getBuilder(); } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.RedirectActionOrBuilder getRedirectActionOrBuilder() { - if ((actionCase_ == 3) && (redirectActionBuilder_ != null)) { - return redirectActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2.Rule.DoNotAssociateActionOrBuilder + getDoNotAssociateActionOrBuilder() { + if ((actionCase_ == 7) && (doNotAssociateActionBuilder_ != null)) { + return doNotAssociateActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 3) { - return (com.google.cloud.retail.v2.Rule.RedirectAction) action_; + if (actionCase_ == 7) { + return (com.google.cloud.retail.v2.Rule.DoNotAssociateAction) action_; } - return com.google.cloud.retail.v2.Rule.RedirectAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.DoNotAssociateAction.getDefaultInstance(); } } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.RedirectAction, - com.google.cloud.retail.v2.Rule.RedirectAction.Builder, - com.google.cloud.retail.v2.Rule.RedirectActionOrBuilder> - getRedirectActionFieldBuilder() { - if (redirectActionBuilder_ == null) { - if (!(actionCase_ == 3)) { - action_ = com.google.cloud.retail.v2.Rule.RedirectAction.getDefaultInstance(); + com.google.cloud.retail.v2.Rule.DoNotAssociateAction, + com.google.cloud.retail.v2.Rule.DoNotAssociateAction.Builder, + com.google.cloud.retail.v2.Rule.DoNotAssociateActionOrBuilder> + getDoNotAssociateActionFieldBuilder() { + if (doNotAssociateActionBuilder_ == null) { + if (!(actionCase_ == 7)) { + action_ = com.google.cloud.retail.v2.Rule.DoNotAssociateAction.getDefaultInstance(); } - redirectActionBuilder_ = + doNotAssociateActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.RedirectAction, - com.google.cloud.retail.v2.Rule.RedirectAction.Builder, - com.google.cloud.retail.v2.Rule.RedirectActionOrBuilder>( - (com.google.cloud.retail.v2.Rule.RedirectAction) action_, + com.google.cloud.retail.v2.Rule.DoNotAssociateAction, + com.google.cloud.retail.v2.Rule.DoNotAssociateAction.Builder, + com.google.cloud.retail.v2.Rule.DoNotAssociateActionOrBuilder>( + (com.google.cloud.retail.v2.Rule.DoNotAssociateAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 3; + actionCase_ = 7; onChanged(); - return redirectActionBuilder_; + return doNotAssociateActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.OnewaySynonymsAction, - com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.Builder, - com.google.cloud.retail.v2.Rule.OnewaySynonymsActionOrBuilder> - onewaySynonymsActionBuilder_; + com.google.cloud.retail.v2.Rule.ReplacementAction, + com.google.cloud.retail.v2.Rule.ReplacementAction.Builder, + com.google.cloud.retail.v2.Rule.ReplacementActionOrBuilder> + replacementActionBuilder_; /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; * - * @return Whether the onewaySynonymsAction field is set. + * @return Whether the replacementAction field is set. */ @java.lang.Override - public boolean hasOnewaySynonymsAction() { - return actionCase_ == 6; + public boolean hasReplacementAction() { + return actionCase_ == 8; } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; * - * @return The onewaySynonymsAction. + * @return The replacementAction. */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.OnewaySynonymsAction getOnewaySynonymsAction() { - if (onewaySynonymsActionBuilder_ == null) { - if (actionCase_ == 6) { - return (com.google.cloud.retail.v2.Rule.OnewaySynonymsAction) action_; + public com.google.cloud.retail.v2.Rule.ReplacementAction getReplacementAction() { + if (replacementActionBuilder_ == null) { + if (actionCase_ == 8) { + return (com.google.cloud.retail.v2.Rule.ReplacementAction) action_; } - return com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.ReplacementAction.getDefaultInstance(); } else { - if (actionCase_ == 6) { - return onewaySynonymsActionBuilder_.getMessage(); + if (actionCase_ == 8) { + return replacementActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.ReplacementAction.getDefaultInstance(); } } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; */ - public Builder setOnewaySynonymsAction( - com.google.cloud.retail.v2.Rule.OnewaySynonymsAction value) { - if (onewaySynonymsActionBuilder_ == null) { + public Builder setReplacementAction(com.google.cloud.retail.v2.Rule.ReplacementAction value) { + if (replacementActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - onewaySynonymsActionBuilder_.setMessage(value); + replacementActionBuilder_.setMessage(value); } - actionCase_ = 6; + actionCase_ = 8; return this; } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; */ - public Builder setOnewaySynonymsAction( - com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.Builder builderForValue) { - if (onewaySynonymsActionBuilder_ == null) { + public Builder setReplacementAction( + com.google.cloud.retail.v2.Rule.ReplacementAction.Builder builderForValue) { + if (replacementActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - onewaySynonymsActionBuilder_.setMessage(builderForValue.build()); + replacementActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 6; + actionCase_ = 8; return this; } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
-     * 
- * - * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - */ - public Builder mergeOnewaySynonymsAction( - com.google.cloud.retail.v2.Rule.OnewaySynonymsAction value) { - if (onewaySynonymsActionBuilder_ == null) { - if (actionCase_ == 6 - && action_ - != com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.getDefaultInstance()) { + * Replaces specific terms in the query. + *
+ * + * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; + */ + public Builder mergeReplacementAction(com.google.cloud.retail.v2.Rule.ReplacementAction value) { + if (replacementActionBuilder_ == null) { + if (actionCase_ == 8 + && action_ != com.google.cloud.retail.v2.Rule.ReplacementAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.newBuilder( - (com.google.cloud.retail.v2.Rule.OnewaySynonymsAction) action_) + com.google.cloud.retail.v2.Rule.ReplacementAction.newBuilder( + (com.google.cloud.retail.v2.Rule.ReplacementAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -9950,38 +13391,37 @@ public Builder mergeOnewaySynonymsAction( } onChanged(); } else { - if (actionCase_ == 6) { - onewaySynonymsActionBuilder_.mergeFrom(value); + if (actionCase_ == 8) { + replacementActionBuilder_.mergeFrom(value); } else { - onewaySynonymsActionBuilder_.setMessage(value); + replacementActionBuilder_.setMessage(value); } } - actionCase_ = 6; + actionCase_ = 8; return this; } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; */ - public Builder clearOnewaySynonymsAction() { - if (onewaySynonymsActionBuilder_ == null) { - if (actionCase_ == 6) { + public Builder clearReplacementAction() { + if (replacementActionBuilder_ == null) { + if (actionCase_ == 8) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 6) { + if (actionCase_ == 8) { actionCase_ = 0; action_ = null; } - onewaySynonymsActionBuilder_.clear(); + replacementActionBuilder_.clear(); } return this; } @@ -9989,178 +13429,171 @@ public Builder clearOnewaySynonymsAction() { * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; */ - public com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.Builder - getOnewaySynonymsActionBuilder() { - return getOnewaySynonymsActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2.Rule.ReplacementAction.Builder getReplacementActionBuilder() { + return getReplacementActionFieldBuilder().getBuilder(); } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.OnewaySynonymsActionOrBuilder - getOnewaySynonymsActionOrBuilder() { - if ((actionCase_ == 6) && (onewaySynonymsActionBuilder_ != null)) { - return onewaySynonymsActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2.Rule.ReplacementActionOrBuilder + getReplacementActionOrBuilder() { + if ((actionCase_ == 8) && (replacementActionBuilder_ != null)) { + return replacementActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 6) { - return (com.google.cloud.retail.v2.Rule.OnewaySynonymsAction) action_; + if (actionCase_ == 8) { + return (com.google.cloud.retail.v2.Rule.ReplacementAction) action_; } - return com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.ReplacementAction.getDefaultInstance(); } } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.OnewaySynonymsAction, - com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.Builder, - com.google.cloud.retail.v2.Rule.OnewaySynonymsActionOrBuilder> - getOnewaySynonymsActionFieldBuilder() { - if (onewaySynonymsActionBuilder_ == null) { - if (!(actionCase_ == 6)) { - action_ = com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.getDefaultInstance(); + com.google.cloud.retail.v2.Rule.ReplacementAction, + com.google.cloud.retail.v2.Rule.ReplacementAction.Builder, + com.google.cloud.retail.v2.Rule.ReplacementActionOrBuilder> + getReplacementActionFieldBuilder() { + if (replacementActionBuilder_ == null) { + if (!(actionCase_ == 8)) { + action_ = com.google.cloud.retail.v2.Rule.ReplacementAction.getDefaultInstance(); } - onewaySynonymsActionBuilder_ = + replacementActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.OnewaySynonymsAction, - com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.Builder, - com.google.cloud.retail.v2.Rule.OnewaySynonymsActionOrBuilder>( - (com.google.cloud.retail.v2.Rule.OnewaySynonymsAction) action_, + com.google.cloud.retail.v2.Rule.ReplacementAction, + com.google.cloud.retail.v2.Rule.ReplacementAction.Builder, + com.google.cloud.retail.v2.Rule.ReplacementActionOrBuilder>( + (com.google.cloud.retail.v2.Rule.ReplacementAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 6; + actionCase_ = 8; onChanged(); - return onewaySynonymsActionBuilder_; + return replacementActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.DoNotAssociateAction, - com.google.cloud.retail.v2.Rule.DoNotAssociateAction.Builder, - com.google.cloud.retail.v2.Rule.DoNotAssociateActionOrBuilder> - doNotAssociateActionBuilder_; + com.google.cloud.retail.v2.Rule.IgnoreAction, + com.google.cloud.retail.v2.Rule.IgnoreAction.Builder, + com.google.cloud.retail.v2.Rule.IgnoreActionOrBuilder> + ignoreActionBuilder_; /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; + * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; * - * @return Whether the doNotAssociateAction field is set. + * @return Whether the ignoreAction field is set. */ @java.lang.Override - public boolean hasDoNotAssociateAction() { - return actionCase_ == 7; + public boolean hasIgnoreAction() { + return actionCase_ == 9; } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; + * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; * - * @return The doNotAssociateAction. + * @return The ignoreAction. */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.DoNotAssociateAction getDoNotAssociateAction() { - if (doNotAssociateActionBuilder_ == null) { - if (actionCase_ == 7) { - return (com.google.cloud.retail.v2.Rule.DoNotAssociateAction) action_; + public com.google.cloud.retail.v2.Rule.IgnoreAction getIgnoreAction() { + if (ignoreActionBuilder_ == null) { + if (actionCase_ == 9) { + return (com.google.cloud.retail.v2.Rule.IgnoreAction) action_; } - return com.google.cloud.retail.v2.Rule.DoNotAssociateAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.IgnoreAction.getDefaultInstance(); } else { - if (actionCase_ == 7) { - return doNotAssociateActionBuilder_.getMessage(); + if (actionCase_ == 9) { + return ignoreActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2.Rule.DoNotAssociateAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.IgnoreAction.getDefaultInstance(); } } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; + * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; */ - public Builder setDoNotAssociateAction( - com.google.cloud.retail.v2.Rule.DoNotAssociateAction value) { - if (doNotAssociateActionBuilder_ == null) { + public Builder setIgnoreAction(com.google.cloud.retail.v2.Rule.IgnoreAction value) { + if (ignoreActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - doNotAssociateActionBuilder_.setMessage(value); + ignoreActionBuilder_.setMessage(value); } - actionCase_ = 7; + actionCase_ = 9; return this; } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; + * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; */ - public Builder setDoNotAssociateAction( - com.google.cloud.retail.v2.Rule.DoNotAssociateAction.Builder builderForValue) { - if (doNotAssociateActionBuilder_ == null) { + public Builder setIgnoreAction( + com.google.cloud.retail.v2.Rule.IgnoreAction.Builder builderForValue) { + if (ignoreActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - doNotAssociateActionBuilder_.setMessage(builderForValue.build()); + ignoreActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 7; + actionCase_ = 9; return this; } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; + * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; */ - public Builder mergeDoNotAssociateAction( - com.google.cloud.retail.v2.Rule.DoNotAssociateAction value) { - if (doNotAssociateActionBuilder_ == null) { - if (actionCase_ == 7 - && action_ - != com.google.cloud.retail.v2.Rule.DoNotAssociateAction.getDefaultInstance()) { + public Builder mergeIgnoreAction(com.google.cloud.retail.v2.Rule.IgnoreAction value) { + if (ignoreActionBuilder_ == null) { + if (actionCase_ == 9 + && action_ != com.google.cloud.retail.v2.Rule.IgnoreAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2.Rule.DoNotAssociateAction.newBuilder( - (com.google.cloud.retail.v2.Rule.DoNotAssociateAction) action_) + com.google.cloud.retail.v2.Rule.IgnoreAction.newBuilder( + (com.google.cloud.retail.v2.Rule.IgnoreAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -10168,37 +13601,37 @@ public Builder mergeDoNotAssociateAction( } onChanged(); } else { - if (actionCase_ == 7) { - doNotAssociateActionBuilder_.mergeFrom(value); + if (actionCase_ == 9) { + ignoreActionBuilder_.mergeFrom(value); } else { - doNotAssociateActionBuilder_.setMessage(value); + ignoreActionBuilder_.setMessage(value); } } - actionCase_ = 7; + actionCase_ = 9; return this; } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; + * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; */ - public Builder clearDoNotAssociateAction() { - if (doNotAssociateActionBuilder_ == null) { - if (actionCase_ == 7) { + public Builder clearIgnoreAction() { + if (ignoreActionBuilder_ == null) { + if (actionCase_ == 9) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 7) { + if (actionCase_ == 9) { actionCase_ = 0; action_ = null; } - doNotAssociateActionBuilder_.clear(); + ignoreActionBuilder_.clear(); } return this; } @@ -10206,172 +13639,170 @@ public Builder clearDoNotAssociateAction() { * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; + * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; */ - public com.google.cloud.retail.v2.Rule.DoNotAssociateAction.Builder - getDoNotAssociateActionBuilder() { - return getDoNotAssociateActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2.Rule.IgnoreAction.Builder getIgnoreActionBuilder() { + return getIgnoreActionFieldBuilder().getBuilder(); } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; + * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.DoNotAssociateActionOrBuilder - getDoNotAssociateActionOrBuilder() { - if ((actionCase_ == 7) && (doNotAssociateActionBuilder_ != null)) { - return doNotAssociateActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2.Rule.IgnoreActionOrBuilder getIgnoreActionOrBuilder() { + if ((actionCase_ == 9) && (ignoreActionBuilder_ != null)) { + return ignoreActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 7) { - return (com.google.cloud.retail.v2.Rule.DoNotAssociateAction) action_; + if (actionCase_ == 9) { + return (com.google.cloud.retail.v2.Rule.IgnoreAction) action_; } - return com.google.cloud.retail.v2.Rule.DoNotAssociateAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.IgnoreAction.getDefaultInstance(); } } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7; + * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.DoNotAssociateAction, - com.google.cloud.retail.v2.Rule.DoNotAssociateAction.Builder, - com.google.cloud.retail.v2.Rule.DoNotAssociateActionOrBuilder> - getDoNotAssociateActionFieldBuilder() { - if (doNotAssociateActionBuilder_ == null) { - if (!(actionCase_ == 7)) { - action_ = com.google.cloud.retail.v2.Rule.DoNotAssociateAction.getDefaultInstance(); + com.google.cloud.retail.v2.Rule.IgnoreAction, + com.google.cloud.retail.v2.Rule.IgnoreAction.Builder, + com.google.cloud.retail.v2.Rule.IgnoreActionOrBuilder> + getIgnoreActionFieldBuilder() { + if (ignoreActionBuilder_ == null) { + if (!(actionCase_ == 9)) { + action_ = com.google.cloud.retail.v2.Rule.IgnoreAction.getDefaultInstance(); } - doNotAssociateActionBuilder_ = + ignoreActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.DoNotAssociateAction, - com.google.cloud.retail.v2.Rule.DoNotAssociateAction.Builder, - com.google.cloud.retail.v2.Rule.DoNotAssociateActionOrBuilder>( - (com.google.cloud.retail.v2.Rule.DoNotAssociateAction) action_, + com.google.cloud.retail.v2.Rule.IgnoreAction, + com.google.cloud.retail.v2.Rule.IgnoreAction.Builder, + com.google.cloud.retail.v2.Rule.IgnoreActionOrBuilder>( + (com.google.cloud.retail.v2.Rule.IgnoreAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 7; + actionCase_ = 9; onChanged(); - return doNotAssociateActionBuilder_; + return ignoreActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.ReplacementAction, - com.google.cloud.retail.v2.Rule.ReplacementAction.Builder, - com.google.cloud.retail.v2.Rule.ReplacementActionOrBuilder> - replacementActionBuilder_; + com.google.cloud.retail.v2.Rule.FilterAction, + com.google.cloud.retail.v2.Rule.FilterAction.Builder, + com.google.cloud.retail.v2.Rule.FilterActionOrBuilder> + filterActionBuilder_; /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; * - * @return Whether the replacementAction field is set. + * @return Whether the filterAction field is set. */ @java.lang.Override - public boolean hasReplacementAction() { - return actionCase_ == 8; + public boolean hasFilterAction() { + return actionCase_ == 10; } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; * - * @return The replacementAction. + * @return The filterAction. */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.ReplacementAction getReplacementAction() { - if (replacementActionBuilder_ == null) { - if (actionCase_ == 8) { - return (com.google.cloud.retail.v2.Rule.ReplacementAction) action_; + public com.google.cloud.retail.v2.Rule.FilterAction getFilterAction() { + if (filterActionBuilder_ == null) { + if (actionCase_ == 10) { + return (com.google.cloud.retail.v2.Rule.FilterAction) action_; } - return com.google.cloud.retail.v2.Rule.ReplacementAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.FilterAction.getDefaultInstance(); } else { - if (actionCase_ == 8) { - return replacementActionBuilder_.getMessage(); + if (actionCase_ == 10) { + return filterActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2.Rule.ReplacementAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.FilterAction.getDefaultInstance(); } } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; */ - public Builder setReplacementAction(com.google.cloud.retail.v2.Rule.ReplacementAction value) { - if (replacementActionBuilder_ == null) { + public Builder setFilterAction(com.google.cloud.retail.v2.Rule.FilterAction value) { + if (filterActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - replacementActionBuilder_.setMessage(value); + filterActionBuilder_.setMessage(value); } - actionCase_ = 8; + actionCase_ = 10; return this; } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; */ - public Builder setReplacementAction( - com.google.cloud.retail.v2.Rule.ReplacementAction.Builder builderForValue) { - if (replacementActionBuilder_ == null) { + public Builder setFilterAction( + com.google.cloud.retail.v2.Rule.FilterAction.Builder builderForValue) { + if (filterActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - replacementActionBuilder_.setMessage(builderForValue.build()); + filterActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 8; + actionCase_ = 10; return this; } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; */ - public Builder mergeReplacementAction(com.google.cloud.retail.v2.Rule.ReplacementAction value) { - if (replacementActionBuilder_ == null) { - if (actionCase_ == 8 - && action_ != com.google.cloud.retail.v2.Rule.ReplacementAction.getDefaultInstance()) { + public Builder mergeFilterAction(com.google.cloud.retail.v2.Rule.FilterAction value) { + if (filterActionBuilder_ == null) { + if (actionCase_ == 10 + && action_ != com.google.cloud.retail.v2.Rule.FilterAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2.Rule.ReplacementAction.newBuilder( - (com.google.cloud.retail.v2.Rule.ReplacementAction) action_) + com.google.cloud.retail.v2.Rule.FilterAction.newBuilder( + (com.google.cloud.retail.v2.Rule.FilterAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -10379,37 +13810,37 @@ public Builder mergeReplacementAction(com.google.cloud.retail.v2.Rule.Replacemen } onChanged(); } else { - if (actionCase_ == 8) { - replacementActionBuilder_.mergeFrom(value); + if (actionCase_ == 10) { + filterActionBuilder_.mergeFrom(value); } else { - replacementActionBuilder_.setMessage(value); + filterActionBuilder_.setMessage(value); } } - actionCase_ = 8; + actionCase_ = 10; return this; } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; */ - public Builder clearReplacementAction() { - if (replacementActionBuilder_ == null) { - if (actionCase_ == 8) { + public Builder clearFilterAction() { + if (filterActionBuilder_ == null) { + if (actionCase_ == 10) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 8) { + if (actionCase_ == 10) { actionCase_ = 0; action_ = null; } - replacementActionBuilder_.clear(); + filterActionBuilder_.clear(); } return this; } @@ -10417,209 +13848,211 @@ public Builder clearReplacementAction() { * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; */ - public com.google.cloud.retail.v2.Rule.ReplacementAction.Builder getReplacementActionBuilder() { - return getReplacementActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2.Rule.FilterAction.Builder getFilterActionBuilder() { + return getFilterActionFieldBuilder().getBuilder(); } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.ReplacementActionOrBuilder - getReplacementActionOrBuilder() { - if ((actionCase_ == 8) && (replacementActionBuilder_ != null)) { - return replacementActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2.Rule.FilterActionOrBuilder getFilterActionOrBuilder() { + if ((actionCase_ == 10) && (filterActionBuilder_ != null)) { + return filterActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 8) { - return (com.google.cloud.retail.v2.Rule.ReplacementAction) action_; + if (actionCase_ == 10) { + return (com.google.cloud.retail.v2.Rule.FilterAction) action_; } - return com.google.cloud.retail.v2.Rule.ReplacementAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.FilterAction.getDefaultInstance(); } } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.ReplacementAction, - com.google.cloud.retail.v2.Rule.ReplacementAction.Builder, - com.google.cloud.retail.v2.Rule.ReplacementActionOrBuilder> - getReplacementActionFieldBuilder() { - if (replacementActionBuilder_ == null) { - if (!(actionCase_ == 8)) { - action_ = com.google.cloud.retail.v2.Rule.ReplacementAction.getDefaultInstance(); + com.google.cloud.retail.v2.Rule.FilterAction, + com.google.cloud.retail.v2.Rule.FilterAction.Builder, + com.google.cloud.retail.v2.Rule.FilterActionOrBuilder> + getFilterActionFieldBuilder() { + if (filterActionBuilder_ == null) { + if (!(actionCase_ == 10)) { + action_ = com.google.cloud.retail.v2.Rule.FilterAction.getDefaultInstance(); } - replacementActionBuilder_ = + filterActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.ReplacementAction, - com.google.cloud.retail.v2.Rule.ReplacementAction.Builder, - com.google.cloud.retail.v2.Rule.ReplacementActionOrBuilder>( - (com.google.cloud.retail.v2.Rule.ReplacementAction) action_, + com.google.cloud.retail.v2.Rule.FilterAction, + com.google.cloud.retail.v2.Rule.FilterAction.Builder, + com.google.cloud.retail.v2.Rule.FilterActionOrBuilder>( + (com.google.cloud.retail.v2.Rule.FilterAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 8; + actionCase_ = 10; onChanged(); - return replacementActionBuilder_; + return filterActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.IgnoreAction, - com.google.cloud.retail.v2.Rule.IgnoreAction.Builder, - com.google.cloud.retail.v2.Rule.IgnoreActionOrBuilder> - ignoreActionBuilder_; + com.google.cloud.retail.v2.Rule.TwowaySynonymsAction, + com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.Builder, + com.google.cloud.retail.v2.Rule.TwowaySynonymsActionOrBuilder> + twowaySynonymsActionBuilder_; /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; * - * @return Whether the ignoreAction field is set. + * @return Whether the twowaySynonymsAction field is set. */ @java.lang.Override - public boolean hasIgnoreAction() { - return actionCase_ == 9; + public boolean hasTwowaySynonymsAction() { + return actionCase_ == 11; } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; * - * @return The ignoreAction. + * @return The twowaySynonymsAction. */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.IgnoreAction getIgnoreAction() { - if (ignoreActionBuilder_ == null) { - if (actionCase_ == 9) { - return (com.google.cloud.retail.v2.Rule.IgnoreAction) action_; + public com.google.cloud.retail.v2.Rule.TwowaySynonymsAction getTwowaySynonymsAction() { + if (twowaySynonymsActionBuilder_ == null) { + if (actionCase_ == 11) { + return (com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) action_; } - return com.google.cloud.retail.v2.Rule.IgnoreAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.getDefaultInstance(); } else { - if (actionCase_ == 9) { - return ignoreActionBuilder_.getMessage(); + if (actionCase_ == 11) { + return twowaySynonymsActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2.Rule.IgnoreAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.getDefaultInstance(); } } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; */ - public Builder setIgnoreAction(com.google.cloud.retail.v2.Rule.IgnoreAction value) { - if (ignoreActionBuilder_ == null) { + public Builder setTwowaySynonymsAction( + com.google.cloud.retail.v2.Rule.TwowaySynonymsAction value) { + if (twowaySynonymsActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - ignoreActionBuilder_.setMessage(value); + twowaySynonymsActionBuilder_.setMessage(value); } - actionCase_ = 9; + actionCase_ = 11; return this; } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; */ - public Builder setIgnoreAction( - com.google.cloud.retail.v2.Rule.IgnoreAction.Builder builderForValue) { - if (ignoreActionBuilder_ == null) { + public Builder setTwowaySynonymsAction( + com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.Builder builderForValue) { + if (twowaySynonymsActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - ignoreActionBuilder_.setMessage(builderForValue.build()); + twowaySynonymsActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 9; + actionCase_ = 11; return this; } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; */ - public Builder mergeIgnoreAction(com.google.cloud.retail.v2.Rule.IgnoreAction value) { - if (ignoreActionBuilder_ == null) { - if (actionCase_ == 9 - && action_ != com.google.cloud.retail.v2.Rule.IgnoreAction.getDefaultInstance()) { + public Builder mergeTwowaySynonymsAction( + com.google.cloud.retail.v2.Rule.TwowaySynonymsAction value) { + if (twowaySynonymsActionBuilder_ == null) { + if (actionCase_ == 11 + && action_ + != com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2.Rule.IgnoreAction.newBuilder( - (com.google.cloud.retail.v2.Rule.IgnoreAction) action_) + com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.newBuilder( + (com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) action_) .mergeFrom(value) .buildPartial(); } else { action_ = value; } onChanged(); - } else { - if (actionCase_ == 9) { - ignoreActionBuilder_.mergeFrom(value); + } else { + if (actionCase_ == 11) { + twowaySynonymsActionBuilder_.mergeFrom(value); } else { - ignoreActionBuilder_.setMessage(value); + twowaySynonymsActionBuilder_.setMessage(value); } } - actionCase_ = 9; + actionCase_ = 11; return this; } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; */ - public Builder clearIgnoreAction() { - if (ignoreActionBuilder_ == null) { - if (actionCase_ == 9) { + public Builder clearTwowaySynonymsAction() { + if (twowaySynonymsActionBuilder_ == null) { + if (actionCase_ == 11) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 9) { + if (actionCase_ == 11) { actionCase_ = 0; action_ = null; } - ignoreActionBuilder_.clear(); + twowaySynonymsActionBuilder_.clear(); } return this; } @@ -10627,170 +14060,180 @@ public Builder clearIgnoreAction() { * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; */ - public com.google.cloud.retail.v2.Rule.IgnoreAction.Builder getIgnoreActionBuilder() { - return getIgnoreActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.Builder + getTwowaySynonymsActionBuilder() { + return getTwowaySynonymsActionFieldBuilder().getBuilder(); } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.IgnoreActionOrBuilder getIgnoreActionOrBuilder() { - if ((actionCase_ == 9) && (ignoreActionBuilder_ != null)) { - return ignoreActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2.Rule.TwowaySynonymsActionOrBuilder + getTwowaySynonymsActionOrBuilder() { + if ((actionCase_ == 11) && (twowaySynonymsActionBuilder_ != null)) { + return twowaySynonymsActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 9) { - return (com.google.cloud.retail.v2.Rule.IgnoreAction) action_; + if (actionCase_ == 11) { + return (com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) action_; } - return com.google.cloud.retail.v2.Rule.IgnoreAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.getDefaultInstance(); } } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.IgnoreAction, - com.google.cloud.retail.v2.Rule.IgnoreAction.Builder, - com.google.cloud.retail.v2.Rule.IgnoreActionOrBuilder> - getIgnoreActionFieldBuilder() { - if (ignoreActionBuilder_ == null) { - if (!(actionCase_ == 9)) { - action_ = com.google.cloud.retail.v2.Rule.IgnoreAction.getDefaultInstance(); + com.google.cloud.retail.v2.Rule.TwowaySynonymsAction, + com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.Builder, + com.google.cloud.retail.v2.Rule.TwowaySynonymsActionOrBuilder> + getTwowaySynonymsActionFieldBuilder() { + if (twowaySynonymsActionBuilder_ == null) { + if (!(actionCase_ == 11)) { + action_ = com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.getDefaultInstance(); } - ignoreActionBuilder_ = + twowaySynonymsActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.IgnoreAction, - com.google.cloud.retail.v2.Rule.IgnoreAction.Builder, - com.google.cloud.retail.v2.Rule.IgnoreActionOrBuilder>( - (com.google.cloud.retail.v2.Rule.IgnoreAction) action_, + com.google.cloud.retail.v2.Rule.TwowaySynonymsAction, + com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.Builder, + com.google.cloud.retail.v2.Rule.TwowaySynonymsActionOrBuilder>( + (com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 9; + actionCase_ = 11; onChanged(); - return ignoreActionBuilder_; + return twowaySynonymsActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.FilterAction, - com.google.cloud.retail.v2.Rule.FilterAction.Builder, - com.google.cloud.retail.v2.Rule.FilterActionOrBuilder> - filterActionBuilder_; + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.Builder, + com.google.cloud.retail.v2.Rule.ForceReturnFacetActionOrBuilder> + forceReturnFacetActionBuilder_; /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * * - * @return Whether the filterAction field is set. + * @return Whether the forceReturnFacetAction field is set. */ @java.lang.Override - public boolean hasFilterAction() { - return actionCase_ == 10; + public boolean hasForceReturnFacetAction() { + return actionCase_ == 12; } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * * - * @return The filterAction. + * @return The forceReturnFacetAction. */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.FilterAction getFilterAction() { - if (filterActionBuilder_ == null) { - if (actionCase_ == 10) { - return (com.google.cloud.retail.v2.Rule.FilterAction) action_; + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction getForceReturnFacetAction() { + if (forceReturnFacetActionBuilder_ == null) { + if (actionCase_ == 12) { + return (com.google.cloud.retail.v2.Rule.ForceReturnFacetAction) action_; } - return com.google.cloud.retail.v2.Rule.FilterAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.getDefaultInstance(); } else { - if (actionCase_ == 10) { - return filterActionBuilder_.getMessage(); + if (actionCase_ == 12) { + return forceReturnFacetActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2.Rule.FilterAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.getDefaultInstance(); } } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ - public Builder setFilterAction(com.google.cloud.retail.v2.Rule.FilterAction value) { - if (filterActionBuilder_ == null) { + public Builder setForceReturnFacetAction( + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction value) { + if (forceReturnFacetActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - filterActionBuilder_.setMessage(value); + forceReturnFacetActionBuilder_.setMessage(value); } - actionCase_ = 10; + actionCase_ = 12; return this; } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ - public Builder setFilterAction( - com.google.cloud.retail.v2.Rule.FilterAction.Builder builderForValue) { - if (filterActionBuilder_ == null) { + public Builder setForceReturnFacetAction( + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.Builder builderForValue) { + if (forceReturnFacetActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - filterActionBuilder_.setMessage(builderForValue.build()); + forceReturnFacetActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 10; + actionCase_ = 12; return this; } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ - public Builder mergeFilterAction(com.google.cloud.retail.v2.Rule.FilterAction value) { - if (filterActionBuilder_ == null) { - if (actionCase_ == 10 - && action_ != com.google.cloud.retail.v2.Rule.FilterAction.getDefaultInstance()) { + public Builder mergeForceReturnFacetAction( + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction value) { + if (forceReturnFacetActionBuilder_ == null) { + if (actionCase_ == 12 + && action_ + != com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2.Rule.FilterAction.newBuilder( - (com.google.cloud.retail.v2.Rule.FilterAction) action_) + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.newBuilder( + (com.google.cloud.retail.v2.Rule.ForceReturnFacetAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -10798,37 +14241,38 @@ public Builder mergeFilterAction(com.google.cloud.retail.v2.Rule.FilterAction va } onChanged(); } else { - if (actionCase_ == 10) { - filterActionBuilder_.mergeFrom(value); + if (actionCase_ == 12) { + forceReturnFacetActionBuilder_.mergeFrom(value); } else { - filterActionBuilder_.setMessage(value); + forceReturnFacetActionBuilder_.setMessage(value); } } - actionCase_ = 10; + actionCase_ = 12; return this; } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ - public Builder clearFilterAction() { - if (filterActionBuilder_ == null) { - if (actionCase_ == 10) { + public Builder clearForceReturnFacetAction() { + if (forceReturnFacetActionBuilder_ == null) { + if (actionCase_ == 12) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 10) { + if (actionCase_ == 12) { actionCase_ = 0; action_ = null; } - filterActionBuilder_.clear(); + forceReturnFacetActionBuilder_.clear(); } return this; } @@ -10836,173 +14280,175 @@ public Builder clearFilterAction() { * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ - public com.google.cloud.retail.v2.Rule.FilterAction.Builder getFilterActionBuilder() { - return getFilterActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.Builder + getForceReturnFacetActionBuilder() { + return getForceReturnFacetActionFieldBuilder().getBuilder(); } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.FilterActionOrBuilder getFilterActionOrBuilder() { - if ((actionCase_ == 10) && (filterActionBuilder_ != null)) { - return filterActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2.Rule.ForceReturnFacetActionOrBuilder + getForceReturnFacetActionOrBuilder() { + if ((actionCase_ == 12) && (forceReturnFacetActionBuilder_ != null)) { + return forceReturnFacetActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 10) { - return (com.google.cloud.retail.v2.Rule.FilterAction) action_; + if (actionCase_ == 12) { + return (com.google.cloud.retail.v2.Rule.ForceReturnFacetAction) action_; } - return com.google.cloud.retail.v2.Rule.FilterAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.getDefaultInstance(); } } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.FilterAction, - com.google.cloud.retail.v2.Rule.FilterAction.Builder, - com.google.cloud.retail.v2.Rule.FilterActionOrBuilder> - getFilterActionFieldBuilder() { - if (filterActionBuilder_ == null) { - if (!(actionCase_ == 10)) { - action_ = com.google.cloud.retail.v2.Rule.FilterAction.getDefaultInstance(); - } - filterActionBuilder_ = + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.Builder, + com.google.cloud.retail.v2.Rule.ForceReturnFacetActionOrBuilder> + getForceReturnFacetActionFieldBuilder() { + if (forceReturnFacetActionBuilder_ == null) { + if (!(actionCase_ == 12)) { + action_ = com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.getDefaultInstance(); + } + forceReturnFacetActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.FilterAction, - com.google.cloud.retail.v2.Rule.FilterAction.Builder, - com.google.cloud.retail.v2.Rule.FilterActionOrBuilder>( - (com.google.cloud.retail.v2.Rule.FilterAction) action_, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction, + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.Builder, + com.google.cloud.retail.v2.Rule.ForceReturnFacetActionOrBuilder>( + (com.google.cloud.retail.v2.Rule.ForceReturnFacetAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 10; + actionCase_ = 12; onChanged(); - return filterActionBuilder_; + return forceReturnFacetActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.TwowaySynonymsAction, - com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.Builder, - com.google.cloud.retail.v2.Rule.TwowaySynonymsActionOrBuilder> - twowaySynonymsActionBuilder_; + com.google.cloud.retail.v2.Rule.RemoveFacetAction, + com.google.cloud.retail.v2.Rule.RemoveFacetAction.Builder, + com.google.cloud.retail.v2.Rule.RemoveFacetActionOrBuilder> + removeFacetActionBuilder_; /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * .google.cloud.retail.v2.Rule.RemoveFacetAction remove_facet_action = 13; * - * @return Whether the twowaySynonymsAction field is set. + * @return Whether the removeFacetAction field is set. */ @java.lang.Override - public boolean hasTwowaySynonymsAction() { - return actionCase_ == 11; + public boolean hasRemoveFacetAction() { + return actionCase_ == 13; } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * .google.cloud.retail.v2.Rule.RemoveFacetAction remove_facet_action = 13; * - * @return The twowaySynonymsAction. + * @return The removeFacetAction. */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.TwowaySynonymsAction getTwowaySynonymsAction() { - if (twowaySynonymsActionBuilder_ == null) { - if (actionCase_ == 11) { - return (com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) action_; + public com.google.cloud.retail.v2.Rule.RemoveFacetAction getRemoveFacetAction() { + if (removeFacetActionBuilder_ == null) { + if (actionCase_ == 13) { + return (com.google.cloud.retail.v2.Rule.RemoveFacetAction) action_; } - return com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.RemoveFacetAction.getDefaultInstance(); } else { - if (actionCase_ == 11) { - return twowaySynonymsActionBuilder_.getMessage(); + if (actionCase_ == 13) { + return removeFacetActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.RemoveFacetAction.getDefaultInstance(); } } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * .google.cloud.retail.v2.Rule.RemoveFacetAction remove_facet_action = 13; */ - public Builder setTwowaySynonymsAction( - com.google.cloud.retail.v2.Rule.TwowaySynonymsAction value) { - if (twowaySynonymsActionBuilder_ == null) { + public Builder setRemoveFacetAction(com.google.cloud.retail.v2.Rule.RemoveFacetAction value) { + if (removeFacetActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - twowaySynonymsActionBuilder_.setMessage(value); + removeFacetActionBuilder_.setMessage(value); } - actionCase_ = 11; + actionCase_ = 13; return this; } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * .google.cloud.retail.v2.Rule.RemoveFacetAction remove_facet_action = 13; */ - public Builder setTwowaySynonymsAction( - com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.Builder builderForValue) { - if (twowaySynonymsActionBuilder_ == null) { + public Builder setRemoveFacetAction( + com.google.cloud.retail.v2.Rule.RemoveFacetAction.Builder builderForValue) { + if (removeFacetActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - twowaySynonymsActionBuilder_.setMessage(builderForValue.build()); + removeFacetActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 11; + actionCase_ = 13; return this; } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * .google.cloud.retail.v2.Rule.RemoveFacetAction remove_facet_action = 13; */ - public Builder mergeTwowaySynonymsAction( - com.google.cloud.retail.v2.Rule.TwowaySynonymsAction value) { - if (twowaySynonymsActionBuilder_ == null) { - if (actionCase_ == 11 - && action_ - != com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.getDefaultInstance()) { + public Builder mergeRemoveFacetAction(com.google.cloud.retail.v2.Rule.RemoveFacetAction value) { + if (removeFacetActionBuilder_ == null) { + if (actionCase_ == 13 + && action_ != com.google.cloud.retail.v2.Rule.RemoveFacetAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.newBuilder( - (com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) action_) + com.google.cloud.retail.v2.Rule.RemoveFacetAction.newBuilder( + (com.google.cloud.retail.v2.Rule.RemoveFacetAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -11010,37 +14456,37 @@ public Builder mergeTwowaySynonymsAction( } onChanged(); } else { - if (actionCase_ == 11) { - twowaySynonymsActionBuilder_.mergeFrom(value); + if (actionCase_ == 13) { + removeFacetActionBuilder_.mergeFrom(value); } else { - twowaySynonymsActionBuilder_.setMessage(value); + removeFacetActionBuilder_.setMessage(value); } } - actionCase_ = 11; + actionCase_ = 13; return this; } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * .google.cloud.retail.v2.Rule.RemoveFacetAction remove_facet_action = 13; */ - public Builder clearTwowaySynonymsAction() { - if (twowaySynonymsActionBuilder_ == null) { - if (actionCase_ == 11) { + public Builder clearRemoveFacetAction() { + if (removeFacetActionBuilder_ == null) { + if (actionCase_ == 13) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 11) { + if (actionCase_ == 13) { actionCase_ = 0; action_ = null; } - twowaySynonymsActionBuilder_.clear(); + removeFacetActionBuilder_.clear(); } return this; } @@ -11048,67 +14494,66 @@ public Builder clearTwowaySynonymsAction() { * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * .google.cloud.retail.v2.Rule.RemoveFacetAction remove_facet_action = 13; */ - public com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.Builder - getTwowaySynonymsActionBuilder() { - return getTwowaySynonymsActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2.Rule.RemoveFacetAction.Builder getRemoveFacetActionBuilder() { + return getRemoveFacetActionFieldBuilder().getBuilder(); } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * .google.cloud.retail.v2.Rule.RemoveFacetAction remove_facet_action = 13; */ @java.lang.Override - public com.google.cloud.retail.v2.Rule.TwowaySynonymsActionOrBuilder - getTwowaySynonymsActionOrBuilder() { - if ((actionCase_ == 11) && (twowaySynonymsActionBuilder_ != null)) { - return twowaySynonymsActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2.Rule.RemoveFacetActionOrBuilder + getRemoveFacetActionOrBuilder() { + if ((actionCase_ == 13) && (removeFacetActionBuilder_ != null)) { + return removeFacetActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 11) { - return (com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) action_; + if (actionCase_ == 13) { + return (com.google.cloud.retail.v2.Rule.RemoveFacetAction) action_; } - return com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2.Rule.RemoveFacetAction.getDefaultInstance(); } } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * .google.cloud.retail.v2.Rule.RemoveFacetAction remove_facet_action = 13; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.TwowaySynonymsAction, - com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.Builder, - com.google.cloud.retail.v2.Rule.TwowaySynonymsActionOrBuilder> - getTwowaySynonymsActionFieldBuilder() { - if (twowaySynonymsActionBuilder_ == null) { - if (!(actionCase_ == 11)) { - action_ = com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.getDefaultInstance(); - } - twowaySynonymsActionBuilder_ = + com.google.cloud.retail.v2.Rule.RemoveFacetAction, + com.google.cloud.retail.v2.Rule.RemoveFacetAction.Builder, + com.google.cloud.retail.v2.Rule.RemoveFacetActionOrBuilder> + getRemoveFacetActionFieldBuilder() { + if (removeFacetActionBuilder_ == null) { + if (!(actionCase_ == 13)) { + action_ = com.google.cloud.retail.v2.Rule.RemoveFacetAction.getDefaultInstance(); + } + removeFacetActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2.Rule.TwowaySynonymsAction, - com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.Builder, - com.google.cloud.retail.v2.Rule.TwowaySynonymsActionOrBuilder>( - (com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) action_, + com.google.cloud.retail.v2.Rule.RemoveFacetAction, + com.google.cloud.retail.v2.Rule.RemoveFacetAction.Builder, + com.google.cloud.retail.v2.Rule.RemoveFacetActionOrBuilder>( + (com.google.cloud.retail.v2.Rule.RemoveFacetAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 11; + actionCase_ = 13; onChanged(); - return twowaySynonymsActionBuilder_; + return removeFacetActionBuilder_; } private com.google.cloud.retail.v2.Condition condition_; @@ -11132,7 +14577,7 @@ public Builder clearTwowaySynonymsAction() { * @return Whether the condition field is set. */ public boolean hasCondition() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * @@ -11178,7 +14623,7 @@ public Builder setCondition(com.google.cloud.retail.v2.Condition value) { } else { conditionBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -11200,7 +14645,7 @@ public Builder setCondition(com.google.cloud.retail.v2.Condition.Builder builder } else { conditionBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -11218,7 +14663,7 @@ public Builder setCondition(com.google.cloud.retail.v2.Condition.Builder builder */ public Builder mergeCondition(com.google.cloud.retail.v2.Condition value) { if (conditionBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000400) != 0) && condition_ != null && condition_ != com.google.cloud.retail.v2.Condition.getDefaultInstance()) { getConditionBuilder().mergeFrom(value); @@ -11229,7 +14674,7 @@ public Builder mergeCondition(com.google.cloud.retail.v2.Condition value) { conditionBuilder_.mergeFrom(value); } if (condition_ != null) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); } return this; @@ -11247,7 +14692,7 @@ public Builder mergeCondition(com.google.cloud.retail.v2.Condition value) { * */ public Builder clearCondition() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000400); condition_ = null; if (conditionBuilder_ != null) { conditionBuilder_.dispose(); @@ -11269,7 +14714,7 @@ public Builder clearCondition() { * */ public com.google.cloud.retail.v2.Condition.Builder getConditionBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); return getConditionFieldBuilder().getBuilder(); } diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RuleOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RuleOrBuilder.java index e822632c1859..8355e77d2d09 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RuleOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RuleOrBuilder.java @@ -307,6 +307,80 @@ public interface RuleOrBuilder */ com.google.cloud.retail.v2.Rule.TwowaySynonymsActionOrBuilder getTwowaySynonymsActionOrBuilder(); + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + * + * @return Whether the forceReturnFacetAction field is set. + */ + boolean hasForceReturnFacetAction(); + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + * + * @return The forceReturnFacetAction. + */ + com.google.cloud.retail.v2.Rule.ForceReturnFacetAction getForceReturnFacetAction(); + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + */ + com.google.cloud.retail.v2.Rule.ForceReturnFacetActionOrBuilder + getForceReturnFacetActionOrBuilder(); + + /** + * + * + *
+   * Remove an attribute as a facet in the request (if present).
+   * 
+ * + * .google.cloud.retail.v2.Rule.RemoveFacetAction remove_facet_action = 13; + * + * @return Whether the removeFacetAction field is set. + */ + boolean hasRemoveFacetAction(); + /** + * + * + *
+   * Remove an attribute as a facet in the request (if present).
+   * 
+ * + * .google.cloud.retail.v2.Rule.RemoveFacetAction remove_facet_action = 13; + * + * @return The removeFacetAction. + */ + com.google.cloud.retail.v2.Rule.RemoveFacetAction getRemoveFacetAction(); + /** + * + * + *
+   * Remove an attribute as a facet in the request (if present).
+   * 
+ * + * .google.cloud.retail.v2.Rule.RemoveFacetAction remove_facet_action = 13; + */ + com.google.cloud.retail.v2.Rule.RemoveFacetActionOrBuilder getRemoveFacetActionOrBuilder(); + /** * * diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequest.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequest.java index bbf6bae6f1f6..30ac56fc3eff 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequest.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequest.java @@ -525,15 +525,15 @@ public interface FacetSpecOrBuilder *
      * Enables dynamic position for this facet. If set to true, the position of
      * this facet among all facets in the response is determined by Google
-     * Retail Search. It will be ordered together with dynamic facets if dynamic
+     * Retail Search. It is ordered together with dynamic facets if dynamic
      * facets is enabled. If set to false, the position of this facet in the
-     * response will be the same as in the request, and it will be ranked before
+     * response is the same as in the request, and it is ranked before
      * the facets with dynamic position enable and all dynamic facets.
      *
      * For example, you may always want to have rating facet returned in
      * the response, but it's not necessarily to always display the rating facet
      * at the top. In that case, you can set enable_dynamic_position to true so
-     * that the position of rating facet in response will be determined by
+     * that the position of rating facet in response is determined by
      * Google Retail Search.
      *
      * Another example, assuming you have the following facets in the request:
@@ -544,13 +544,13 @@ public interface FacetSpecOrBuilder
      *
      * * "brands", enable_dynamic_position = false
      *
-     * And also you have a dynamic facets enable, which will generate a facet
-     * 'gender'. Then the final order of the facets in the response can be
+     * And also you have a dynamic facets enable, which generates a facet
+     * "gender". Then, the final order of the facets in the response can be
      * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
      * "rating") depends on how Google Retail Search orders "gender" and
-     * "rating" facets. However, notice that "price" and "brands" will always be
-     * ranked at 1st and 2nd position since their enable_dynamic_position are
-     * false.
+     * "rating" facets. However, notice that "price" and "brands" are always
+     * ranked at first and second position because their enable_dynamic_position
+     * values are false.
      * 
* * bool enable_dynamic_position = 4; @@ -722,13 +722,13 @@ public interface FacetKeyOrBuilder * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -743,13 +743,13 @@ public interface FacetKeyOrBuilder * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -764,13 +764,13 @@ public interface FacetKeyOrBuilder * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -785,13 +785,13 @@ public interface FacetKeyOrBuilder * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -807,13 +807,13 @@ public interface FacetKeyOrBuilder * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -974,7 +974,7 @@ public interface FacetKeyOrBuilder * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -990,7 +990,7 @@ public interface FacetKeyOrBuilder * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1006,7 +1006,7 @@ public interface FacetKeyOrBuilder * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1023,7 +1023,7 @@ public interface FacetKeyOrBuilder * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1041,7 +1041,7 @@ public interface FacetKeyOrBuilder * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. *
* @@ -1057,7 +1057,7 @@ public interface FacetKeyOrBuilder * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. *
* @@ -1073,7 +1073,7 @@ public interface FacetKeyOrBuilder * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. *
* @@ -1090,7 +1090,7 @@ public interface FacetKeyOrBuilder * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. *
* @@ -1187,7 +1187,7 @@ public interface FacetKeyOrBuilder * *
        * The query that is used to compute facet for the given facet key.
-       * When provided, it will override the default behavior of facet
+       * When provided, it overrides the default behavior of facet
        * computation. The query syntax is the same as a filter expression. See
        * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for
        * detail syntax and limitations. Notice that there is no limitation on
@@ -1196,9 +1196,9 @@ public interface FacetKeyOrBuilder
        *
        * In the response,
        * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
-       * will be always "1" and
+       * is always "1" and
        * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
-       * will be the number of results that match the query.
+       * is the number of results that match the query.
        *
        * For example, you can set a customized facet for "shipToStore",
        * where
@@ -1206,7 +1206,7 @@ public interface FacetKeyOrBuilder
        * is "customizedShipToStore", and
        * [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query]
        * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-       * Then the facet will count the products that are both in stock and ship
+       * Then the facet counts the products that are both in stock and ship
        * to store "123".
        * 
* @@ -1220,7 +1220,7 @@ public interface FacetKeyOrBuilder * *
        * The query that is used to compute facet for the given facet key.
-       * When provided, it will override the default behavior of facet
+       * When provided, it overrides the default behavior of facet
        * computation. The query syntax is the same as a filter expression. See
        * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for
        * detail syntax and limitations. Notice that there is no limitation on
@@ -1229,9 +1229,9 @@ public interface FacetKeyOrBuilder
        *
        * In the response,
        * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
-       * will be always "1" and
+       * is always "1" and
        * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
-       * will be the number of results that match the query.
+       * is the number of results that match the query.
        *
        * For example, you can set a customized facet for "shipToStore",
        * where
@@ -1239,7 +1239,7 @@ public interface FacetKeyOrBuilder
        * is "customizedShipToStore", and
        * [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query]
        * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-       * Then the facet will count the products that are both in stock and ship
+       * Then the facet counts the products that are both in stock and ship
        * to store "123".
        * 
* @@ -1457,13 +1457,13 @@ public com.google.protobuf.ByteString getKeyBytes() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -1481,13 +1481,13 @@ public java.util.List getIntervalsList() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -1506,13 +1506,13 @@ public java.util.List getIntervalsList() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -1530,13 +1530,13 @@ public int getIntervalsCount() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -1554,13 +1554,13 @@ public com.google.cloud.retail.v2.Interval getIntervals(int index) { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -1742,7 +1742,7 @@ public com.google.protobuf.ByteString getRestrictedValuesBytes(int index) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1760,7 +1760,7 @@ public com.google.protobuf.ProtocolStringList getPrefixesList() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1778,7 +1778,7 @@ public int getPrefixesCount() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1797,7 +1797,7 @@ public java.lang.String getPrefixes(int index) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1822,7 +1822,7 @@ public com.google.protobuf.ByteString getPrefixesBytes(int index) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -1840,7 +1840,7 @@ public com.google.protobuf.ProtocolStringList getContainsList() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -1858,7 +1858,7 @@ public int getContainsCount() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -1877,7 +1877,7 @@ public java.lang.String getContains(int index) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -2011,7 +2011,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { * *
        * The query that is used to compute facet for the given facet key.
-       * When provided, it will override the default behavior of facet
+       * When provided, it overrides the default behavior of facet
        * computation. The query syntax is the same as a filter expression. See
        * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for
        * detail syntax and limitations. Notice that there is no limitation on
@@ -2020,9 +2020,9 @@ public com.google.protobuf.ByteString getOrderByBytes() {
        *
        * In the response,
        * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
-       * will be always "1" and
+       * is always "1" and
        * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
-       * will be the number of results that match the query.
+       * is the number of results that match the query.
        *
        * For example, you can set a customized facet for "shipToStore",
        * where
@@ -2030,7 +2030,7 @@ public com.google.protobuf.ByteString getOrderByBytes() {
        * is "customizedShipToStore", and
        * [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query]
        * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-       * Then the facet will count the products that are both in stock and ship
+       * Then the facet counts the products that are both in stock and ship
        * to store "123".
        * 
* @@ -2055,7 +2055,7 @@ public java.lang.String getQuery() { * *
        * The query that is used to compute facet for the given facet key.
-       * When provided, it will override the default behavior of facet
+       * When provided, it overrides the default behavior of facet
        * computation. The query syntax is the same as a filter expression. See
        * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for
        * detail syntax and limitations. Notice that there is no limitation on
@@ -2064,9 +2064,9 @@ public java.lang.String getQuery() {
        *
        * In the response,
        * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
-       * will be always "1" and
+       * is always "1" and
        * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
-       * will be the number of results that match the query.
+       * is the number of results that match the query.
        *
        * For example, you can set a customized facet for "shipToStore",
        * where
@@ -2074,7 +2074,7 @@ public java.lang.String getQuery() {
        * is "customizedShipToStore", and
        * [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query]
        * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-       * Then the facet will count the products that are both in stock and ship
+       * Then the facet counts the products that are both in stock and ship
        * to store "123".
        * 
* @@ -3075,13 +3075,13 @@ private void ensureIntervalsIsMutable() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3102,13 +3102,13 @@ public java.util.List getIntervalsList() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3129,13 +3129,13 @@ public int getIntervalsCount() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3156,13 +3156,13 @@ public com.google.cloud.retail.v2.Interval getIntervals(int index) { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3189,13 +3189,13 @@ public Builder setIntervals(int index, com.google.cloud.retail.v2.Interval value * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3220,13 +3220,13 @@ public Builder setIntervals( * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3253,13 +3253,13 @@ public Builder addIntervals(com.google.cloud.retail.v2.Interval value) { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3286,13 +3286,13 @@ public Builder addIntervals(int index, com.google.cloud.retail.v2.Interval value * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3316,13 +3316,13 @@ public Builder addIntervals(com.google.cloud.retail.v2.Interval.Builder builderF * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3347,13 +3347,13 @@ public Builder addIntervals( * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3378,13 +3378,13 @@ public Builder addAllIntervals( * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3408,13 +3408,13 @@ public Builder clearIntervals() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3438,13 +3438,13 @@ public Builder removeIntervals(int index) { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3461,13 +3461,13 @@ public com.google.cloud.retail.v2.Interval.Builder getIntervalsBuilder(int index * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3488,13 +3488,13 @@ public com.google.cloud.retail.v2.IntervalOrBuilder getIntervalsOrBuilder(int in * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3516,13 +3516,13 @@ public com.google.cloud.retail.v2.IntervalOrBuilder getIntervalsOrBuilder(int in * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3540,13 +3540,13 @@ public com.google.cloud.retail.v2.Interval.Builder addIntervalsBuilder() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -3564,13 +3564,13 @@ public com.google.cloud.retail.v2.Interval.Builder addIntervalsBuilder(int index * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2.Interval intervals = 2; @@ -4006,7 +4006,7 @@ private void ensurePrefixesIsMutable() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4025,7 +4025,7 @@ public com.google.protobuf.ProtocolStringList getPrefixesList() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4043,7 +4043,7 @@ public int getPrefixesCount() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4062,7 +4062,7 @@ public java.lang.String getPrefixes(int index) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4081,7 +4081,7 @@ public com.google.protobuf.ByteString getPrefixesBytes(int index) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4108,7 +4108,7 @@ public Builder setPrefixes(int index, java.lang.String value) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4134,7 +4134,7 @@ public Builder addPrefixes(java.lang.String value) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4157,7 +4157,7 @@ public Builder addAllPrefixes(java.lang.Iterable values) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4179,7 +4179,7 @@ public Builder clearPrefixes() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4216,7 +4216,7 @@ private void ensureContainsIsMutable() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4235,7 +4235,7 @@ public com.google.protobuf.ProtocolStringList getContainsList() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4253,7 +4253,7 @@ public int getContainsCount() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4272,7 +4272,7 @@ public java.lang.String getContains(int index) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4291,7 +4291,7 @@ public com.google.protobuf.ByteString getContainsBytes(int index) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4318,7 +4318,7 @@ public Builder setContains(int index, java.lang.String value) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4344,7 +4344,7 @@ public Builder addContains(java.lang.String value) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4367,7 +4367,7 @@ public Builder addAllContains(java.lang.Iterable values) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4389,7 +4389,7 @@ public Builder clearContains() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4683,7 +4683,7 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) { * *
          * The query that is used to compute facet for the given facet key.
-         * When provided, it will override the default behavior of facet
+         * When provided, it overrides the default behavior of facet
          * computation. The query syntax is the same as a filter expression. See
          * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for
          * detail syntax and limitations. Notice that there is no limitation on
@@ -4692,9 +4692,9 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) {
          *
          * In the response,
          * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
-         * will be always "1" and
+         * is always "1" and
          * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
-         * will be the number of results that match the query.
+         * is the number of results that match the query.
          *
          * For example, you can set a customized facet for "shipToStore",
          * where
@@ -4702,7 +4702,7 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) {
          * is "customizedShipToStore", and
          * [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query]
          * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-         * Then the facet will count the products that are both in stock and ship
+         * Then the facet counts the products that are both in stock and ship
          * to store "123".
          * 
* @@ -4726,7 +4726,7 @@ public java.lang.String getQuery() { * *
          * The query that is used to compute facet for the given facet key.
-         * When provided, it will override the default behavior of facet
+         * When provided, it overrides the default behavior of facet
          * computation. The query syntax is the same as a filter expression. See
          * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for
          * detail syntax and limitations. Notice that there is no limitation on
@@ -4735,9 +4735,9 @@ public java.lang.String getQuery() {
          *
          * In the response,
          * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
-         * will be always "1" and
+         * is always "1" and
          * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
-         * will be the number of results that match the query.
+         * is the number of results that match the query.
          *
          * For example, you can set a customized facet for "shipToStore",
          * where
@@ -4745,7 +4745,7 @@ public java.lang.String getQuery() {
          * is "customizedShipToStore", and
          * [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query]
          * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-         * Then the facet will count the products that are both in stock and ship
+         * Then the facet counts the products that are both in stock and ship
          * to store "123".
          * 
* @@ -4769,7 +4769,7 @@ public com.google.protobuf.ByteString getQueryBytes() { * *
          * The query that is used to compute facet for the given facet key.
-         * When provided, it will override the default behavior of facet
+         * When provided, it overrides the default behavior of facet
          * computation. The query syntax is the same as a filter expression. See
          * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for
          * detail syntax and limitations. Notice that there is no limitation on
@@ -4778,9 +4778,9 @@ public com.google.protobuf.ByteString getQueryBytes() {
          *
          * In the response,
          * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
-         * will be always "1" and
+         * is always "1" and
          * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
-         * will be the number of results that match the query.
+         * is the number of results that match the query.
          *
          * For example, you can set a customized facet for "shipToStore",
          * where
@@ -4788,7 +4788,7 @@ public com.google.protobuf.ByteString getQueryBytes() {
          * is "customizedShipToStore", and
          * [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query]
          * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-         * Then the facet will count the products that are both in stock and ship
+         * Then the facet counts the products that are both in stock and ship
          * to store "123".
          * 
* @@ -4811,7 +4811,7 @@ public Builder setQuery(java.lang.String value) { * *
          * The query that is used to compute facet for the given facet key.
-         * When provided, it will override the default behavior of facet
+         * When provided, it overrides the default behavior of facet
          * computation. The query syntax is the same as a filter expression. See
          * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for
          * detail syntax and limitations. Notice that there is no limitation on
@@ -4820,9 +4820,9 @@ public Builder setQuery(java.lang.String value) {
          *
          * In the response,
          * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
-         * will be always "1" and
+         * is always "1" and
          * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
-         * will be the number of results that match the query.
+         * is the number of results that match the query.
          *
          * For example, you can set a customized facet for "shipToStore",
          * where
@@ -4830,7 +4830,7 @@ public Builder setQuery(java.lang.String value) {
          * is "customizedShipToStore", and
          * [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query]
          * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-         * Then the facet will count the products that are both in stock and ship
+         * Then the facet counts the products that are both in stock and ship
          * to store "123".
          * 
* @@ -4849,7 +4849,7 @@ public Builder clearQuery() { * *
          * The query that is used to compute facet for the given facet key.
-         * When provided, it will override the default behavior of facet
+         * When provided, it overrides the default behavior of facet
          * computation. The query syntax is the same as a filter expression. See
          * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for
          * detail syntax and limitations. Notice that there is no limitation on
@@ -4858,9 +4858,9 @@ public Builder clearQuery() {
          *
          * In the response,
          * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
-         * will be always "1" and
+         * is always "1" and
          * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
-         * will be the number of results that match the query.
+         * is the number of results that match the query.
          *
          * For example, you can set a customized facet for "shipToStore",
          * where
@@ -4868,7 +4868,7 @@ public Builder clearQuery() {
          * is "customizedShipToStore", and
          * [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query]
          * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-         * Then the facet will count the products that are both in stock and ship
+         * Then the facet counts the products that are both in stock and ship
          * to store "123".
          * 
* @@ -5271,15 +5271,15 @@ public com.google.protobuf.ByteString getExcludedFilterKeysBytes(int index) { *
      * Enables dynamic position for this facet. If set to true, the position of
      * this facet among all facets in the response is determined by Google
-     * Retail Search. It will be ordered together with dynamic facets if dynamic
+     * Retail Search. It is ordered together with dynamic facets if dynamic
      * facets is enabled. If set to false, the position of this facet in the
-     * response will be the same as in the request, and it will be ranked before
+     * response is the same as in the request, and it is ranked before
      * the facets with dynamic position enable and all dynamic facets.
      *
      * For example, you may always want to have rating facet returned in
      * the response, but it's not necessarily to always display the rating facet
      * at the top. In that case, you can set enable_dynamic_position to true so
-     * that the position of rating facet in response will be determined by
+     * that the position of rating facet in response is determined by
      * Google Retail Search.
      *
      * Another example, assuming you have the following facets in the request:
@@ -5290,13 +5290,13 @@ public com.google.protobuf.ByteString getExcludedFilterKeysBytes(int index) {
      *
      * * "brands", enable_dynamic_position = false
      *
-     * And also you have a dynamic facets enable, which will generate a facet
-     * 'gender'. Then the final order of the facets in the response can be
+     * And also you have a dynamic facets enable, which generates a facet
+     * "gender". Then, the final order of the facets in the response can be
      * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
      * "rating") depends on how Google Retail Search orders "gender" and
-     * "rating" facets. However, notice that "price" and "brands" will always be
-     * ranked at 1st and 2nd position since their enable_dynamic_position are
-     * false.
+     * "rating" facets. However, notice that "price" and "brands" are always
+     * ranked at first and second position because their enable_dynamic_position
+     * values are false.
      * 
* * bool enable_dynamic_position = 4; @@ -6455,15 +6455,15 @@ public Builder addExcludedFilterKeysBytes(com.google.protobuf.ByteString value) *
        * Enables dynamic position for this facet. If set to true, the position of
        * this facet among all facets in the response is determined by Google
-       * Retail Search. It will be ordered together with dynamic facets if dynamic
+       * Retail Search. It is ordered together with dynamic facets if dynamic
        * facets is enabled. If set to false, the position of this facet in the
-       * response will be the same as in the request, and it will be ranked before
+       * response is the same as in the request, and it is ranked before
        * the facets with dynamic position enable and all dynamic facets.
        *
        * For example, you may always want to have rating facet returned in
        * the response, but it's not necessarily to always display the rating facet
        * at the top. In that case, you can set enable_dynamic_position to true so
-       * that the position of rating facet in response will be determined by
+       * that the position of rating facet in response is determined by
        * Google Retail Search.
        *
        * Another example, assuming you have the following facets in the request:
@@ -6474,13 +6474,13 @@ public Builder addExcludedFilterKeysBytes(com.google.protobuf.ByteString value)
        *
        * * "brands", enable_dynamic_position = false
        *
-       * And also you have a dynamic facets enable, which will generate a facet
-       * 'gender'. Then the final order of the facets in the response can be
+       * And also you have a dynamic facets enable, which generates a facet
+       * "gender". Then, the final order of the facets in the response can be
        * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
        * "rating") depends on how Google Retail Search orders "gender" and
-       * "rating" facets. However, notice that "price" and "brands" will always be
-       * ranked at 1st and 2nd position since their enable_dynamic_position are
-       * false.
+       * "rating" facets. However, notice that "price" and "brands" are always
+       * ranked at first and second position because their enable_dynamic_position
+       * values are false.
        * 
* * bool enable_dynamic_position = 4; @@ -6497,15 +6497,15 @@ public boolean getEnableDynamicPosition() { *
        * Enables dynamic position for this facet. If set to true, the position of
        * this facet among all facets in the response is determined by Google
-       * Retail Search. It will be ordered together with dynamic facets if dynamic
+       * Retail Search. It is ordered together with dynamic facets if dynamic
        * facets is enabled. If set to false, the position of this facet in the
-       * response will be the same as in the request, and it will be ranked before
+       * response is the same as in the request, and it is ranked before
        * the facets with dynamic position enable and all dynamic facets.
        *
        * For example, you may always want to have rating facet returned in
        * the response, but it's not necessarily to always display the rating facet
        * at the top. In that case, you can set enable_dynamic_position to true so
-       * that the position of rating facet in response will be determined by
+       * that the position of rating facet in response is determined by
        * Google Retail Search.
        *
        * Another example, assuming you have the following facets in the request:
@@ -6516,13 +6516,13 @@ public boolean getEnableDynamicPosition() {
        *
        * * "brands", enable_dynamic_position = false
        *
-       * And also you have a dynamic facets enable, which will generate a facet
-       * 'gender'. Then the final order of the facets in the response can be
+       * And also you have a dynamic facets enable, which generates a facet
+       * "gender". Then, the final order of the facets in the response can be
        * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
        * "rating") depends on how Google Retail Search orders "gender" and
-       * "rating" facets. However, notice that "price" and "brands" will always be
-       * ranked at 1st and 2nd position since their enable_dynamic_position are
-       * false.
+       * "rating" facets. However, notice that "price" and "brands" are always
+       * ranked at first and second position because their enable_dynamic_position
+       * values are false.
        * 
* * bool enable_dynamic_position = 4; @@ -6543,15 +6543,15 @@ public Builder setEnableDynamicPosition(boolean value) { *
        * Enables dynamic position for this facet. If set to true, the position of
        * this facet among all facets in the response is determined by Google
-       * Retail Search. It will be ordered together with dynamic facets if dynamic
+       * Retail Search. It is ordered together with dynamic facets if dynamic
        * facets is enabled. If set to false, the position of this facet in the
-       * response will be the same as in the request, and it will be ranked before
+       * response is the same as in the request, and it is ranked before
        * the facets with dynamic position enable and all dynamic facets.
        *
        * For example, you may always want to have rating facet returned in
        * the response, but it's not necessarily to always display the rating facet
        * at the top. In that case, you can set enable_dynamic_position to true so
-       * that the position of rating facet in response will be determined by
+       * that the position of rating facet in response is determined by
        * Google Retail Search.
        *
        * Another example, assuming you have the following facets in the request:
@@ -6562,13 +6562,13 @@ public Builder setEnableDynamicPosition(boolean value) {
        *
        * * "brands", enable_dynamic_position = false
        *
-       * And also you have a dynamic facets enable, which will generate a facet
-       * 'gender'. Then the final order of the facets in the response can be
+       * And also you have a dynamic facets enable, which generates a facet
+       * "gender". Then, the final order of the facets in the response can be
        * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
        * "rating") depends on how Google Retail Search orders "gender" and
-       * "rating" facets. However, notice that "price" and "brands" will always be
-       * ranked at 1st and 2nd position since their enable_dynamic_position are
-       * false.
+       * "rating" facets. However, notice that "price" and "brands" are always
+       * ranked at first and second position because their enable_dynamic_position
+       * values are false.
        * 
* * bool enable_dynamic_position = 4; @@ -12306,7 +12306,7 @@ public com.google.protobuf.Parser getParserForType() { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -12334,7 +12334,7 @@ public java.lang.String getPlacement() { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -12714,8 +12714,8 @@ public int getOffset() { *
    * The filter syntax consists of an expression language for constructing a
    * predicate from one or more fields of the products being filtered. Filter
-   * expression is case-sensitive. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+   * expression is case-sensitive. For more information, see
+   * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -12742,8 +12742,8 @@ public java.lang.String getFilter() { *
    * The filter syntax consists of an expression language for constructing a
    * predicate from one or more fields of the products being filtered. Filter
-   * expression is case-sensitive. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+   * expression is case-sensitive. For more information, see
+   * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -12777,14 +12777,14 @@ public com.google.protobuf.ByteString getFilterBytes() { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for - * more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -12811,14 +12811,14 @@ public java.lang.String getCanonicalFilter() { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for - * more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -12848,9 +12848,9 @@ public com.google.protobuf.ByteString getCanonicalFilterBytes() { *
    * The order in which products are returned. Products can be ordered by
    * a field in an [Product][google.cloud.retail.v2.Product] object. Leave it
-   * unset if ordered by relevance. OrderBy expression is case-sensitive. See
-   * more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+   * unset if ordered by relevance. OrderBy expression is case-sensitive. For
+   * more information, see
+   * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -12877,9 +12877,9 @@ public java.lang.String getOrderBy() { *
    * The order in which products are returned. Products can be ordered by
    * a field in an [Product][google.cloud.retail.v2.Product] object. Leave it
-   * unset if ordered by relevance. OrderBy expression is case-sensitive. See
-   * more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+   * unset if ordered by relevance. OrderBy expression is case-sensitive. For
+   * more information, see
+   * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -13070,8 +13070,8 @@ public com.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec getDynamicFacet * * *
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids]
@@ -13094,8 +13094,8 @@ public boolean hasBoostSpec() {
    *
    *
    * 
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids]
@@ -13120,8 +13120,8 @@ public com.google.cloud.retail.v2.SearchRequest.BoostSpec getBoostSpec() {
    *
    *
    * 
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids]
@@ -13148,8 +13148,8 @@ public com.google.cloud.retail.v2.SearchRequest.BoostSpecOrBuilder getBoostSpecO
    *
    * 
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -13166,8 +13166,8 @@ public boolean hasQueryExpansionSpec() { * *
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -13186,8 +13186,8 @@ public com.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec getQueryExpan * *
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -13550,7 +13550,7 @@ public com.google.protobuf.ByteString getVariantRollupKeysBytes(int index) { * * *
-   * The categories associated with a category page. Required for category
+   * The categories associated with a category page. Must be set for category
    * navigation queries to achieve good search quality. The format should be
    * the same as
    * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -13575,7 +13575,7 @@ public com.google.protobuf.ProtocolStringList getPageCategoriesList() {
    *
    *
    * 
-   * The categories associated with a category page. Required for category
+   * The categories associated with a category page. Must be set for category
    * navigation queries to achieve good search quality. The format should be
    * the same as
    * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -13600,7 +13600,7 @@ public int getPageCategoriesCount() {
    *
    *
    * 
-   * The categories associated with a category page. Required for category
+   * The categories associated with a category page. Must be set for category
    * navigation queries to achieve good search quality. The format should be
    * the same as
    * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -13626,7 +13626,7 @@ public java.lang.String getPageCategories(int index) {
    *
    *
    * 
-   * The categories associated with a category page. Required for category
+   * The categories associated with a category page. Must be set for category
    * navigation queries to achieve good search quality. The format should be
    * the same as
    * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -13813,9 +13813,9 @@ public int getLabelsCount() {
    *   key with multiple resources.
    * * Keys must start with a lowercase letter or international character.
    *
-   * See [Google Cloud
-   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
-   * for more details.
+   * For more information, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * in the Resource Manager documentation.
    * 
* * map<string, string> labels = 34; @@ -13851,9 +13851,9 @@ public java.util.Map getLabels() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -13880,9 +13880,9 @@ public java.util.Map getLabelsMap() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -13916,9 +13916,9 @@ public java.util.Map getLabelsMap() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -15100,7 +15100,7 @@ public Builder mergeFrom( * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. *
* * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -15127,7 +15127,7 @@ public java.lang.String getPlacement() { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. *
* * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -15154,7 +15154,7 @@ public com.google.protobuf.ByteString getPlacementBytes() { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. *
* * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -15180,7 +15180,7 @@ public Builder setPlacement(java.lang.String value) { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -15202,7 +15202,7 @@ public Builder clearPlacement() { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -16108,8 +16108,8 @@ public Builder clearOffset() { *
      * The filter syntax consists of an expression language for constructing a
      * predicate from one or more fields of the products being filtered. Filter
-     * expression is case-sensitive. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+     * expression is case-sensitive. For more information, see
+     * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16135,8 +16135,8 @@ public java.lang.String getFilter() { *
      * The filter syntax consists of an expression language for constructing a
      * predicate from one or more fields of the products being filtered. Filter
-     * expression is case-sensitive. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+     * expression is case-sensitive. For more information, see
+     * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16162,8 +16162,8 @@ public com.google.protobuf.ByteString getFilterBytes() { *
      * The filter syntax consists of an expression language for constructing a
      * predicate from one or more fields of the products being filtered. Filter
-     * expression is case-sensitive. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+     * expression is case-sensitive. For more information, see
+     * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16188,8 +16188,8 @@ public Builder setFilter(java.lang.String value) { *
      * The filter syntax consists of an expression language for constructing a
      * predicate from one or more fields of the products being filtered. Filter
-     * expression is case-sensitive. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+     * expression is case-sensitive. For more information, see
+     * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16210,8 +16210,8 @@ public Builder clearFilter() { *
      * The filter syntax consists of an expression language for constructing a
      * predicate from one or more fields of the products being filtered. Filter
-     * expression is case-sensitive. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+     * expression is case-sensitive. For more information, see
+     * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16241,14 +16241,14 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for - * more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -16274,14 +16274,14 @@ public java.lang.String getCanonicalFilter() { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for - * more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -16307,14 +16307,14 @@ public com.google.protobuf.ByteString getCanonicalFilterBytes() { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for - * more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -16339,14 +16339,14 @@ public Builder setCanonicalFilter(java.lang.String value) { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for - * more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -16367,14 +16367,14 @@ public Builder clearCanonicalFilter() { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for - * more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -16400,9 +16400,9 @@ public Builder setCanonicalFilterBytes(com.google.protobuf.ByteString value) { *
      * The order in which products are returned. Products can be ordered by
      * a field in an [Product][google.cloud.retail.v2.Product] object. Leave it
-     * unset if ordered by relevance. OrderBy expression is case-sensitive. See
-     * more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+     * unset if ordered by relevance. OrderBy expression is case-sensitive. For
+     * more information, see
+     * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16428,9 +16428,9 @@ public java.lang.String getOrderBy() { *
      * The order in which products are returned. Products can be ordered by
      * a field in an [Product][google.cloud.retail.v2.Product] object. Leave it
-     * unset if ordered by relevance. OrderBy expression is case-sensitive. See
-     * more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+     * unset if ordered by relevance. OrderBy expression is case-sensitive. For
+     * more information, see
+     * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16456,9 +16456,9 @@ public com.google.protobuf.ByteString getOrderByBytes() { *
      * The order in which products are returned. Products can be ordered by
      * a field in an [Product][google.cloud.retail.v2.Product] object. Leave it
-     * unset if ordered by relevance. OrderBy expression is case-sensitive. See
-     * more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+     * unset if ordered by relevance. OrderBy expression is case-sensitive. For
+     * more information, see
+     * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16483,9 +16483,9 @@ public Builder setOrderBy(java.lang.String value) { *
      * The order in which products are returned. Products can be ordered by
      * a field in an [Product][google.cloud.retail.v2.Product] object. Leave it
-     * unset if ordered by relevance. OrderBy expression is case-sensitive. See
-     * more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+     * unset if ordered by relevance. OrderBy expression is case-sensitive. For
+     * more information, see
+     * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16506,9 +16506,9 @@ public Builder clearOrderBy() { *
      * The order in which products are returned. Products can be ordered by
      * a field in an [Product][google.cloud.retail.v2.Product] object. Leave it
-     * unset if ordered by relevance. OrderBy expression is case-sensitive. See
-     * more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+     * unset if ordered by relevance. OrderBy expression is case-sensitive. For
+     * more information, see
+     * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -17208,8 +17208,8 @@ public Builder clearDynamicFacetSpec() { * * *
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids]
@@ -17231,8 +17231,8 @@ public boolean hasBoostSpec() {
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids]
@@ -17260,8 +17260,8 @@ public com.google.cloud.retail.v2.SearchRequest.BoostSpec getBoostSpec() {
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids]
@@ -17291,8 +17291,8 @@ public Builder setBoostSpec(com.google.cloud.retail.v2.SearchRequest.BoostSpec v
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids]
@@ -17320,8 +17320,8 @@ public Builder setBoostSpec(
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids]
@@ -17357,8 +17357,8 @@ public Builder mergeBoostSpec(com.google.cloud.retail.v2.SearchRequest.BoostSpec
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids]
@@ -17385,8 +17385,8 @@ public Builder clearBoostSpec() {
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids]
@@ -17408,8 +17408,8 @@ public com.google.cloud.retail.v2.SearchRequest.BoostSpec.Builder getBoostSpecBu
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids]
@@ -17435,8 +17435,8 @@ public com.google.cloud.retail.v2.SearchRequest.BoostSpecOrBuilder getBoostSpecO
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids]
@@ -17477,8 +17477,8 @@ public com.google.cloud.retail.v2.SearchRequest.BoostSpecOrBuilder getBoostSpecO
      *
      * 
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17494,8 +17494,8 @@ public boolean hasQueryExpansionSpec() { * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17517,8 +17517,8 @@ public com.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec getQueryExpan * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17543,8 +17543,8 @@ public Builder setQueryExpansionSpec( * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17566,8 +17566,8 @@ public Builder setQueryExpansionSpec( * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17599,8 +17599,8 @@ public Builder mergeQueryExpansionSpec( * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17621,8 +17621,8 @@ public Builder clearQueryExpansionSpec() { * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17639,8 +17639,8 @@ public Builder clearQueryExpansionSpec() { * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17661,8 +17661,8 @@ public Builder clearQueryExpansionSpec() { * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -18493,7 +18493,7 @@ private void ensurePageCategoriesIsMutable() { * * *
-     * The categories associated with a category page. Required for category
+     * The categories associated with a category page. Must be set for category
      * navigation queries to achieve good search quality. The format should be
      * the same as
      * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -18519,7 +18519,7 @@ public com.google.protobuf.ProtocolStringList getPageCategoriesList() {
      *
      *
      * 
-     * The categories associated with a category page. Required for category
+     * The categories associated with a category page. Must be set for category
      * navigation queries to achieve good search quality. The format should be
      * the same as
      * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -18544,7 +18544,7 @@ public int getPageCategoriesCount() {
      *
      *
      * 
-     * The categories associated with a category page. Required for category
+     * The categories associated with a category page. Must be set for category
      * navigation queries to achieve good search quality. The format should be
      * the same as
      * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -18570,7 +18570,7 @@ public java.lang.String getPageCategories(int index) {
      *
      *
      * 
-     * The categories associated with a category page. Required for category
+     * The categories associated with a category page. Must be set for category
      * navigation queries to achieve good search quality. The format should be
      * the same as
      * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -18596,7 +18596,7 @@ public com.google.protobuf.ByteString getPageCategoriesBytes(int index) {
      *
      *
      * 
-     * The categories associated with a category page. Required for category
+     * The categories associated with a category page. Must be set for category
      * navigation queries to achieve good search quality. The format should be
      * the same as
      * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -18630,7 +18630,7 @@ public Builder setPageCategories(int index, java.lang.String value) {
      *
      *
      * 
-     * The categories associated with a category page. Required for category
+     * The categories associated with a category page. Must be set for category
      * navigation queries to achieve good search quality. The format should be
      * the same as
      * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -18663,7 +18663,7 @@ public Builder addPageCategories(java.lang.String value) {
      *
      *
      * 
-     * The categories associated with a category page. Required for category
+     * The categories associated with a category page. Must be set for category
      * navigation queries to achieve good search quality. The format should be
      * the same as
      * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -18693,7 +18693,7 @@ public Builder addAllPageCategories(java.lang.Iterable values)
      *
      *
      * 
-     * The categories associated with a category page. Required for category
+     * The categories associated with a category page. Must be set for category
      * navigation queries to achieve good search quality. The format should be
      * the same as
      * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -18722,7 +18722,7 @@ public Builder clearPageCategories() {
      *
      *
      * 
-     * The categories associated with a category page. Required for category
+     * The categories associated with a category page. Must be set for category
      * navigation queries to achieve good search quality. The format should be
      * the same as
      * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -19175,9 +19175,9 @@ public int getLabelsCount() {
      *   key with multiple resources.
      * * Keys must start with a lowercase letter or international character.
      *
-     * See [Google Cloud
-     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
-     * for more details.
+     * For more information, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * in the Resource Manager documentation.
      * 
* * map<string, string> labels = 34; @@ -19213,9 +19213,9 @@ public java.util.Map getLabels() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -19242,9 +19242,9 @@ public java.util.Map getLabelsMap() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -19278,9 +19278,9 @@ public java.util.Map getLabelsMap() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -19320,9 +19320,9 @@ public Builder clearLabels() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -19358,9 +19358,9 @@ public java.util.Map getMutableLabels() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -19394,9 +19394,9 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequestOrBuilder.java index 43003aa066bf..36d56371a2b0 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequestOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequestOrBuilder.java @@ -33,7 +33,7 @@ public interface SearchRequestOrBuilder * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. *
* * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -50,7 +50,7 @@ public interface SearchRequestOrBuilder * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. *
* * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -290,8 +290,8 @@ public interface SearchRequestOrBuilder *
    * The filter syntax consists of an expression language for constructing a
    * predicate from one or more fields of the products being filtered. Filter
-   * expression is case-sensitive. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+   * expression is case-sensitive. For more information, see
+   * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -307,8 +307,8 @@ public interface SearchRequestOrBuilder *
    * The filter syntax consists of an expression language for constructing a
    * predicate from one or more fields of the products being filtered. Filter
-   * expression is case-sensitive. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+   * expression is case-sensitive. For more information, see
+   * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -327,14 +327,14 @@ public interface SearchRequestOrBuilder * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for - * more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. *
* * string canonical_filter = 28; @@ -350,14 +350,14 @@ public interface SearchRequestOrBuilder * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for - * more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. *
* * string canonical_filter = 28; @@ -372,9 +372,9 @@ public interface SearchRequestOrBuilder *
    * The order in which products are returned. Products can be ordered by
    * a field in an [Product][google.cloud.retail.v2.Product] object. Leave it
-   * unset if ordered by relevance. OrderBy expression is case-sensitive. See
-   * more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+   * unset if ordered by relevance. OrderBy expression is case-sensitive. For
+   * more information, see
+   * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -390,9 +390,9 @@ public interface SearchRequestOrBuilder *
    * The order in which products are returned. Products can be ordered by
    * a field in an [Product][google.cloud.retail.v2.Product] object. Leave it
-   * unset if ordered by relevance. OrderBy expression is case-sensitive. See
-   * more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+   * unset if ordered by relevance. OrderBy expression is case-sensitive. For
+   * more information, see
+   * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -534,8 +534,8 @@ public interface SearchRequestOrBuilder * * *
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids]
@@ -555,8 +555,8 @@ public interface SearchRequestOrBuilder
    *
    *
    * 
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids]
@@ -576,8 +576,8 @@ public interface SearchRequestOrBuilder
    *
    *
    * 
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids]
@@ -597,8 +597,8 @@ public interface SearchRequestOrBuilder
    *
    * 
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -612,8 +612,8 @@ public interface SearchRequestOrBuilder * *
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -627,8 +627,8 @@ public interface SearchRequestOrBuilder * *
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -968,7 +968,7 @@ public interface SearchRequestOrBuilder * * *
-   * The categories associated with a category page. Required for category
+   * The categories associated with a category page. Must be set for category
    * navigation queries to achieve good search quality. The format should be
    * the same as
    * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -991,7 +991,7 @@ public interface SearchRequestOrBuilder
    *
    *
    * 
-   * The categories associated with a category page. Required for category
+   * The categories associated with a category page. Must be set for category
    * navigation queries to achieve good search quality. The format should be
    * the same as
    * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -1014,7 +1014,7 @@ public interface SearchRequestOrBuilder
    *
    *
    * 
-   * The categories associated with a category page. Required for category
+   * The categories associated with a category page. Must be set for category
    * navigation queries to achieve good search quality. The format should be
    * the same as
    * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -1038,7 +1038,7 @@ public interface SearchRequestOrBuilder
    *
    *
    * 
-   * The categories associated with a category page. Required for category
+   * The categories associated with a category page. Must be set for category
    * navigation queries to achieve good search quality. The format should be
    * the same as
    * [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories];
@@ -1170,9 +1170,9 @@ public interface SearchRequestOrBuilder
    *   key with multiple resources.
    * * Keys must start with a lowercase letter or international character.
    *
-   * See [Google Cloud
-   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
-   * for more details.
+   * For more information, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * in the Resource Manager documentation.
    * 
* * map<string, string> labels = 34; @@ -1196,9 +1196,9 @@ public interface SearchRequestOrBuilder * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -1225,9 +1225,9 @@ public interface SearchRequestOrBuilder * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -1251,9 +1251,9 @@ public interface SearchRequestOrBuilder * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -1281,9 +1281,9 @@ java.lang.String getLabelsOrDefault( * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfig.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfig.java index 47f233d87f82..d4377cf2e2fb 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfig.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfig.java @@ -1641,6 +1641,25 @@ public com.google.protobuf.ByteString getEnableCategoryFilterLevelBytes() { } } + public static final int IGNORE_RECS_DENYLIST_FIELD_NUMBER = 24; + private boolean ignoreRecsDenylist_ = false; + /** + * + * + *
+   * When the flag is enabled, the products in the denylist will not be filtered
+   * out in the recommendation filtering results.
+   * 
+ * + * bool ignore_recs_denylist = 24; + * + * @return The ignoreRecsDenylist. + */ + @java.lang.Override + public boolean getIgnoreRecsDenylist() { + return ignoreRecsDenylist_; + } + public static final int PERSONALIZATION_SPEC_FIELD_NUMBER = 21; private com.google.cloud.retail.v2.SearchRequest.PersonalizationSpec personalizationSpec_; /** @@ -1929,6 +1948,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(21, getPersonalizationSpec()); } + if (ignoreRecsDenylist_ != false) { + output.writeBool(24, ignoreRecsDenylist_); + } getUnknownFields().writeTo(output); } @@ -2054,6 +2076,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getPersonalizationSpec()); } + if (ignoreRecsDenylist_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(24, ignoreRecsDenylist_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2092,6 +2117,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDiversityLevel().equals(other.getDiversityLevel())) return false; if (diversityType_ != other.diversityType_) return false; if (!getEnableCategoryFilterLevel().equals(other.getEnableCategoryFilterLevel())) return false; + if (getIgnoreRecsDenylist() != other.getIgnoreRecsDenylist()) return false; if (hasPersonalizationSpec() != other.hasPersonalizationSpec()) return false; if (hasPersonalizationSpec()) { if (!getPersonalizationSpec().equals(other.getPersonalizationSpec())) return false; @@ -2162,6 +2188,8 @@ public int hashCode() { hash = (53 * hash) + diversityType_; hash = (37 * hash) + ENABLE_CATEGORY_FILTER_LEVEL_FIELD_NUMBER; hash = (53 * hash) + getEnableCategoryFilterLevel().hashCode(); + hash = (37 * hash) + IGNORE_RECS_DENYLIST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreRecsDenylist()); if (hasPersonalizationSpec()) { hash = (37 * hash) + PERSONALIZATION_SPEC_FIELD_NUMBER; hash = (53 * hash) + getPersonalizationSpec().hashCode(); @@ -2341,13 +2369,14 @@ public Builder clear() { diversityLevel_ = ""; diversityType_ = 0; enableCategoryFilterLevel_ = ""; + ignoreRecsDenylist_ = false; personalizationSpec_ = null; if (personalizationSpecBuilder_ != null) { personalizationSpecBuilder_.dispose(); personalizationSpecBuilder_ = null; } solutionTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); return this; } @@ -2384,9 +2413,9 @@ public com.google.cloud.retail.v2.ServingConfig buildPartial() { } private void buildPartialRepeatedFields(com.google.cloud.retail.v2.ServingConfig result) { - if (((bitField0_ & 0x00040000) != 0)) { + if (((bitField0_ & 0x00080000) != 0)) { solutionTypes_ = java.util.Collections.unmodifiableList(solutionTypes_); - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); } result.solutionTypes_ = solutionTypes_; } @@ -2457,6 +2486,9 @@ private void buildPartial0(com.google.cloud.retail.v2.ServingConfig result) { result.enableCategoryFilterLevel_ = enableCategoryFilterLevel_; } if (((from_bitField0_ & 0x00020000) != 0)) { + result.ignoreRecsDenylist_ = ignoreRecsDenylist_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { result.personalizationSpec_ = personalizationSpecBuilder_ == null ? personalizationSpec_ @@ -2637,13 +2669,16 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ServingConfig other) { bitField0_ |= 0x00010000; onChanged(); } + if (other.getIgnoreRecsDenylist() != false) { + setIgnoreRecsDenylist(other.getIgnoreRecsDenylist()); + } if (other.hasPersonalizationSpec()) { mergePersonalizationSpec(other.getPersonalizationSpec()); } if (!other.solutionTypes_.isEmpty()) { if (solutionTypes_.isEmpty()) { solutionTypes_ = other.solutionTypes_; - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); } else { ensureSolutionTypesIsMutable(); solutionTypes_.addAll(other.solutionTypes_); @@ -2811,9 +2846,15 @@ public Builder mergeFrom( { input.readMessage( getPersonalizationSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; break; } // case 170 + case 192: + { + ignoreRecsDenylist_ = input.readBool(); + bitField0_ |= 0x00020000; + break; + } // case 192 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6337,6 +6378,62 @@ public Builder setEnableCategoryFilterLevelBytes(com.google.protobuf.ByteString return this; } + private boolean ignoreRecsDenylist_; + /** + * + * + *
+     * When the flag is enabled, the products in the denylist will not be filtered
+     * out in the recommendation filtering results.
+     * 
+ * + * bool ignore_recs_denylist = 24; + * + * @return The ignoreRecsDenylist. + */ + @java.lang.Override + public boolean getIgnoreRecsDenylist() { + return ignoreRecsDenylist_; + } + /** + * + * + *
+     * When the flag is enabled, the products in the denylist will not be filtered
+     * out in the recommendation filtering results.
+     * 
+ * + * bool ignore_recs_denylist = 24; + * + * @param value The ignoreRecsDenylist to set. + * @return This builder for chaining. + */ + public Builder setIgnoreRecsDenylist(boolean value) { + + ignoreRecsDenylist_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * When the flag is enabled, the products in the denylist will not be filtered
+     * out in the recommendation filtering results.
+     * 
+ * + * bool ignore_recs_denylist = 24; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreRecsDenylist() { + bitField0_ = (bitField0_ & ~0x00020000); + ignoreRecsDenylist_ = false; + onChanged(); + return this; + } + private com.google.cloud.retail.v2.SearchRequest.PersonalizationSpec personalizationSpec_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.retail.v2.SearchRequest.PersonalizationSpec, @@ -6369,7 +6466,7 @@ public Builder setEnableCategoryFilterLevelBytes(com.google.protobuf.ByteString * @return Whether the personalizationSpec field is set. */ public boolean hasPersonalizationSpec() { - return ((bitField0_ & 0x00020000) != 0); + return ((bitField0_ & 0x00040000) != 0); } /** * @@ -6438,7 +6535,7 @@ public Builder setPersonalizationSpec( } else { personalizationSpecBuilder_.setMessage(value); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -6472,7 +6569,7 @@ public Builder setPersonalizationSpec( } else { personalizationSpecBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -6502,7 +6599,7 @@ public Builder setPersonalizationSpec( public Builder mergePersonalizationSpec( com.google.cloud.retail.v2.SearchRequest.PersonalizationSpec value) { if (personalizationSpecBuilder_ == null) { - if (((bitField0_ & 0x00020000) != 0) + if (((bitField0_ & 0x00040000) != 0) && personalizationSpec_ != null && personalizationSpec_ != com.google.cloud.retail.v2.SearchRequest.PersonalizationSpec @@ -6515,7 +6612,7 @@ public Builder mergePersonalizationSpec( personalizationSpecBuilder_.mergeFrom(value); } if (personalizationSpec_ != null) { - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); } return this; @@ -6544,7 +6641,7 @@ public Builder mergePersonalizationSpec( *
*/ public Builder clearPersonalizationSpec() { - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00040000); personalizationSpec_ = null; if (personalizationSpecBuilder_ != null) { personalizationSpecBuilder_.dispose(); @@ -6578,7 +6675,7 @@ public Builder clearPersonalizationSpec() { */ public com.google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Builder getPersonalizationSpecBuilder() { - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return getPersonalizationSpecFieldBuilder().getBuilder(); } @@ -6658,9 +6755,9 @@ public Builder clearPersonalizationSpec() { private java.util.List solutionTypes_ = java.util.Collections.emptyList(); private void ensureSolutionTypesIsMutable() { - if (!((bitField0_ & 0x00040000) != 0)) { + if (!((bitField0_ & 0x00080000) != 0)) { solutionTypes_ = new java.util.ArrayList(solutionTypes_); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; } } /** @@ -6806,7 +6903,7 @@ public Builder addAllSolutionTypes( */ public Builder clearSolutionTypes() { solutionTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); onChanged(); return this; } diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfigOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfigOrBuilder.java index dcfee613d191..a0a04d6a7a48 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfigOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfigOrBuilder.java @@ -1126,6 +1126,20 @@ public interface ServingConfigOrBuilder */ com.google.protobuf.ByteString getEnableCategoryFilterLevelBytes(); + /** + * + * + *
+   * When the flag is enabled, the products in the denylist will not be filtered
+   * out in the recommendation filtering results.
+   * 
+ * + * bool ignore_recs_denylist = 24; + * + * @return The ignoreRecsDenylist. + */ + boolean getIgnoreRecsDenylist(); + /** * * diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfigProto.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfigProto.java index 5076e7bae92b..84ce6c788e12 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfigProto.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfigProto.java @@ -46,7 +46,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "i/field_behavior.proto\032\031google/api/resou" + "rce.proto\032#google/cloud/retail/v2/common" + ".proto\032+google/cloud/retail/v2/search_se" - + "rvice.proto\"\370\007\n\rServingConfig\022\021\n\004name\030\001 " + + "rvice.proto\"\226\010\n\rServingConfig\022\021\n\004name\030\001 " + "\001(\tB\003\340A\005\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022\020\n\010m" + "odel_id\030\003 \001(\t\022\035\n\025price_reranking_level\030\004" + " \001(\t\022\031\n\021facet_control_ids\030\005 \003(\t\022R\n\022dynam" @@ -61,22 +61,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "rol_ids\030\017 \003(\t\022\027\n\017diversity_level\030\010 \001(\t\022K" + "\n\016diversity_type\030\024 \001(\01623.google.cloud.re" + "tail.v2.ServingConfig.DiversityType\022$\n\034e" - + "nable_category_filter_level\030\020 \001(\t\022W\n\024per" - + "sonalization_spec\030\025 \001(\01329.google.cloud.r" - + "etail.v2.SearchRequest.PersonalizationSp" - + "ec\022D\n\016solution_types\030\023 \003(\0162$.google.clou" - + "d.retail.v2.SolutionTypeB\006\340A\002\340A\005\"d\n\rDive" - + "rsityType\022\036\n\032DIVERSITY_TYPE_UNSPECIFIED\020" - + "\000\022\030\n\024RULE_BASED_DIVERSITY\020\002\022\031\n\025DATA_DRIV" - + "EN_DIVERSITY\020\003:\205\001\352A\201\001\n#retail.googleapis" - + ".com/ServingConfig\022Zprojects/{project}/l" - + "ocations/{location}/catalogs/{catalog}/s" - + "ervingConfigs/{serving_config}B\275\001\n\032com.g" - + "oogle.cloud.retail.v2B\022ServingConfigProt" - + "oP\001Z2cloud.google.com/go/retail/apiv2/re" - + "tailpb;retailpb\242\002\006RETAIL\252\002\026Google.Cloud." - + "Retail.V2\312\002\026Google\\Cloud\\Retail\\V2\352\002\031Goo" - + "gle::Cloud::Retail::V2b\006proto3" + + "nable_category_filter_level\030\020 \001(\t\022\034\n\024ign" + + "ore_recs_denylist\030\030 \001(\010\022W\n\024personalizati" + + "on_spec\030\025 \001(\01329.google.cloud.retail.v2.S" + + "earchRequest.PersonalizationSpec\022D\n\016solu" + + "tion_types\030\023 \003(\0162$.google.cloud.retail.v" + + "2.SolutionTypeB\006\340A\002\340A\005\"d\n\rDiversityType\022" + + "\036\n\032DIVERSITY_TYPE_UNSPECIFIED\020\000\022\030\n\024RULE_" + + "BASED_DIVERSITY\020\002\022\031\n\025DATA_DRIVEN_DIVERSI" + + "TY\020\003:\205\001\352A\201\001\n#retail.googleapis.com/Servi" + + "ngConfig\022Zprojects/{project}/locations/{" + + "location}/catalogs/{catalog}/servingConf" + + "igs/{serving_config}B\275\001\n\032com.google.clou" + + "d.retail.v2B\022ServingConfigProtoP\001Z2cloud" + + ".google.com/go/retail/apiv2/retailpb;ret" + + "ailpb\242\002\006RETAIL\252\002\026Google.Cloud.Retail.V2\312" + + "\002\026Google\\Cloud\\Retail\\V2\352\002\031Google::Cloud" + + "::Retail::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -110,6 +111,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DiversityLevel", "DiversityType", "EnableCategoryFilterLevel", + "IgnoreRecsDenylist", "PersonalizationSpec", "SolutionTypes", }); diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEvent.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEvent.java index 0a55a0357a83..5e02456d4b68 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEvent.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEvent.java @@ -102,6 +102,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -136,6 +137,7 @@ public java.lang.String getEventType() { * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -1650,8 +1652,8 @@ public com.google.protobuf.ByteString getPageViewIdBytes() { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. *
* * string entity = 23; @@ -1677,8 +1679,8 @@ public java.lang.String getEntity() { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. *
* * string entity = 23; @@ -2688,6 +2690,7 @@ public Builder mergeFrom( * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -2721,6 +2724,7 @@ public java.lang.String getEventType() { * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -2754,6 +2758,7 @@ public com.google.protobuf.ByteString getEventTypeBytes() { * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -2786,6 +2791,7 @@ public Builder setEventType(java.lang.String value) { * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -2814,6 +2820,7 @@ public Builder clearEventType() { * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -6785,8 +6792,8 @@ public Builder setPageViewIdBytes(com.google.protobuf.ByteString value) { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. *
* * string entity = 23; @@ -6811,8 +6818,8 @@ public java.lang.String getEntity() { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. *
* * string entity = 23; @@ -6837,8 +6844,8 @@ public com.google.protobuf.ByteString getEntityBytes() { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. *
* * string entity = 23; @@ -6862,8 +6869,8 @@ public Builder setEntity(java.lang.String value) { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. *
* * string entity = 23; @@ -6883,8 +6890,8 @@ public Builder clearEntity() { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. *
* * string entity = 23; diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventOrBuilder.java b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventOrBuilder.java index 52e714728b34..4c8322432b4f 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventOrBuilder.java @@ -31,6 +31,7 @@ public interface UserEventOrBuilder * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -54,6 +55,7 @@ public interface UserEventOrBuilder * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -1160,8 +1162,8 @@ com.google.cloud.retail.v2.CustomAttribute getAttributesOrDefault( * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. *
* * string entity = 23; @@ -1176,8 +1178,8 @@ com.google.cloud.retail.v2.CustomAttribute getAttributesOrDefault( * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. *
* * string entity = 23; diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/catalog.proto b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/catalog.proto index 8276310fa2de..90e976418b13 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/catalog.proto +++ b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/catalog.proto @@ -20,6 +20,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/retail/v2/common.proto"; import "google/cloud/retail/v2/import_config.proto"; +import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Retail.V2"; option go_package = "cloud.google.com/go/retail/apiv2/retailpb;retailpb"; @@ -87,6 +88,123 @@ message ProductLevelConfig { // Catalog level attribute config for an attribute. For example, if customers // want to enable/disable facet for a specific attribute. message CatalogAttribute { + // Possible options for the facet that corresponds to the current attribute + // config. + message FacetConfig { + // [Facet values][google.cloud.retail.v2.SearchResponse.Facet.values] to + // ignore on [facets][google.cloud.retail.v2.SearchResponse.Facet] during + // the specified time range for the given + // [SearchResponse.Facet.key][google.cloud.retail.v2.SearchResponse.Facet.key] + // attribute. + message IgnoredFacetValues { + // List of facet values to ignore for the following time range. The facet + // values are the same as the attribute values. There is a limit of 10 + // values per instance of IgnoredFacetValues. Each value can have at most + // 128 characters. + repeated string values = 1; + + // Time range for the current list of facet values to ignore. + // If multiple time ranges are specified for an facet value for the + // current attribute, consider all of them. If both are empty, ignore + // always. If start time and end time are set, then start time + // must be before end time. + // If start time is not empty and end time is empty, then will ignore + // these facet values after the start time. + google.protobuf.Timestamp start_time = 2; + + // If start time is empty and end time is not empty, then ignore these + // facet values before end time. + google.protobuf.Timestamp end_time = 3; + } + + // Replaces a set of textual facet values by the same (possibly different) + // merged facet value. Each facet value should appear at most once as a + // value per [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]. + // This feature is available only for textual custom attributes. + message MergedFacetValue { + // All the facet values that are replaces by the same + // [merged_value][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value] + // that follows. The maximum number of values per MergedFacetValue is 25. + // Each value can have up to 128 characters. + repeated string values = 1; + + // All the previous values are replaced by this merged facet value. + // This merged_value must be non-empty and can have up to 128 characters. + string merged_value = 2; + } + + // The current facet key (i.e. attribute config) maps into the + // [merged_facet_key][google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet.merged_facet_key]. + // A facet key can have at most one child. The current facet key and the + // merged facet key need both to be textual custom attributes or both + // numerical custom attributes (same type). + message MergedFacet { + // The merged facet key should be a valid facet key that is different than + // the facet key of the current catalog attribute. We refer this is + // merged facet key as the child of the current catalog attribute. This + // merged facet key can't be a parent of another facet key (i.e. no + // directed path of length 2). This merged facet key needs to be either a + // textual custom attribute or a numerical custom attribute. + string merged_facet_key = 1; + } + + // Options to rerank based on facet values engaged by the user for the + // current key. That key needs to be a custom textual key and facetable. + // To use this control, you also need to pass all the facet keys engaged by + // the user in the request using the field [SearchRequest.FacetSpec]. In + // particular, if you don't pass the facet keys engaged that you want to + // rerank on, this control won't be effective. Moreover, to obtain better + // results, the facet values that you want to rerank on should be close to + // English (ideally made of words, underscores, and spaces). + message RerankConfig { + // If set to true, then we also rerank the dynamic facets based on the + // facet values engaged by the user for the current attribute key during + // serving. + bool rerank_facet = 1; + + // If empty, rerank on all facet values for the current key. Otherwise, + // will rerank on the facet values from this list only. + repeated string facet_values = 2; + } + + // If you don't set the facet + // [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals] + // in the request to a numerical attribute, then we use the computed + // intervals with rounded bounds obtained from all its product numerical + // attribute values. The computed intervals might not be ideal for some + // attributes. Therefore, we give you the option to overwrite them with the + // facet_intervals field. The maximum of facet intervals per + // [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 40. Each + // interval must have a lower bound or an upper bound. If both bounds are + // provided, then the lower bound must be smaller or equal than the upper + // bound. + repeated Interval facet_intervals = 1; + + // Each instance represents a list of attribute values to ignore as facet + // values for a specific time range. The maximum number of instances per + // [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 25. + repeated IgnoredFacetValues ignored_facet_values = 2; + + // Each instance replaces a list of facet values by a merged facet + // value. If a facet value is not in any list, then it will stay the same. + // To avoid conflicts, only paths of length 1 are accepted. In other words, + // if "dark_blue" merged into "BLUE", then the latter can't merge into + // "blues" because this would create a path of length 2. The maximum number + // of instances of MergedFacetValue per + // [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] is 100. This + // feature is available only for textual custom attributes. + repeated MergedFacetValue merged_facet_values = 3; + + // Use this field only if you want to merge a facet key into another facet + // key. + MergedFacet merged_facet = 4; + + // Set this field only if you want to rerank based on facet values engaged + // by the user for the current key. This option is only possible for custom + // facetable textual keys. + RerankConfig rerank_config = 5; + } + // The type of an attribute. enum AttributeType { // The type of the attribute is unknown. @@ -210,7 +328,9 @@ message CatalogAttribute { // are indexed so that it can be filtered, faceted, or boosted in // [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. // - // Must be specified, otherwise throws INVALID_FORMAT error. + // Must be specified when + // [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + // is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. IndexableOption indexable_option = 5; // If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic @@ -232,7 +352,9 @@ message CatalogAttribute { // [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as // there are no text values associated to numerical attributes. // - // Must be specified, otherwise throws INVALID_FORMAT error. + // Must be specified, when + // [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] + // is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. SearchableOption searchable_option = 7; // If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. @@ -246,6 +368,9 @@ message CatalogAttribute { // results. If unset, the server behavior defaults to // [RETRIEVABLE_DISABLED][google.cloud.retail.v2.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED]. RetrievableOption retrievable_option = 12; + + // Contains facet options. + FacetConfig facet_config = 13; } // Catalog level attribute config. @@ -335,8 +460,8 @@ message CompletionConfig { // Output only. Name of the LRO corresponding to the latest suggestion terms // list import. // - // Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - // retrieve the latest state of the Long Running Operation. + // Can use [GetOperation][google.longrunning.Operations.GetOperation] API + // method to retrieve the latest state of the Long Running Operation. string last_suggestions_import_operation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/common.proto b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/common.proto index 6f3b29ca8c41..78014a1490a2 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/common.proto +++ b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/common.proto @@ -124,6 +124,12 @@ message Condition { // Range of time(s) specifying when Condition is active. // Condition true if any time range matches. repeated TimeRange active_time_range = 3; + + // Used to support browse uses cases. + // A list (up to 10 entries) of categories or departments. + // The format should be the same as + // [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories]; + repeated string page_categories = 4; } // A rule is a condition-action pair @@ -172,17 +178,19 @@ message Rule { } // * Rule Condition: - // - No - // [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms] - // provided is a global match. - // - 1 or more - // [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms] - // provided are combined with OR operator. + // - No + // [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms] + // provided is a global match. + // - 1 or more + // [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms] + // provided are combined with OR operator. + // // * Action Input: The request query and filter that are applied to the // retrieved products, in addition to any filters already provided with the // SearchRequest. The AND operator is used to combine the query's existing // filters with the filter rule(s). NOTE: May result in 0 results when // filters conflict. + // // * Action Result: Filters the returned objects to be ONLY those that passed // the filter. message FilterAction { @@ -190,10 +198,9 @@ message Rule { // // * [filter][google.cloud.retail.v2.Rule.FilterAction.filter] must be set. // * Filter syntax is identical to - // [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. See + // [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. For // more - // details at the Retail Search - // [user guide](/retail/search/docs/filter-and-order#filter). + // information, see [Filter](/retail/docs/filter-and-order#filter). // * To filter products with product ID "product_1" or "product_2", and // color // "Red" or "Blue":
@@ -206,7 +213,7 @@ message Rule { // Redirects a shopper to a specific page. // // * Rule Condition: - // - Must specify + // Must specify // [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]. // * Action Input: Request Query // * Action Result: Redirects shopper to provided uri. @@ -288,6 +295,78 @@ message Rule { repeated string ignore_terms = 1; } + // Force returns an attribute/facet in the request around a certain position + // or above. + // + // * Rule Condition: + // Must specify non-empty + // [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms] + // (for search only) or + // [Condition.page_categories][google.cloud.retail.v2.Condition.page_categories] + // (for browse only), but can't specify both. + // + // * Action Inputs: attribute name, position + // + // * Action Result: Will force return a facet key around a certain position + // or above if the condition is satisfied. + // + // Example: Suppose the query is "shoes", the + // [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms] is + // "shoes", the + // [ForceReturnFacetAction.FacetPositionAdjustment.attribute_name][google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment.attribute_name] + // is "size" and the + // [ForceReturnFacetAction.FacetPositionAdjustment.position][google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment.position] + // is 8. + // + // Two cases: a) The facet key "size" is not already in the top 8 slots, then + // the facet "size" will appear at a position close to 8. b) The facet key + // "size" in among the top 8 positions in the request, then it will stay at + // its current rank. + message ForceReturnFacetAction { + // Each facet position adjustment consists of a single attribute name (i.e. + // facet key) along with a specified position. + message FacetPositionAdjustment { + // The attribute name to force return as a facet. Each attribute name + // should be a valid attribute name, be non-empty and contain at most 80 + // characters long. + string attribute_name = 1; + + // This is the position in the request as explained above. It should be + // strictly positive be at most 100. + int32 position = 2; + } + + // Each instance corresponds to a force return attribute for the given + // condition. There can't be more 3 instances here. + repeated FacetPositionAdjustment facet_position_adjustments = 1; + } + + // Removes an attribute/facet in the request if is present. + // + // * Rule Condition: + // Must specify non-empty + // [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms] + // (for search only) or + // [Condition.page_categories][google.cloud.retail.v2.Condition.page_categories] + // (for browse only), but can't specify both. + // + // * Action Input: attribute name + // + // * Action Result: Will remove the attribute (as a facet) from the request + // if it is present. + // + // Example: Suppose the query is "shoes", the + // [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms] is + // "shoes" and the attribute name "size", then facet key "size" will be + // removed from the request (if it is present). + message RemoveFacetAction { + // The attribute names (i.e. facet keys) to remove from the dynamic facets + // (if present in the request). There can't be more 3 attribute names. + // Each attribute name should be a valid attribute name, be non-empty and + // contain at most 80 characters. + repeated string attribute_names = 1; + } + // An action must be provided. oneof action { // A boost action. @@ -314,6 +393,12 @@ message Rule { // Treats a set of terms as synonyms of one another. TwowaySynonymsAction twoway_synonyms_action = 11; + + // Force returns an attribute as a facet in the request. + ForceReturnFacetAction force_return_facet_action = 12; + + // Remove an attribute as a facet in the request (if present). + RemoveFacetAction remove_facet_action = 13; } // Required. The condition that triggers the rule. diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/completion_service.proto b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/completion_service.proto index 17468ebd01b9..a5f2b0ac83cf 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/completion_service.proto +++ b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/completion_service.proto @@ -151,10 +151,15 @@ message CompleteQueryRequest { // capped by 20. int32 max_suggestions = 5; - // The entity for customers that may run multiple different entities, domains, - // sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, + // If true, attribute suggestions are enabled and provided in response. + // + // This field is only available for "cloud-retail" dataset. + bool enable_attribute_suggestions = 9; + + // The entity for customers who run multiple entities, domains, sites, or + // regions, for example, `Google US`, `Google Ads`, `Waymo`, // `google.com`, `youtube.com`, etc. - // If this is set, it should be exactly matched with + // If this is set, it must be an exact match with // [UserEvent.entity][google.cloud.retail.v2.UserEvent.entity] to get // per-entity autocomplete results. string entity = 10; @@ -179,8 +184,10 @@ message CompleteQueryResponse { map attributes = 2; } - // Recent search of this user. + // Deprecated: Recent search of this user. message RecentSearchResult { + option deprecated = true; + // The recent search query. string recent_search = 1; } @@ -195,9 +202,9 @@ message CompleteQueryResponse { // attribution of complete model performance. string attribution_token = 2; - // Matched recent searches of this user. The maximum number of recent searches - // is 10. This field is a restricted feature. Contact Retail Search support - // team if you are interested in enabling it. + // Deprecated. Matched recent searches of this user. The maximum number of + // recent searches is 10. This field is a restricted feature. If you want to + // enable it, contact Retail Search support. // // This feature is only available when // [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id] @@ -216,5 +223,5 @@ message CompleteQueryResponse { // // Recent searches are deduplicated. More recent searches will be reserved // when duplication happens. - repeated RecentSearchResult recent_search_results = 3; + repeated RecentSearchResult recent_search_results = 3 [deprecated = true]; } diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/import_config.proto b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/import_config.proto index 8bb5e1543e1f..3425f604bc5d 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/import_config.proto +++ b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/import_config.proto @@ -196,7 +196,8 @@ message ImportProductsRequest { ImportErrorsConfig errors_config = 3; // Indicates which fields in the provided imported `products` to update. If - // not set, all fields are updated. + // not set, all fields are updated. If provided, only the existing product + // fields are updated. Missing products will not be created. google.protobuf.FieldMask update_mask = 4; // The mode of reconciliation between existing products and the products to be @@ -212,9 +213,14 @@ message ImportProductsRequest { // Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has // to be within the same project as // [ImportProductsRequest.parent][google.cloud.retail.v2.ImportProductsRequest.parent]. - // Make sure that `service-@gcp-sa-retail.iam.gserviceaccount.com` has the - // `pubsub.topics.publish` IAM permission on the topic. + // Make sure that both + // `cloud-retail-customer-data-access@system.gserviceaccount.com` and + // `service-@gcp-sa-retail.iam.gserviceaccount.com` + // have the `pubsub.topics.publish` IAM permission on the topic. + // + // Only supported when + // [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2.ImportProductsRequest.reconciliation_mode] + // is set to `FULL`. string notification_pubsub_topic = 7; } diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/model.proto b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/model.proto index 53f255911aa8..69fff52e7d14 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/model.proto +++ b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/model.proto @@ -50,6 +50,25 @@ message Model { [(google.api.field_behavior) = OPTIONAL]; } + // Additional configs for the frequently-bought-together model type. + message FrequentlyBoughtTogetherFeaturesConfig { + // Optional. Specifies the context of the model when it is used in predict + // requests. Can only be set for the `frequently-bought-together` type. If + // it isn't specified, it defaults to + // [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS]. + ContextProductsType context_products_type = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Additional model features config. + message ModelFeaturesConfig { + oneof type_dedicated_config { + // Additional configs for frequently-bought-together models. + FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = + 1; + } + } + // The serving state of the model. enum ServingState { // Unspecified serving state. @@ -118,6 +137,22 @@ message Model { DATA_ERROR = 2; } + // Use single or multiple context products for recommendations. + enum ContextProductsType { + // Unspecified default value, should never be explicitly set. + // Defaults to + // [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS]. + CONTEXT_PRODUCTS_TYPE_UNSPECIFIED = 0; + + // Use only a single product as context for the recommendation. Typically + // used on pages like add-to-cart or product details. + SINGLE_CONTEXT_PRODUCT = 1; + + // Use one or multiple products as context for the recommendation. Typically + // used on shopping cart pages. + MULTIPLE_CONTEXT_PRODUCTS = 2; + } + // Required. The fully qualified resource name of the model. // // Format: @@ -236,4 +271,8 @@ message Model { // PageOptimizationConfig. repeated ServingConfigList serving_config_lists = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Additional model features config. + ModelFeaturesConfig model_features_config = 22 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/product.proto b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/product.proto index 75128b7c7b5f..71aee814edf2 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/product.proto +++ b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/product.proto @@ -103,23 +103,22 @@ message Product { } oneof expiration { - // The timestamp when this product becomes unavailable for - // [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note - // that this is only applicable to - // [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and - // [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and - // ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. - // In general, we suggest the users to delete the stale products explicitly, - // instead of using this field to determine staleness. + // Note that this field is applied in the following ways: // - // If it is set, the [Product][google.cloud.retail.v2.Product] is not - // available for - // [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after - // [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the - // product can still be retrieved by - // [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] - // and - // [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + // * If the [Product][google.cloud.retail.v2.Product] is already expired + // when it is uploaded, this product + // is not indexed for search. + // + // * If the [Product][google.cloud.retail.v2.Product] is not expired when it + // is uploaded, only the + // [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]'s and + // [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]'s + // expireTime is respected, and + // [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]'s + // expireTime is not used. + // + // In general, we suggest the users to delete the stale + // products explicitly, instead of using this field to determine staleness. // // [expire_time][google.cloud.retail.v2.Product.expire_time] must be later // than [available_time][google.cloud.retail.v2.Product.available_time] and @@ -256,9 +255,10 @@ message Product { // error is returned. // // At most 250 values are allowed per - // [Product][google.cloud.retail.v2.Product]. Empty values are not allowed. - // Each value must be a UTF-8 encoded string with a length limit of 5,000 - // characters. Otherwise, an INVALID_ARGUMENT error is returned. + // [Product][google.cloud.retail.v2.Product] unless overridden through the + // Google Cloud console. Empty values are not allowed. Each value must be a + // UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an + // INVALID_ARGUMENT error is returned. // // Corresponding properties: Google Merchant Center property // [google_product_category][mc_google_product_category]. Schema.org property @@ -280,9 +280,10 @@ message Product { // The brands of the product. // - // A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded - // string with a length limit of 1,000 characters. Otherwise, an - // INVALID_ARGUMENT error is returned. + // A maximum of 30 brands are allowed unless overridden through the Google + // Cloud console. Each + // brand must be a UTF-8 encoded string with a length limit of 1,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Corresponding properties: Google Merchant Center property // [brand](https://support.google.com/merchants/answer/6324351). Schema.org diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/product_service.proto b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/product_service.proto index e9ad2e318a8c..8d953ac28d07 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/product_service.proto +++ b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/product_service.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/retail/v2/common.proto"; import "google/cloud/retail/v2/import_config.proto"; import "google/cloud/retail/v2/product.proto"; +import "google/cloud/retail/v2/purge_config.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -86,6 +87,35 @@ service ProductService { option (google.api.method_signature) = "name"; } + // Permanently deletes all selected [Product][google.cloud.retail.v2.Product]s + // under a branch. + // + // This process is asynchronous. If the request is valid, the removal will be + // enqueued and processed offline. Depending on the number of + // [Product][google.cloud.retail.v2.Product]s, this operation could take hours + // to complete. Before the operation completes, some + // [Product][google.cloud.retail.v2.Product]s may still be returned by + // [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + // + // Depending on the number of [Product][google.cloud.retail.v2.Product]s, this + // operation could take hours to complete. To get a sample of + // [Product][google.cloud.retail.v2.Product]s that would be deleted, set + // [PurgeProductsRequest.force][google.cloud.retail.v2.PurgeProductsRequest.force] + // to false. + rpc PurgeProducts(PurgeProductsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/locations/*/catalogs/*/branches/*}/products:purge" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.retail.v2.PurgeProductsResponse" + metadata_type: "google.cloud.retail.v2.PurgeProductsMetadata" + }; + } + // Bulk import of multiple [Product][google.cloud.retail.v2.Product]s. // // Request processing may be synchronous. @@ -166,10 +196,11 @@ service ProductService { }; } - // It is recommended to use the + // We recommend that you use the // [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] - // method instead of - // [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + // method instead of the + // [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces] + // method. // [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] // achieves the same results but provides more fine-grained control over // ingesting local inventory data. @@ -208,10 +239,11 @@ service ProductService { }; } - // It is recommended to use the + // We recommend that you use the // [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] - // method instead of - // [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + // method instead of the + // [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces] + // method. // [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] // achieves the same results but provides more fine-grained control over // ingesting local inventory data. diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/promotion.proto b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/promotion.proto index ccbb1b2fda77..69c246127815 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/promotion.proto +++ b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/promotion.proto @@ -34,7 +34,7 @@ message Promotion { // id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is // returned. // - // Google Merchant Center property - // [promotion](https://support.google.com/merchants/answer/7050148). + // Corresponds to Google Merchant Center property + // [promotion_id](https://support.google.com/merchants/answer/7050148). string promotion_id = 1; } diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/purge_config.proto b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/purge_config.proto index 8a7acc711cfa..8924b942745f 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/purge_config.proto +++ b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/purge_config.proto @@ -18,6 +18,7 @@ package google.cloud.retail.v2; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Retail.V2"; option go_package = "cloud.google.com/go/retail/apiv2/retailpb;retailpb"; @@ -32,6 +33,95 @@ option ruby_package = "Google::Cloud::Retail::V2"; // This will be returned by the google.longrunning.Operation.metadata field. message PurgeMetadata {} +// Metadata related to the progress of the PurgeProducts operation. +// This will be returned by the google.longrunning.Operation.metadata field. +message PurgeProductsMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; + + // Count of entries that were deleted successfully. + int64 success_count = 3; + + // Count of entries that encountered errors while processing. + int64 failure_count = 4; +} + +// Request message for PurgeProducts method. +message PurgeProductsRequest { + // Required. The resource name of the branch under which the products are + // created. The format is + // `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "retail.googleapis.com/Branch" } + ]; + + // Required. The filter string to specify the products to be deleted with a + // length limit of 5,000 characters. + // + // Empty string filter is not allowed. "*" implies delete all items in a + // branch. + // + // The eligible fields for filtering are: + // + // * `availability`: Double quoted + // [Product.availability][google.cloud.retail.v2.Product.availability] string. + // * `create_time` : in ISO 8601 "zulu" format. + // + // Supported syntax: + // + // * Comparators (">", "<", ">=", "<=", "="). + // Examples: + // * create_time <= "2015-02-13T17:05:46Z" + // * availability = "IN_STOCK" + // + // * Conjunctions ("AND") + // Examples: + // * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER" + // + // * Disjunctions ("OR") + // Examples: + // * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK" + // + // * Can support nested queries. + // Examples: + // * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER") + // OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK") + // + // * Filter Limits: + // * Filter should not contain more than 6 conditions. + // * Max nesting depth should not exceed 2 levels. + // + // Examples queries: + // * Delete back order products created before a timestamp. + // create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER" + string filter = 2 [(google.api.field_behavior) = REQUIRED]; + + // Actually perform the purge. + // If `force` is set to false, the method will return the expected purge count + // without deleting any products. + bool force = 3; +} + +// Response of the PurgeProductsRequest. If the long running operation is +// successfully done, then this message is returned by the +// google.longrunning.Operations.response field. +message PurgeProductsResponse { + // The total count of products purged as a result of the operation. + int64 purge_count = 1; + + // A sample of the product names that will be deleted. + // Only populated if `force` is set to false. A max of 100 names will be + // returned and the names are chosen at random. + repeated string purge_sample = 2 [ + (google.api.resource_reference) = { type: "retail.googleapis.com/Product" } + ]; +} + // Request message for PurgeUserEvents method. message PurgeUserEventsRequest { // Required. The resource name of the catalog under which the events are diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/search_service.proto b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/search_service.proto index 4c81410e9b5c..c9b8cbb3e92d 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/search_service.proto +++ b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/search_service.proto @@ -118,13 +118,13 @@ message SearchRequest { // values. Maximum number of intervals is 40. // // For all numerical facet keys that appear in the list of products from - // the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + // the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are // computed from their distribution weekly. If the model assigns a high // score to a numerical facet key and its intervals are not specified in - // the search request, these percentiles will become the bounds - // for its intervals and will be returned in the response. If the + // the search request, these percentiles become the bounds + // for its intervals and are returned in the response. If the // facet key intervals are specified in the request, then the specified - // intervals will be returned instead. + // intervals are returned instead. repeated Interval intervals = 2; // Only get facet for the given restricted values. For example, when using @@ -157,14 +157,14 @@ message SearchRequest { // Only get facet values that start with the given string prefix. For // example, suppose "categories" has three values "Women > Shoe", // "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - // "categories" facet will give only "Women > Shoe" and "Women > Dress". + // "categories" facet gives only "Women > Shoe" and "Women > Dress". // Only supported on textual fields. Maximum is 10. repeated string prefixes = 8; // Only get facet values that contains the given strings. For example, // suppose "categories" has three values "Women > Shoe", // "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - // "categories" facet will give only "Women > Shoe" and "Men > Shoe". + // "categories" facet gives only "Women > Shoe" and "Men > Shoe". // Only supported on textual fields. Maximum is 10. repeated string contains = 9; @@ -197,7 +197,7 @@ message SearchRequest { string order_by = 4; // The query that is used to compute facet for the given facet key. - // When provided, it will override the default behavior of facet + // When provided, it overrides the default behavior of facet // computation. The query syntax is the same as a filter expression. See // [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for // detail syntax and limitations. Notice that there is no limitation on @@ -206,9 +206,9 @@ message SearchRequest { // // In the response, // [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value] - // will be always "1" and + // is always "1" and // [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count] - // will be the number of results that match the query. + // is the number of results that match the query. // // For example, you can set a customized facet for "shipToStore", // where @@ -216,7 +216,7 @@ message SearchRequest { // is "customizedShipToStore", and // [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query] // is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")". - // Then the facet will count the products that are both in stock and ship + // Then the facet counts the products that are both in stock and ship // to store "123". string query = 5; @@ -267,15 +267,15 @@ message SearchRequest { // Enables dynamic position for this facet. If set to true, the position of // this facet among all facets in the response is determined by Google - // Retail Search. It will be ordered together with dynamic facets if dynamic + // Retail Search. It is ordered together with dynamic facets if dynamic // facets is enabled. If set to false, the position of this facet in the - // response will be the same as in the request, and it will be ranked before + // response is the same as in the request, and it is ranked before // the facets with dynamic position enable and all dynamic facets. // // For example, you may always want to have rating facet returned in // the response, but it's not necessarily to always display the rating facet // at the top. In that case, you can set enable_dynamic_position to true so - // that the position of rating facet in response will be determined by + // that the position of rating facet in response is determined by // Google Retail Search. // // Another example, assuming you have the following facets in the request: @@ -286,13 +286,13 @@ message SearchRequest { // // * "brands", enable_dynamic_position = false // - // And also you have a dynamic facets enable, which will generate a facet - // 'gender'. Then the final order of the facets in the response can be + // And also you have a dynamic facets enable, which generates a facet + // "gender". Then, the final order of the facets in the response can be // ("price", "brands", "rating", "gender") or ("price", "brands", "gender", // "rating") depends on how Google Retail Search orders "gender" and - // "rating" facets. However, notice that "price" and "brands" will always be - // ranked at 1st and 2nd position since their enable_dynamic_position are - // false. + // "rating" facets. However, notice that "price" and "brands" are always + // ranked at first and second position because their enable_dynamic_position + // values are false. bool enable_dynamic_position = 4; } @@ -489,7 +489,7 @@ message SearchRequest { // or the name of the legacy placement resource, such as // `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. // This field is used to identify the serving config name and the set - // of models that will be used to make the search. + // of models that are used to make the search. string placement = 1 [(google.api.field_behavior) = REQUIRED]; // The branch resource name, such as @@ -554,8 +554,8 @@ message SearchRequest { // The filter syntax consists of an expression language for constructing a // predicate from one or more fields of the products being filtered. Filter - // expression is case-sensitive. See more details at this [user - // guide](https://cloud.google.com/retail/docs/filter-and-order#filter). + // expression is case-sensitive. For more information, see + // [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter). // // If this field is unrecognizable, an INVALID_ARGUMENT is returned. string filter = 10; @@ -564,21 +564,21 @@ message SearchRequest { // checking any filters on the search page. // // The filter applied to every search request when quality improvement such as - // query expansion is needed. For example, if a query does not have enough - // results, an expanded query with - // [SearchRequest.canonical_filter][google.cloud.retail.v2.SearchRequest.canonical_filter] - // will be returned as a supplement of the original query. This field is - // strongly recommended to achieve high search quality. + // query expansion is needed. In the case a query does not have a sufficient + // amount of results this filter will be used to determine whether or not to + // enable the query expansion flow. The original filter will still be used for + // the query expanded search. + // This field is strongly recommended to achieve high search quality. // - // See [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for - // more details about filter syntax. + // For more information about filter syntax, see + // [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. string canonical_filter = 28; // The order in which products are returned. Products can be ordered by // a field in an [Product][google.cloud.retail.v2.Product] object. Leave it - // unset if ordered by relevance. OrderBy expression is case-sensitive. See - // more details at this [user - // guide](https://cloud.google.com/retail/docs/filter-and-order#order). + // unset if ordered by relevance. OrderBy expression is case-sensitive. For + // more information, see + // [Order](https://cloud.google.com/retail/docs/filter-and-order#order). // // If this field is unrecognizable, an INVALID_ARGUMENT is returned. string order_by = 11; @@ -596,8 +596,8 @@ message SearchRequest { // textual facets can be dynamically generated. DynamicFacetSpec dynamic_facet_spec = 21 [deprecated = true]; - // Boost specification to boost certain products. See more details at this - // [user guide](https://cloud.google.com/retail/docs/boosting). + // Boost specification to boost certain products. For more information, see + // [Boost results](https://cloud.google.com/retail/docs/boosting). // // Notice that if both // [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids] @@ -609,8 +609,8 @@ message SearchRequest { BoostSpec boost_spec = 13; // The query expansion specification that specifies the conditions under which - // query expansion will occur. See more details at this [user - // guide](https://cloud.google.com/retail/docs/result-size#query_expansion). + // query expansion occurs. For more information, see [Query + // expansion](https://cloud.google.com/retail/docs/result-size#query_expansion). QueryExpansionSpec query_expansion_spec = 14; // The keys to fetch and rollup the matching @@ -685,7 +685,7 @@ message SearchRequest { // INVALID_ARGUMENT error is returned. repeated string variant_rollup_keys = 17; - // The categories associated with a category page. Required for category + // The categories associated with a category page. Must be set for category // navigation queries to achieve good search quality. The format should be // the same as // [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories]; @@ -729,9 +729,9 @@ message SearchRequest { // key with multiple resources. // * Keys must start with a lowercase letter or international character. // - // See [Google Cloud - // Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - // for more details. + // For more information, see [Requirements for + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // in the Resource Manager documentation. map labels = 34; // The spell correction specification that specifies the mode under @@ -948,7 +948,7 @@ message SearchResponse { repeated ExperimentInfo experiment_info = 17; } -// Metadata for active A/B testing [Experiments][]. +// Metadata for active A/B testing [Experiment][]. message ExperimentInfo { // Metadata for active serving config A/B tests. message ServingConfigExperiment { @@ -961,8 +961,8 @@ message ExperimentInfo { }]; // The fully qualified resource name of the serving config - // [VariantArm.serving_config_id][] responsible for generating the search - // response. For example: + // [Experiment.VariantArm.serving_config_id][] responsible for generating + // the search response. For example: // `projects/*/locations/*/catalogs/*/servingConfigs/*`. string experiment_serving_config = 2 [(google.api.resource_reference) = { type: "retail.googleapis.com/ServingConfig" diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/serving_config.proto b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/serving_config.proto index 537027397fa3..5b234396f844 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/serving_config.proto +++ b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/serving_config.proto @@ -240,6 +240,10 @@ message ServingConfig { // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. string enable_category_filter_level = 16; + // When the flag is enabled, the products in the denylist will not be filtered + // out in the recommendation filtering results. + bool ignore_recs_denylist = 24; + // The specification for personalization spec. // // Can only be set if diff --git a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/user_event.proto b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/user_event.proto index 8dccddb7908a..32859f1f88be 100644 --- a/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/user_event.proto +++ b/java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/user_event.proto @@ -37,6 +37,7 @@ message UserEvent { // Required. User event type. Allowed values are: // // * `add-to-cart`: Products being added to cart. + // * `remove-from-cart`: Products being removed from cart. // * `category-page-view`: Special pages such as sale or promotion pages // viewed. // * `detail-page-view`: Products detail page viewed. @@ -271,8 +272,8 @@ message UserEvent { // The entity for customers that may run multiple different entities, domains, // sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, // `google.com`, `youtube.com`, etc. - // It is recommended to set this field to get better per-entity search, - // completion and prediction results. + // We recommend that you set this field to get better per-entity search, + // completion, and prediction results. string entity = 23; } diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AcceptTermsRequest.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AcceptTermsRequest.java new file mode 100644 index 000000000000..11310d865dfc --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AcceptTermsRequest.java @@ -0,0 +1,646 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * Request for AcceptTerms method.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.AcceptTermsRequest} + */ +public final class AcceptTermsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.AcceptTermsRequest) + AcceptTermsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AcceptTermsRequest.newBuilder() to construct. + private AcceptTermsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AcceptTermsRequest() { + project_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AcceptTermsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_AcceptTermsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_AcceptTermsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.AcceptTermsRequest.class, + com.google.cloud.retail.v2alpha.AcceptTermsRequest.Builder.class); + } + + public static final int PROJECT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object project_ = ""; + /** + * + * + *
+   * Required. Full resource name of the project. Format:
+   * `projects/{project_number_or_id}/retailProject`
+   * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Full resource name of the project. Format:
+   * `projects/{project_number_or_id}/retailProject`
+   * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = 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.GeneratedMessageV3.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2alpha.AcceptTermsRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.AcceptTermsRequest other = + (com.google.cloud.retail.v2alpha.AcceptTermsRequest) obj; + + if (!getProject().equals(other.getProject())) 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) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.AcceptTermsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.AcceptTermsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AcceptTermsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.AcceptTermsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AcceptTermsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.AcceptTermsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AcceptTermsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.AcceptTermsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AcceptTermsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.AcceptTermsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AcceptTermsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.AcceptTermsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.AcceptTermsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for AcceptTerms method.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.AcceptTermsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.AcceptTermsRequest) + com.google.cloud.retail.v2alpha.AcceptTermsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_AcceptTermsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_AcceptTermsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.AcceptTermsRequest.class, + com.google.cloud.retail.v2alpha.AcceptTermsRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.AcceptTermsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + project_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_AcceptTermsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.AcceptTermsRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.AcceptTermsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.AcceptTermsRequest build() { + com.google.cloud.retail.v2alpha.AcceptTermsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.AcceptTermsRequest buildPartial() { + com.google.cloud.retail.v2alpha.AcceptTermsRequest result = + new com.google.cloud.retail.v2alpha.AcceptTermsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.AcceptTermsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.project_ = project_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.AcceptTermsRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.AcceptTermsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.AcceptTermsRequest other) { + if (other == com.google.cloud.retail.v2alpha.AcceptTermsRequest.getDefaultInstance()) + return this; + if (!other.getProject().isEmpty()) { + project_ = other.project_; + 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: + { + project_ = 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 project_ = ""; + /** + * + * + *
+     * Required. Full resource name of the project. Format:
+     * `projects/{project_number_or_id}/retailProject`
+     * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of the project. Format:
+     * `projects/{project_number_or_id}/retailProject`
+     * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for project. + */ + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of the project. Format:
+     * `projects/{project_number_or_id}/retailProject`
+     * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + project_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of the project. Format:
+     * `projects/{project_number_or_id}/retailProject`
+     * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearProject() { + project_ = getDefaultInstance().getProject(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of the project. Format:
+     * `projects/{project_number_or_id}/retailProject`
+     * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + project_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.AcceptTermsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.AcceptTermsRequest) + private static final com.google.cloud.retail.v2alpha.AcceptTermsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.AcceptTermsRequest(); + } + + public static com.google.cloud.retail.v2alpha.AcceptTermsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcceptTermsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.AcceptTermsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AcceptTermsRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AcceptTermsRequestOrBuilder.java new file mode 100644 index 000000000000..85b85fd9aa3b --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AcceptTermsRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface AcceptTermsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.AcceptTermsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Full resource name of the project. Format:
+   * `projects/{project_number_or_id}/retailProject`
+   * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The project. + */ + java.lang.String getProject(); + /** + * + * + *
+   * Required. Full resource name of the project. Format:
+   * `projects/{project_number_or_id}/retailProject`
+   * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for project. + */ + com.google.protobuf.ByteString getProjectBytes(); +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AlertConfig.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AlertConfig.java new file mode 100644 index 000000000000..d1bf98f09015 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AlertConfig.java @@ -0,0 +1,3516 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * Project level alert config.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.AlertConfig} + */ +public final class AlertConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.AlertConfig) + AlertConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AlertConfig.newBuilder() to construct. + private AlertConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AlertConfig() { + name_ = ""; + alertPolicies_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AlertConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_AlertConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_AlertConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.AlertConfig.class, + com.google.cloud.retail.v2alpha.AlertConfig.Builder.class); + } + + public interface AlertPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.AlertConfig.AlertPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The feature that provides alerting capability. Supported value is
+     * only `search-data-quality` for now.
+     * 
+ * + * string alert_group = 1; + * + * @return The alertGroup. + */ + java.lang.String getAlertGroup(); + /** + * + * + *
+     * The feature that provides alerting capability. Supported value is
+     * only `search-data-quality` for now.
+     * 
+ * + * string alert_group = 1; + * + * @return The bytes for alertGroup. + */ + com.google.protobuf.ByteString getAlertGroupBytes(); + + /** + * + * + *
+     * The enrollment status of a customer.
+     * 
+ * + * .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus enroll_status = 2; + * + * + * @return The enum numeric value on the wire for enrollStatus. + */ + int getEnrollStatusValue(); + /** + * + * + *
+     * The enrollment status of a customer.
+     * 
+ * + * .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus enroll_status = 2; + * + * + * @return The enrollStatus. + */ + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus getEnrollStatus(); + + /** + * + * + *
+     * Recipients for the alert policy.
+     * One alert policy should not exceed 20 recipients.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + java.util.List + getRecipientsList(); + /** + * + * + *
+     * Recipients for the alert policy.
+     * One alert policy should not exceed 20 recipients.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient getRecipients(int index); + /** + * + * + *
+     * Recipients for the alert policy.
+     * One alert policy should not exceed 20 recipients.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + int getRecipientsCount(); + /** + * + * + *
+     * Recipients for the alert policy.
+     * One alert policy should not exceed 20 recipients.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + java.util.List< + ? extends com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.RecipientOrBuilder> + getRecipientsOrBuilderList(); + /** + * + * + *
+     * Recipients for the alert policy.
+     * One alert policy should not exceed 20 recipients.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.RecipientOrBuilder + getRecipientsOrBuilder(int index); + } + /** + * + * + *
+   * Alert policy for a customer.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.AlertConfig.AlertPolicy} + */ + public static final class AlertPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.AlertConfig.AlertPolicy) + AlertPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use AlertPolicy.newBuilder() to construct. + private AlertPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AlertPolicy() { + alertGroup_ = ""; + enrollStatus_ = 0; + recipients_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AlertPolicy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.class, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Builder.class); + } + + /** + * + * + *
+     * The enrollment status enum for alert policy.
+     * 
+ * + * Protobuf enum {@code google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus} + */ + public enum EnrollStatus implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Default value. Used for customers who have not responded to the
+       * alert policy.
+       * 
+ * + * ENROLL_STATUS_UNSPECIFIED = 0; + */ + ENROLL_STATUS_UNSPECIFIED(0), + /** + * + * + *
+       * Customer is enrolled in this policy.
+       * 
+ * + * ENROLLED = 1; + */ + ENROLLED(1), + /** + * + * + *
+       * Customer declined this policy.
+       * 
+ * + * DECLINED = 2; + */ + DECLINED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Default value. Used for customers who have not responded to the
+       * alert policy.
+       * 
+ * + * ENROLL_STATUS_UNSPECIFIED = 0; + */ + public static final int ENROLL_STATUS_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Customer is enrolled in this policy.
+       * 
+ * + * ENROLLED = 1; + */ + public static final int ENROLLED_VALUE = 1; + /** + * + * + *
+       * Customer declined this policy.
+       * 
+ * + * DECLINED = 2; + */ + public static final int DECLINED_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 EnrollStatus 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 EnrollStatus forNumber(int value) { + switch (value) { + case 0: + return ENROLL_STATUS_UNSPECIFIED; + case 1: + return ENROLLED; + case 2: + return DECLINED; + 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 EnrollStatus findValueByNumber(int number) { + return EnrollStatus.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final EnrollStatus[] VALUES = values(); + + public static EnrollStatus 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 EnrollStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus) + } + + public interface RecipientOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Email address of the recipient.
+       * 
+ * + * string email_address = 1; + * + * @return The emailAddress. + */ + java.lang.String getEmailAddress(); + /** + * + * + *
+       * Email address of the recipient.
+       * 
+ * + * string email_address = 1; + * + * @return The bytes for emailAddress. + */ + com.google.protobuf.ByteString getEmailAddressBytes(); + } + /** + * + * + *
+     * Recipient contact information.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient} + */ + public static final class Recipient extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient) + RecipientOrBuilder { + private static final long serialVersionUID = 0L; + // Use Recipient.newBuilder() to construct. + private Recipient(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Recipient() { + emailAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Recipient(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_Recipient_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_Recipient_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient.class, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient.Builder.class); + } + + public static final int EMAIL_ADDRESS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object emailAddress_ = ""; + /** + * + * + *
+       * Email address of the recipient.
+       * 
+ * + * string email_address = 1; + * + * @return The emailAddress. + */ + @java.lang.Override + public java.lang.String getEmailAddress() { + java.lang.Object ref = emailAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + emailAddress_ = s; + return s; + } + } + /** + * + * + *
+       * Email address of the recipient.
+       * 
+ * + * string email_address = 1; + * + * @return The bytes for emailAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEmailAddressBytes() { + java.lang.Object ref = emailAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + emailAddress_ = 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.GeneratedMessageV3.isStringEmpty(emailAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, emailAddress_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(emailAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, emailAddress_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2alpha.AlertConfig.AlertPolicy.Recipient)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient other = + (com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient) obj; + + if (!getEmailAddress().equals(other.getEmailAddress())) 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) + EMAIL_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getEmailAddress().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.AlertConfig.AlertPolicy.Recipient prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Recipient contact information.
+       * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient) + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.RecipientOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_Recipient_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_Recipient_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient.class, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient.Builder.class); + } + + // Construct using + // com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + emailAddress_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_Recipient_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient build() { + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient buildPartial() { + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient result = + new com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.emailAddress_ = emailAddress_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient) { + return mergeFrom( + (com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient other) { + if (other + == com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient + .getDefaultInstance()) return this; + if (!other.getEmailAddress().isEmpty()) { + emailAddress_ = other.emailAddress_; + 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: + { + emailAddress_ = 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 emailAddress_ = ""; + /** + * + * + *
+         * Email address of the recipient.
+         * 
+ * + * string email_address = 1; + * + * @return The emailAddress. + */ + public java.lang.String getEmailAddress() { + java.lang.Object ref = emailAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + emailAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Email address of the recipient.
+         * 
+ * + * string email_address = 1; + * + * @return The bytes for emailAddress. + */ + public com.google.protobuf.ByteString getEmailAddressBytes() { + java.lang.Object ref = emailAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + emailAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Email address of the recipient.
+         * 
+ * + * string email_address = 1; + * + * @param value The emailAddress to set. + * @return This builder for chaining. + */ + public Builder setEmailAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + emailAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Email address of the recipient.
+         * 
+ * + * string email_address = 1; + * + * @return This builder for chaining. + */ + public Builder clearEmailAddress() { + emailAddress_ = getDefaultInstance().getEmailAddress(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Email address of the recipient.
+         * 
+ * + * string email_address = 1; + * + * @param value The bytes for emailAddress to set. + * @return This builder for chaining. + */ + public Builder setEmailAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + emailAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient) + private static final com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient(); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Recipient parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.AlertConfig.AlertPolicy.Recipient + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ALERT_GROUP_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object alertGroup_ = ""; + /** + * + * + *
+     * The feature that provides alerting capability. Supported value is
+     * only `search-data-quality` for now.
+     * 
+ * + * string alert_group = 1; + * + * @return The alertGroup. + */ + @java.lang.Override + public java.lang.String getAlertGroup() { + java.lang.Object ref = alertGroup_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + alertGroup_ = s; + return s; + } + } + /** + * + * + *
+     * The feature that provides alerting capability. Supported value is
+     * only `search-data-quality` for now.
+     * 
+ * + * string alert_group = 1; + * + * @return The bytes for alertGroup. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAlertGroupBytes() { + java.lang.Object ref = alertGroup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + alertGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENROLL_STATUS_FIELD_NUMBER = 2; + private int enrollStatus_ = 0; + /** + * + * + *
+     * The enrollment status of a customer.
+     * 
+ * + * .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus enroll_status = 2; + * + * + * @return The enum numeric value on the wire for enrollStatus. + */ + @java.lang.Override + public int getEnrollStatusValue() { + return enrollStatus_; + } + /** + * + * + *
+     * The enrollment status of a customer.
+     * 
+ * + * .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus enroll_status = 2; + * + * + * @return The enrollStatus. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus getEnrollStatus() { + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus result = + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus.forNumber( + enrollStatus_); + return result == null + ? com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus.UNRECOGNIZED + : result; + } + + public static final int RECIPIENTS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + recipients_; + /** + * + * + *
+     * Recipients for the alert policy.
+     * One alert policy should not exceed 20 recipients.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + @java.lang.Override + public java.util.List + getRecipientsList() { + return recipients_; + } + /** + * + * + *
+     * Recipients for the alert policy.
+     * One alert policy should not exceed 20 recipients.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.RecipientOrBuilder> + getRecipientsOrBuilderList() { + return recipients_; + } + /** + * + * + *
+     * Recipients for the alert policy.
+     * One alert policy should not exceed 20 recipients.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + @java.lang.Override + public int getRecipientsCount() { + return recipients_.size(); + } + /** + * + * + *
+     * Recipients for the alert policy.
+     * One alert policy should not exceed 20 recipients.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient getRecipients( + int index) { + return recipients_.get(index); + } + /** + * + * + *
+     * Recipients for the alert policy.
+     * One alert policy should not exceed 20 recipients.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.RecipientOrBuilder + getRecipientsOrBuilder(int index) { + return recipients_.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.GeneratedMessageV3.isStringEmpty(alertGroup_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, alertGroup_); + } + if (enrollStatus_ + != com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus + .ENROLL_STATUS_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, enrollStatus_); + } + for (int i = 0; i < recipients_.size(); i++) { + output.writeMessage(3, recipients_.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.GeneratedMessageV3.isStringEmpty(alertGroup_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, alertGroup_); + } + if (enrollStatus_ + != com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus + .ENROLL_STATUS_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, enrollStatus_); + } + for (int i = 0; i < recipients_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, recipients_.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.retail.v2alpha.AlertConfig.AlertPolicy)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy other = + (com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy) obj; + + if (!getAlertGroup().equals(other.getAlertGroup())) return false; + if (enrollStatus_ != other.enrollStatus_) return false; + if (!getRecipientsList().equals(other.getRecipientsList())) 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) + ALERT_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getAlertGroup().hashCode(); + hash = (37 * hash) + ENROLL_STATUS_FIELD_NUMBER; + hash = (53 * hash) + enrollStatus_; + if (getRecipientsCount() > 0) { + hash = (37 * hash) + RECIPIENTS_FIELD_NUMBER; + hash = (53 * hash) + getRecipientsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.AlertConfig.AlertPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Alert policy for a customer.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.AlertConfig.AlertPolicy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.AlertConfig.AlertPolicy) + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.class, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + alertGroup_ = ""; + enrollStatus_ = 0; + if (recipientsBuilder_ == null) { + recipients_ = java.util.Collections.emptyList(); + } else { + recipients_ = null; + recipientsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy build() { + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy buildPartial() { + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy result = + new com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy result) { + if (recipientsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + recipients_ = java.util.Collections.unmodifiableList(recipients_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.recipients_ = recipients_; + } else { + result.recipients_ = recipientsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.alertGroup_ = alertGroup_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enrollStatus_ = enrollStatus_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy) { + return mergeFrom((com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy other) { + if (other == com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.getDefaultInstance()) + return this; + if (!other.getAlertGroup().isEmpty()) { + alertGroup_ = other.alertGroup_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.enrollStatus_ != 0) { + setEnrollStatusValue(other.getEnrollStatusValue()); + } + if (recipientsBuilder_ == null) { + if (!other.recipients_.isEmpty()) { + if (recipients_.isEmpty()) { + recipients_ = other.recipients_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRecipientsIsMutable(); + recipients_.addAll(other.recipients_); + } + onChanged(); + } + } else { + if (!other.recipients_.isEmpty()) { + if (recipientsBuilder_.isEmpty()) { + recipientsBuilder_.dispose(); + recipientsBuilder_ = null; + recipients_ = other.recipients_; + bitField0_ = (bitField0_ & ~0x00000004); + recipientsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRecipientsFieldBuilder() + : null; + } else { + recipientsBuilder_.addAllMessages(other.recipients_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + alertGroup_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + enrollStatus_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient m = + input.readMessage( + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient + .parser(), + extensionRegistry); + if (recipientsBuilder_ == null) { + ensureRecipientsIsMutable(); + recipients_.add(m); + } else { + recipientsBuilder_.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 alertGroup_ = ""; + /** + * + * + *
+       * The feature that provides alerting capability. Supported value is
+       * only `search-data-quality` for now.
+       * 
+ * + * string alert_group = 1; + * + * @return The alertGroup. + */ + public java.lang.String getAlertGroup() { + java.lang.Object ref = alertGroup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + alertGroup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The feature that provides alerting capability. Supported value is
+       * only `search-data-quality` for now.
+       * 
+ * + * string alert_group = 1; + * + * @return The bytes for alertGroup. + */ + public com.google.protobuf.ByteString getAlertGroupBytes() { + java.lang.Object ref = alertGroup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + alertGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The feature that provides alerting capability. Supported value is
+       * only `search-data-quality` for now.
+       * 
+ * + * string alert_group = 1; + * + * @param value The alertGroup to set. + * @return This builder for chaining. + */ + public Builder setAlertGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + alertGroup_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The feature that provides alerting capability. Supported value is
+       * only `search-data-quality` for now.
+       * 
+ * + * string alert_group = 1; + * + * @return This builder for chaining. + */ + public Builder clearAlertGroup() { + alertGroup_ = getDefaultInstance().getAlertGroup(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The feature that provides alerting capability. Supported value is
+       * only `search-data-quality` for now.
+       * 
+ * + * string alert_group = 1; + * + * @param value The bytes for alertGroup to set. + * @return This builder for chaining. + */ + public Builder setAlertGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + alertGroup_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int enrollStatus_ = 0; + /** + * + * + *
+       * The enrollment status of a customer.
+       * 
+ * + * .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus enroll_status = 2; + * + * + * @return The enum numeric value on the wire for enrollStatus. + */ + @java.lang.Override + public int getEnrollStatusValue() { + return enrollStatus_; + } + /** + * + * + *
+       * The enrollment status of a customer.
+       * 
+ * + * .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus enroll_status = 2; + * + * + * @param value The enum numeric value on the wire for enrollStatus to set. + * @return This builder for chaining. + */ + public Builder setEnrollStatusValue(int value) { + enrollStatus_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The enrollment status of a customer.
+       * 
+ * + * .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus enroll_status = 2; + * + * + * @return The enrollStatus. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus + getEnrollStatus() { + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus result = + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus.forNumber( + enrollStatus_); + return result == null + ? com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The enrollment status of a customer.
+       * 
+ * + * .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus enroll_status = 2; + * + * + * @param value The enrollStatus to set. + * @return This builder for chaining. + */ + public Builder setEnrollStatus( + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + enrollStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The enrollment status of a customer.
+       * 
+ * + * .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.EnrollStatus enroll_status = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearEnrollStatus() { + bitField0_ = (bitField0_ & ~0x00000002); + enrollStatus_ = 0; + onChanged(); + return this; + } + + private java.util.List + recipients_ = java.util.Collections.emptyList(); + + private void ensureRecipientsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + recipients_ = + new java.util.ArrayList< + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient>(recipients_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient.Builder, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.RecipientOrBuilder> + recipientsBuilder_; + + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public java.util.List + getRecipientsList() { + if (recipientsBuilder_ == null) { + return java.util.Collections.unmodifiableList(recipients_); + } else { + return recipientsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public int getRecipientsCount() { + if (recipientsBuilder_ == null) { + return recipients_.size(); + } else { + return recipientsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient getRecipients( + int index) { + if (recipientsBuilder_ == null) { + return recipients_.get(index); + } else { + return recipientsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public Builder setRecipients( + int index, com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient value) { + if (recipientsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecipientsIsMutable(); + recipients_.set(index, value); + onChanged(); + } else { + recipientsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public Builder setRecipients( + int index, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient.Builder + builderForValue) { + if (recipientsBuilder_ == null) { + ensureRecipientsIsMutable(); + recipients_.set(index, builderForValue.build()); + onChanged(); + } else { + recipientsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public Builder addRecipients( + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient value) { + if (recipientsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecipientsIsMutable(); + recipients_.add(value); + onChanged(); + } else { + recipientsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public Builder addRecipients( + int index, com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient value) { + if (recipientsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecipientsIsMutable(); + recipients_.add(index, value); + onChanged(); + } else { + recipientsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public Builder addRecipients( + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient.Builder + builderForValue) { + if (recipientsBuilder_ == null) { + ensureRecipientsIsMutable(); + recipients_.add(builderForValue.build()); + onChanged(); + } else { + recipientsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public Builder addRecipients( + int index, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient.Builder + builderForValue) { + if (recipientsBuilder_ == null) { + ensureRecipientsIsMutable(); + recipients_.add(index, builderForValue.build()); + onChanged(); + } else { + recipientsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public Builder addAllRecipients( + java.lang.Iterable< + ? extends com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient> + values) { + if (recipientsBuilder_ == null) { + ensureRecipientsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, recipients_); + onChanged(); + } else { + recipientsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public Builder clearRecipients() { + if (recipientsBuilder_ == null) { + recipients_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + recipientsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public Builder removeRecipients(int index) { + if (recipientsBuilder_ == null) { + ensureRecipientsIsMutable(); + recipients_.remove(index); + onChanged(); + } else { + recipientsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient.Builder + getRecipientsBuilder(int index) { + return getRecipientsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.RecipientOrBuilder + getRecipientsOrBuilder(int index) { + if (recipientsBuilder_ == null) { + return recipients_.get(index); + } else { + return recipientsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.RecipientOrBuilder> + getRecipientsOrBuilderList() { + if (recipientsBuilder_ != null) { + return recipientsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(recipients_); + } + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient.Builder + addRecipientsBuilder() { + return getRecipientsFieldBuilder() + .addBuilder( + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient + .getDefaultInstance()); + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient.Builder + addRecipientsBuilder(int index) { + return getRecipientsFieldBuilder() + .addBuilder( + index, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient + .getDefaultInstance()); + } + /** + * + * + *
+       * Recipients for the alert policy.
+       * One alert policy should not exceed 20 recipients.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient recipients = 3; + * + */ + public java.util.List< + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient.Builder> + getRecipientsBuilderList() { + return getRecipientsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient.Builder, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.RecipientOrBuilder> + getRecipientsFieldBuilder() { + if (recipientsBuilder_ == null) { + recipientsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Recipient.Builder, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.RecipientOrBuilder>( + recipients_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + recipients_ = null; + } + return recipientsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.AlertConfig.AlertPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.AlertConfig.AlertPolicy) + private static final com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy(); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AlertPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.AlertConfig.AlertPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Immutable. The name of the AlertConfig singleton resource.
+   * Format: projects/*/alertConfig
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Immutable. The name of the AlertConfig singleton resource.
+   * Format: projects/*/alertConfig
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALERT_POLICIES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List alertPolicies_; + /** + * + * + *
+   * Alert policies for a customer.
+   * They must be unique by [AlertPolicy.alert_group]
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + */ + @java.lang.Override + public java.util.List + getAlertPoliciesList() { + return alertPolicies_; + } + /** + * + * + *
+   * Alert policies for a customer.
+   * They must be unique by [AlertPolicy.alert_group]
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + */ + @java.lang.Override + public java.util.List + getAlertPoliciesOrBuilderList() { + return alertPolicies_; + } + /** + * + * + *
+   * Alert policies for a customer.
+   * They must be unique by [AlertPolicy.alert_group]
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + */ + @java.lang.Override + public int getAlertPoliciesCount() { + return alertPolicies_.size(); + } + /** + * + * + *
+   * Alert policies for a customer.
+   * They must be unique by [AlertPolicy.alert_group]
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy getAlertPolicies(int index) { + return alertPolicies_.get(index); + } + /** + * + * + *
+   * Alert policies for a customer.
+   * They must be unique by [AlertPolicy.alert_group]
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicyOrBuilder getAlertPoliciesOrBuilder( + int index) { + return alertPolicies_.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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < alertPolicies_.size(); i++) { + output.writeMessage(2, alertPolicies_.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < alertPolicies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, alertPolicies_.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.retail.v2alpha.AlertConfig)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.AlertConfig other = + (com.google.cloud.retail.v2alpha.AlertConfig) obj; + + if (!getName().equals(other.getName())) return false; + if (!getAlertPoliciesList().equals(other.getAlertPoliciesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getAlertPoliciesCount() > 0) { + hash = (37 * hash) + ALERT_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getAlertPoliciesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.AlertConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.AlertConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Project level alert config.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.AlertConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.AlertConfig) + com.google.cloud.retail.v2alpha.AlertConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_AlertConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_AlertConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.AlertConfig.class, + com.google.cloud.retail.v2alpha.AlertConfig.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.AlertConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (alertPoliciesBuilder_ == null) { + alertPolicies_ = java.util.Collections.emptyList(); + } else { + alertPolicies_ = null; + alertPoliciesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_AlertConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.AlertConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig build() { + com.google.cloud.retail.v2alpha.AlertConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig buildPartial() { + com.google.cloud.retail.v2alpha.AlertConfig result = + new com.google.cloud.retail.v2alpha.AlertConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.retail.v2alpha.AlertConfig result) { + if (alertPoliciesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + alertPolicies_ = java.util.Collections.unmodifiableList(alertPolicies_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.alertPolicies_ = alertPolicies_; + } else { + result.alertPolicies_ = alertPoliciesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.AlertConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.AlertConfig) { + return mergeFrom((com.google.cloud.retail.v2alpha.AlertConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.AlertConfig other) { + if (other == com.google.cloud.retail.v2alpha.AlertConfig.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (alertPoliciesBuilder_ == null) { + if (!other.alertPolicies_.isEmpty()) { + if (alertPolicies_.isEmpty()) { + alertPolicies_ = other.alertPolicies_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAlertPoliciesIsMutable(); + alertPolicies_.addAll(other.alertPolicies_); + } + onChanged(); + } + } else { + if (!other.alertPolicies_.isEmpty()) { + if (alertPoliciesBuilder_.isEmpty()) { + alertPoliciesBuilder_.dispose(); + alertPoliciesBuilder_ = null; + alertPolicies_ = other.alertPolicies_; + bitField0_ = (bitField0_ & ~0x00000002); + alertPoliciesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAlertPoliciesFieldBuilder() + : null; + } else { + alertPoliciesBuilder_.addAllMessages(other.alertPolicies_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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: + { + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy m = + input.readMessage( + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.parser(), + extensionRegistry); + if (alertPoliciesBuilder_ == null) { + ensureAlertPoliciesIsMutable(); + alertPolicies_.add(m); + } else { + alertPoliciesBuilder_.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 name_ = ""; + /** + * + * + *
+     * Required. Immutable. The name of the AlertConfig singleton resource.
+     * Format: projects/*/alertConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Immutable. The name of the AlertConfig singleton resource.
+     * Format: projects/*/alertConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Immutable. The name of the AlertConfig singleton resource.
+     * Format: projects/*/alertConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The name of the AlertConfig singleton resource.
+     * Format: projects/*/alertConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The name of the AlertConfig singleton resource.
+     * Format: projects/*/alertConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List alertPolicies_ = + java.util.Collections.emptyList(); + + private void ensureAlertPoliciesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + alertPolicies_ = + new java.util.ArrayList( + alertPolicies_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Builder, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicyOrBuilder> + alertPoliciesBuilder_; + + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public java.util.List + getAlertPoliciesList() { + if (alertPoliciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(alertPolicies_); + } else { + return alertPoliciesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public int getAlertPoliciesCount() { + if (alertPoliciesBuilder_ == null) { + return alertPolicies_.size(); + } else { + return alertPoliciesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy getAlertPolicies(int index) { + if (alertPoliciesBuilder_ == null) { + return alertPolicies_.get(index); + } else { + return alertPoliciesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public Builder setAlertPolicies( + int index, com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy value) { + if (alertPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAlertPoliciesIsMutable(); + alertPolicies_.set(index, value); + onChanged(); + } else { + alertPoliciesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public Builder setAlertPolicies( + int index, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Builder builderForValue) { + if (alertPoliciesBuilder_ == null) { + ensureAlertPoliciesIsMutable(); + alertPolicies_.set(index, builderForValue.build()); + onChanged(); + } else { + alertPoliciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public Builder addAlertPolicies(com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy value) { + if (alertPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAlertPoliciesIsMutable(); + alertPolicies_.add(value); + onChanged(); + } else { + alertPoliciesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public Builder addAlertPolicies( + int index, com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy value) { + if (alertPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAlertPoliciesIsMutable(); + alertPolicies_.add(index, value); + onChanged(); + } else { + alertPoliciesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public Builder addAlertPolicies( + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Builder builderForValue) { + if (alertPoliciesBuilder_ == null) { + ensureAlertPoliciesIsMutable(); + alertPolicies_.add(builderForValue.build()); + onChanged(); + } else { + alertPoliciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public Builder addAlertPolicies( + int index, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Builder builderForValue) { + if (alertPoliciesBuilder_ == null) { + ensureAlertPoliciesIsMutable(); + alertPolicies_.add(index, builderForValue.build()); + onChanged(); + } else { + alertPoliciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public Builder addAllAlertPolicies( + java.lang.Iterable + values) { + if (alertPoliciesBuilder_ == null) { + ensureAlertPoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, alertPolicies_); + onChanged(); + } else { + alertPoliciesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public Builder clearAlertPolicies() { + if (alertPoliciesBuilder_ == null) { + alertPolicies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + alertPoliciesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public Builder removeAlertPolicies(int index) { + if (alertPoliciesBuilder_ == null) { + ensureAlertPoliciesIsMutable(); + alertPolicies_.remove(index); + onChanged(); + } else { + alertPoliciesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Builder getAlertPoliciesBuilder( + int index) { + return getAlertPoliciesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicyOrBuilder + getAlertPoliciesOrBuilder(int index) { + if (alertPoliciesBuilder_ == null) { + return alertPolicies_.get(index); + } else { + return alertPoliciesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicyOrBuilder> + getAlertPoliciesOrBuilderList() { + if (alertPoliciesBuilder_ != null) { + return alertPoliciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(alertPolicies_); + } + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Builder + addAlertPoliciesBuilder() { + return getAlertPoliciesFieldBuilder() + .addBuilder(com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Builder addAlertPoliciesBuilder( + int index) { + return getAlertPoliciesFieldBuilder() + .addBuilder( + index, com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * Alert policies for a customer.
+     * They must be unique by [AlertPolicy.alert_group]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + * + */ + public java.util.List + getAlertPoliciesBuilderList() { + return getAlertPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Builder, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicyOrBuilder> + getAlertPoliciesFieldBuilder() { + if (alertPoliciesBuilder_ == null) { + alertPoliciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy.Builder, + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicyOrBuilder>( + alertPolicies_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + alertPolicies_ = null; + } + return alertPoliciesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.AlertConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.AlertConfig) + private static final com.google.cloud.retail.v2alpha.AlertConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.AlertConfig(); + } + + public static com.google.cloud.retail.v2alpha.AlertConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AlertConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.AlertConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AlertConfigName.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AlertConfigName.java new file mode 100644 index 000000000000..2dabd1ca2097 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AlertConfigName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +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 AlertConfigName implements ResourceName { + private static final PathTemplate PROJECT = + PathTemplate.createWithoutUrlEncoding("projects/{project}/alertConfig"); + private volatile Map fieldValuesMap; + private final String project; + + @Deprecated + protected AlertConfigName() { + project = null; + } + + private AlertConfigName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AlertConfigName of(String project) { + return newBuilder().setProject(project).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + public static AlertConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT.validatedMatch( + formattedString, "AlertConfigName.parse: formattedString not in valid format"); + return of(matchMap.get("project")); + } + + 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 (AlertConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT.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); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT.instantiate("project", project); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AlertConfigName that = ((AlertConfigName) o); + return Objects.equals(this.project, that.project); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** Builder for projects/{project}/alertConfig. */ + public static class Builder { + private String project; + + protected Builder() {} + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder(AlertConfigName alertConfigName) { + this.project = alertConfigName.project; + } + + public AlertConfigName build() { + return new AlertConfigName(this); + } + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AlertConfigOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AlertConfigOrBuilder.java new file mode 100644 index 000000000000..6a4051d3402f --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AlertConfigOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface AlertConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.AlertConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Immutable. The name of the AlertConfig singleton resource.
+   * Format: projects/*/alertConfig
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Immutable. The name of the AlertConfig singleton resource.
+   * Format: projects/*/alertConfig
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Alert policies for a customer.
+   * They must be unique by [AlertPolicy.alert_group]
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + */ + java.util.List getAlertPoliciesList(); + /** + * + * + *
+   * Alert policies for a customer.
+   * They must be unique by [AlertPolicy.alert_group]
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + */ + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicy getAlertPolicies(int index); + /** + * + * + *
+   * Alert policies for a customer.
+   * They must be unique by [AlertPolicy.alert_group]
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + */ + int getAlertPoliciesCount(); + /** + * + * + *
+   * Alert policies for a customer.
+   * They must be unique by [AlertPolicy.alert_group]
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + */ + java.util.List + getAlertPoliciesOrBuilderList(); + /** + * + * + *
+   * Alert policies for a customer.
+   * They must be unique by [AlertPolicy.alert_group]
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.AlertConfig.AlertPolicy alert_policies = 2; + */ + com.google.cloud.retail.v2alpha.AlertConfig.AlertPolicyOrBuilder getAlertPoliciesOrBuilder( + int index); +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Branch.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Branch.java new file mode 100644 index 000000000000..30ad4bae7591 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Branch.java @@ -0,0 +1,6965 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/branch.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * A data branch that stores [Product][google.cloud.retail.v2alpha.Product]s.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.Branch} + */ +public final class Branch extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.Branch) + BranchOrBuilder { + private static final long serialVersionUID = 0L; + // Use Branch.newBuilder() to construct. + private Branch(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Branch() { + name_ = ""; + displayName_ = ""; + productCountStats_ = java.util.Collections.emptyList(); + qualityMetrics_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Branch(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Branch.class, + com.google.cloud.retail.v2alpha.Branch.Builder.class); + } + + public interface ProductCountStatisticOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.Branch.ProductCountStatistic) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * [ProductCountScope] of the [counts].
+     * 
+ * + * .google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope scope = 1; + * + * + * @return The enum numeric value on the wire for scope. + */ + int getScopeValue(); + /** + * + * + *
+     * [ProductCountScope] of the [counts].
+     * 
+ * + * .google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope scope = 1; + * + * + * @return The scope. + */ + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope getScope(); + + /** + * + * + *
+     * The number of products in
+     * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+     * broken down into different groups.
+     *
+     * The key is a group representing a set of products, and the value is the
+     * number of products in that group.
+     * Note: keys in this map may change over time.
+     *
+     * Possible keys:
+     * * "primary-in-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "primary-out-of-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "primary-preorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "primary-backorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "variant-in-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "variant-out-of-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "variant-preorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "variant-backorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "price-discounted", products have [Product.price_info.price] <
+     * [Product.price_info.original_price].
+     * 
+ * + * map<string, int64> counts = 2; + */ + int getCountsCount(); + /** + * + * + *
+     * The number of products in
+     * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+     * broken down into different groups.
+     *
+     * The key is a group representing a set of products, and the value is the
+     * number of products in that group.
+     * Note: keys in this map may change over time.
+     *
+     * Possible keys:
+     * * "primary-in-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "primary-out-of-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "primary-preorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "primary-backorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "variant-in-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "variant-out-of-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "variant-preorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "variant-backorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "price-discounted", products have [Product.price_info.price] <
+     * [Product.price_info.original_price].
+     * 
+ * + * map<string, int64> counts = 2; + */ + boolean containsCounts(java.lang.String key); + /** Use {@link #getCountsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getCounts(); + /** + * + * + *
+     * The number of products in
+     * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+     * broken down into different groups.
+     *
+     * The key is a group representing a set of products, and the value is the
+     * number of products in that group.
+     * Note: keys in this map may change over time.
+     *
+     * Possible keys:
+     * * "primary-in-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "primary-out-of-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "primary-preorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "primary-backorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "variant-in-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "variant-out-of-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "variant-preorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "variant-backorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "price-discounted", products have [Product.price_info.price] <
+     * [Product.price_info.original_price].
+     * 
+ * + * map<string, int64> counts = 2; + */ + java.util.Map getCountsMap(); + /** + * + * + *
+     * The number of products in
+     * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+     * broken down into different groups.
+     *
+     * The key is a group representing a set of products, and the value is the
+     * number of products in that group.
+     * Note: keys in this map may change over time.
+     *
+     * Possible keys:
+     * * "primary-in-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "primary-out-of-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "primary-preorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "primary-backorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "variant-in-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "variant-out-of-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "variant-preorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "variant-backorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "price-discounted", products have [Product.price_info.price] <
+     * [Product.price_info.original_price].
+     * 
+ * + * map<string, int64> counts = 2; + */ + long getCountsOrDefault(java.lang.String key, long defaultValue); + /** + * + * + *
+     * The number of products in
+     * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+     * broken down into different groups.
+     *
+     * The key is a group representing a set of products, and the value is the
+     * number of products in that group.
+     * Note: keys in this map may change over time.
+     *
+     * Possible keys:
+     * * "primary-in-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "primary-out-of-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "primary-preorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "primary-backorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "variant-in-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "variant-out-of-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "variant-preorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "variant-backorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "price-discounted", products have [Product.price_info.price] <
+     * [Product.price_info.original_price].
+     * 
+ * + * map<string, int64> counts = 2; + */ + long getCountsOrThrow(java.lang.String key); + } + /** + * + * + *
+   * A statistic about the number of products in a branch.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.Branch.ProductCountStatistic} + */ + public static final class ProductCountStatistic extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.Branch.ProductCountStatistic) + ProductCountStatisticOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProductCountStatistic.newBuilder() to construct. + private ProductCountStatistic(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProductCountStatistic() { + scope_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProductCountStatistic(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetCounts(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.class, + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.Builder.class); + } + + /** + * + * + *
+     * Scope of what products are included for this count.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope} + */ + public enum ProductCountScope implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Default value for enum. This value is not used in the API response.
+       * 
+ * + * PRODUCT_COUNT_SCOPE_UNSPECIFIED = 0; + */ + PRODUCT_COUNT_SCOPE_UNSPECIFIED(0), + /** + * + * + *
+       * Scope for all existing products in the branch. Useful for understanding
+       * how many products there are in a branch.
+       * 
+ * + * ALL_PRODUCTS = 1; + */ + ALL_PRODUCTS(1), + /** + * + * + *
+       * Scope for products created or updated in the last 24 hours.
+       * 
+ * + * LAST_24_HOUR_UPDATE = 2; + */ + LAST_24_HOUR_UPDATE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Default value for enum. This value is not used in the API response.
+       * 
+ * + * PRODUCT_COUNT_SCOPE_UNSPECIFIED = 0; + */ + public static final int PRODUCT_COUNT_SCOPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Scope for all existing products in the branch. Useful for understanding
+       * how many products there are in a branch.
+       * 
+ * + * ALL_PRODUCTS = 1; + */ + public static final int ALL_PRODUCTS_VALUE = 1; + /** + * + * + *
+       * Scope for products created or updated in the last 24 hours.
+       * 
+ * + * LAST_24_HOUR_UPDATE = 2; + */ + public static final int LAST_24_HOUR_UPDATE_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 ProductCountScope 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 ProductCountScope forNumber(int value) { + switch (value) { + case 0: + return PRODUCT_COUNT_SCOPE_UNSPECIFIED; + case 1: + return ALL_PRODUCTS; + case 2: + return LAST_24_HOUR_UPDATE; + 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 ProductCountScope findValueByNumber(int number) { + return ProductCountScope.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ProductCountScope[] VALUES = values(); + + public static ProductCountScope 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 ProductCountScope(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope) + } + + public static final int SCOPE_FIELD_NUMBER = 1; + private int scope_ = 0; + /** + * + * + *
+     * [ProductCountScope] of the [counts].
+     * 
+ * + * .google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope scope = 1; + * + * + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override + public int getScopeValue() { + return scope_; + } + /** + * + * + *
+     * [ProductCountScope] of the [counts].
+     * 
+ * + * .google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope scope = 1; + * + * + * @return The scope. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope + getScope() { + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope result = + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope.forNumber( + scope_); + return result == null + ? com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope + .UNRECOGNIZED + : result; + } + + public static final int COUNTS_FIELD_NUMBER = 2; + + private static final class CountsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_CountsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT64, + 0L); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField counts_; + + private com.google.protobuf.MapField internalGetCounts() { + if (counts_ == null) { + return com.google.protobuf.MapField.emptyMapField(CountsDefaultEntryHolder.defaultEntry); + } + return counts_; + } + + public int getCountsCount() { + return internalGetCounts().getMap().size(); + } + /** + * + * + *
+     * The number of products in
+     * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+     * broken down into different groups.
+     *
+     * The key is a group representing a set of products, and the value is the
+     * number of products in that group.
+     * Note: keys in this map may change over time.
+     *
+     * Possible keys:
+     * * "primary-in-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "primary-out-of-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "primary-preorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "primary-backorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "variant-in-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "variant-out-of-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "variant-preorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "variant-backorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "price-discounted", products have [Product.price_info.price] <
+     * [Product.price_info.original_price].
+     * 
+ * + * map<string, int64> counts = 2; + */ + @java.lang.Override + public boolean containsCounts(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetCounts().getMap().containsKey(key); + } + /** Use {@link #getCountsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCounts() { + return getCountsMap(); + } + /** + * + * + *
+     * The number of products in
+     * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+     * broken down into different groups.
+     *
+     * The key is a group representing a set of products, and the value is the
+     * number of products in that group.
+     * Note: keys in this map may change over time.
+     *
+     * Possible keys:
+     * * "primary-in-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "primary-out-of-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "primary-preorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "primary-backorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "variant-in-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "variant-out-of-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "variant-preorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "variant-backorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "price-discounted", products have [Product.price_info.price] <
+     * [Product.price_info.original_price].
+     * 
+ * + * map<string, int64> counts = 2; + */ + @java.lang.Override + public java.util.Map getCountsMap() { + return internalGetCounts().getMap(); + } + /** + * + * + *
+     * The number of products in
+     * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+     * broken down into different groups.
+     *
+     * The key is a group representing a set of products, and the value is the
+     * number of products in that group.
+     * Note: keys in this map may change over time.
+     *
+     * Possible keys:
+     * * "primary-in-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "primary-out-of-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "primary-preorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "primary-backorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "variant-in-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "variant-out-of-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "variant-preorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "variant-backorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "price-discounted", products have [Product.price_info.price] <
+     * [Product.price_info.original_price].
+     * 
+ * + * map<string, int64> counts = 2; + */ + @java.lang.Override + public long getCountsOrDefault(java.lang.String key, long defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCounts().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The number of products in
+     * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+     * broken down into different groups.
+     *
+     * The key is a group representing a set of products, and the value is the
+     * number of products in that group.
+     * Note: keys in this map may change over time.
+     *
+     * Possible keys:
+     * * "primary-in-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "primary-out-of-stock", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "primary-preorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "primary-backorder", products have
+     * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "variant-in-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+     * availability.
+     *
+     * * "variant-out-of-stock", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+     * availability.
+     *
+     * * "variant-preorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+     * availability.
+     *
+     * * "variant-backorder", products have
+     * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+     * type and
+     * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+     * availability.
+     *
+     * * "price-discounted", products have [Product.price_info.price] <
+     * [Product.price_info.original_price].
+     * 
+ * + * map<string, int64> counts = 2; + */ + @java.lang.Override + public long getCountsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCounts().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 { + if (scope_ + != com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope + .PRODUCT_COUNT_SCOPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, scope_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetCounts(), CountsDefaultEntryHolder.defaultEntry, 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (scope_ + != com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope + .PRODUCT_COUNT_SCOPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, scope_); + } + for (java.util.Map.Entry entry : + internalGetCounts().getMap().entrySet()) { + com.google.protobuf.MapEntry counts__ = + CountsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, counts__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2alpha.Branch.ProductCountStatistic)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic other = + (com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic) obj; + + if (scope_ != other.scope_) return false; + if (!internalGetCounts().equals(other.internalGetCounts())) 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) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + scope_; + if (!internalGetCounts().getMap().isEmpty()) { + hash = (37 * hash) + COUNTS_FIELD_NUMBER; + hash = (53 * hash) + internalGetCounts().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.Branch.ProductCountStatistic prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A statistic about the number of products in a branch.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.Branch.ProductCountStatistic} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.Branch.ProductCountStatistic) + com.google.cloud.retail.v2alpha.Branch.ProductCountStatisticOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetCounts(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableCounts(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.class, + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + scope_ = 0; + internalGetMutableCounts().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic build() { + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic buildPartial() { + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic result = + new com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.scope_ = scope_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.counts_ = internalGetCounts(); + result.counts_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic) { + return mergeFrom((com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic other) { + if (other + == com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.getDefaultInstance()) + return this; + if (other.scope_ != 0) { + setScopeValue(other.getScopeValue()); + } + internalGetMutableCounts().mergeFrom(other.internalGetCounts()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + scope_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + com.google.protobuf.MapEntry counts__ = + input.readMessage( + CountsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableCounts() + .getMutableMap() + .put(counts__.getKey(), counts__.getValue()); + 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 scope_ = 0; + /** + * + * + *
+       * [ProductCountScope] of the [counts].
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope scope = 1; + * + * + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override + public int getScopeValue() { + return scope_; + } + /** + * + * + *
+       * [ProductCountScope] of the [counts].
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope scope = 1; + * + * + * @param value The enum numeric value on the wire for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeValue(int value) { + scope_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * [ProductCountScope] of the [counts].
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope scope = 1; + * + * + * @return The scope. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope + getScope() { + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope result = + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope + .forNumber(scope_); + return result == null + ? com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * [ProductCountScope] of the [counts].
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope scope = 1; + * + * + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope( + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + scope_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * [ProductCountScope] of the [counts].
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope scope = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearScope() { + bitField0_ = (bitField0_ & ~0x00000001); + scope_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField counts_; + + private com.google.protobuf.MapField internalGetCounts() { + if (counts_ == null) { + return com.google.protobuf.MapField.emptyMapField(CountsDefaultEntryHolder.defaultEntry); + } + return counts_; + } + + private com.google.protobuf.MapField + internalGetMutableCounts() { + if (counts_ == null) { + counts_ = com.google.protobuf.MapField.newMapField(CountsDefaultEntryHolder.defaultEntry); + } + if (!counts_.isMutable()) { + counts_ = counts_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return counts_; + } + + public int getCountsCount() { + return internalGetCounts().getMap().size(); + } + /** + * + * + *
+       * The number of products in
+       * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+       * broken down into different groups.
+       *
+       * The key is a group representing a set of products, and the value is the
+       * number of products in that group.
+       * Note: keys in this map may change over time.
+       *
+       * Possible keys:
+       * * "primary-in-stock", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+       * availability.
+       *
+       * * "primary-out-of-stock", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+       * availability.
+       *
+       * * "primary-preorder", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+       * availability.
+       *
+       * * "primary-backorder", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+       * availability.
+       *
+       * * "variant-in-stock", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+       * availability.
+       *
+       * * "variant-out-of-stock", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+       * availability.
+       *
+       * * "variant-preorder", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+       * availability.
+       *
+       * * "variant-backorder", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+       * availability.
+       *
+       * * "price-discounted", products have [Product.price_info.price] <
+       * [Product.price_info.original_price].
+       * 
+ * + * map<string, int64> counts = 2; + */ + @java.lang.Override + public boolean containsCounts(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetCounts().getMap().containsKey(key); + } + /** Use {@link #getCountsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCounts() { + return getCountsMap(); + } + /** + * + * + *
+       * The number of products in
+       * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+       * broken down into different groups.
+       *
+       * The key is a group representing a set of products, and the value is the
+       * number of products in that group.
+       * Note: keys in this map may change over time.
+       *
+       * Possible keys:
+       * * "primary-in-stock", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+       * availability.
+       *
+       * * "primary-out-of-stock", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+       * availability.
+       *
+       * * "primary-preorder", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+       * availability.
+       *
+       * * "primary-backorder", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+       * availability.
+       *
+       * * "variant-in-stock", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+       * availability.
+       *
+       * * "variant-out-of-stock", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+       * availability.
+       *
+       * * "variant-preorder", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+       * availability.
+       *
+       * * "variant-backorder", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+       * availability.
+       *
+       * * "price-discounted", products have [Product.price_info.price] <
+       * [Product.price_info.original_price].
+       * 
+ * + * map<string, int64> counts = 2; + */ + @java.lang.Override + public java.util.Map getCountsMap() { + return internalGetCounts().getMap(); + } + /** + * + * + *
+       * The number of products in
+       * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+       * broken down into different groups.
+       *
+       * The key is a group representing a set of products, and the value is the
+       * number of products in that group.
+       * Note: keys in this map may change over time.
+       *
+       * Possible keys:
+       * * "primary-in-stock", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+       * availability.
+       *
+       * * "primary-out-of-stock", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+       * availability.
+       *
+       * * "primary-preorder", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+       * availability.
+       *
+       * * "primary-backorder", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+       * availability.
+       *
+       * * "variant-in-stock", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+       * availability.
+       *
+       * * "variant-out-of-stock", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+       * availability.
+       *
+       * * "variant-preorder", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+       * availability.
+       *
+       * * "variant-backorder", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+       * availability.
+       *
+       * * "price-discounted", products have [Product.price_info.price] <
+       * [Product.price_info.original_price].
+       * 
+ * + * map<string, int64> counts = 2; + */ + @java.lang.Override + public long getCountsOrDefault(java.lang.String key, long defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCounts().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+       * The number of products in
+       * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+       * broken down into different groups.
+       *
+       * The key is a group representing a set of products, and the value is the
+       * number of products in that group.
+       * Note: keys in this map may change over time.
+       *
+       * Possible keys:
+       * * "primary-in-stock", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+       * availability.
+       *
+       * * "primary-out-of-stock", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+       * availability.
+       *
+       * * "primary-preorder", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+       * availability.
+       *
+       * * "primary-backorder", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+       * availability.
+       *
+       * * "variant-in-stock", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+       * availability.
+       *
+       * * "variant-out-of-stock", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+       * availability.
+       *
+       * * "variant-preorder", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+       * availability.
+       *
+       * * "variant-backorder", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+       * availability.
+       *
+       * * "price-discounted", products have [Product.price_info.price] <
+       * [Product.price_info.original_price].
+       * 
+ * + * map<string, int64> counts = 2; + */ + @java.lang.Override + public long getCountsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCounts().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearCounts() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableCounts().getMutableMap().clear(); + return this; + } + /** + * + * + *
+       * The number of products in
+       * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+       * broken down into different groups.
+       *
+       * The key is a group representing a set of products, and the value is the
+       * number of products in that group.
+       * Note: keys in this map may change over time.
+       *
+       * Possible keys:
+       * * "primary-in-stock", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+       * availability.
+       *
+       * * "primary-out-of-stock", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+       * availability.
+       *
+       * * "primary-preorder", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+       * availability.
+       *
+       * * "primary-backorder", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+       * availability.
+       *
+       * * "variant-in-stock", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+       * availability.
+       *
+       * * "variant-out-of-stock", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+       * availability.
+       *
+       * * "variant-preorder", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+       * availability.
+       *
+       * * "variant-backorder", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+       * availability.
+       *
+       * * "price-discounted", products have [Product.price_info.price] <
+       * [Product.price_info.original_price].
+       * 
+ * + * map<string, int64> counts = 2; + */ + public Builder removeCounts(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableCounts().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableCounts() { + bitField0_ |= 0x00000002; + return internalGetMutableCounts().getMutableMap(); + } + /** + * + * + *
+       * The number of products in
+       * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+       * broken down into different groups.
+       *
+       * The key is a group representing a set of products, and the value is the
+       * number of products in that group.
+       * Note: keys in this map may change over time.
+       *
+       * Possible keys:
+       * * "primary-in-stock", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+       * availability.
+       *
+       * * "primary-out-of-stock", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+       * availability.
+       *
+       * * "primary-preorder", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+       * availability.
+       *
+       * * "primary-backorder", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+       * availability.
+       *
+       * * "variant-in-stock", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+       * availability.
+       *
+       * * "variant-out-of-stock", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+       * availability.
+       *
+       * * "variant-preorder", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+       * availability.
+       *
+       * * "variant-backorder", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+       * availability.
+       *
+       * * "price-discounted", products have [Product.price_info.price] <
+       * [Product.price_info.original_price].
+       * 
+ * + * map<string, int64> counts = 2; + */ + public Builder putCounts(java.lang.String key, long value) { + if (key == null) { + throw new NullPointerException("map key"); + } + + internalGetMutableCounts().getMutableMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * + * + *
+       * The number of products in
+       * [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope]
+       * broken down into different groups.
+       *
+       * The key is a group representing a set of products, and the value is the
+       * number of products in that group.
+       * Note: keys in this map may change over time.
+       *
+       * Possible keys:
+       * * "primary-in-stock", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+       * availability.
+       *
+       * * "primary-out-of-stock", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+       * availability.
+       *
+       * * "primary-preorder", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+       * availability.
+       *
+       * * "primary-backorder", products have
+       * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]
+       * type and
+       * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+       * availability.
+       *
+       * * "variant-in-stock", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK]
+       * availability.
+       *
+       * * "variant-out-of-stock", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK]
+       * availability.
+       *
+       * * "variant-preorder", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER]
+       * availability.
+       *
+       * * "variant-backorder", products have
+       * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]
+       * type and
+       * [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER]
+       * availability.
+       *
+       * * "price-discounted", products have [Product.price_info.price] <
+       * [Product.price_info.original_price].
+       * 
+ * + * map<string, int64> counts = 2; + */ + public Builder putAllCounts(java.util.Map values) { + internalGetMutableCounts().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.Branch.ProductCountStatistic) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.Branch.ProductCountStatistic) + private static final com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic(); + } + + public static com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductCountStatistic parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.Branch.ProductCountStatistic + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface QualityMetricOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.Branch.QualityMetric) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The key that represents a quality requirement rule.
+     *
+     * Supported keys:
+     * * "has-valid-uri": product has a valid and accessible
+     * [uri][google.cloud.retail.v2alpha.Product.uri].
+     *
+     * * "available-expire-time-conformance":
+     * [Product.available_time][google.cloud.retail.v2alpha.Product.available_time]
+     * is early than "now", and
+     * [Product.expire_time][google.cloud.retail.v2alpha.Product.expire_time] is
+     * greater than "now".
+     *
+     * * "has-searchable-attributes": product has at least one
+     * [attribute][google.cloud.retail.v2alpha.Product.attributes] set to
+     * searchable.
+     *
+     * * "has-description": product has non-empty
+     * [description][google.cloud.retail.v2alpha.Product.description].
+     *
+     * * "has-at-least-bigram-title": Product
+     * [title][google.cloud.retail.v2alpha.Product.title] has at least two
+     * words. A comprehensive title helps to improve search quality.
+     *
+     * * "variant-has-image": the
+     * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+     * at least one [image][google.cloud.retail.v2alpha.Product.images]. You may
+     * ignore this metric if all your products are at
+     * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+     *
+     * * "variant-has-price-info": the
+     * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+     * [price_info][google.cloud.retail.v2alpha.Product.price_info] set. You may
+     * ignore this metric if all your products are at
+     * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+     *
+     * * "has-publish-time": product has non-empty
+     * [publish_time][google.cloud.retail.v2alpha.Product.publish_time].
+     * 
+ * + * string requirement_key = 1; + * + * @return The requirementKey. + */ + java.lang.String getRequirementKey(); + /** + * + * + *
+     * The key that represents a quality requirement rule.
+     *
+     * Supported keys:
+     * * "has-valid-uri": product has a valid and accessible
+     * [uri][google.cloud.retail.v2alpha.Product.uri].
+     *
+     * * "available-expire-time-conformance":
+     * [Product.available_time][google.cloud.retail.v2alpha.Product.available_time]
+     * is early than "now", and
+     * [Product.expire_time][google.cloud.retail.v2alpha.Product.expire_time] is
+     * greater than "now".
+     *
+     * * "has-searchable-attributes": product has at least one
+     * [attribute][google.cloud.retail.v2alpha.Product.attributes] set to
+     * searchable.
+     *
+     * * "has-description": product has non-empty
+     * [description][google.cloud.retail.v2alpha.Product.description].
+     *
+     * * "has-at-least-bigram-title": Product
+     * [title][google.cloud.retail.v2alpha.Product.title] has at least two
+     * words. A comprehensive title helps to improve search quality.
+     *
+     * * "variant-has-image": the
+     * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+     * at least one [image][google.cloud.retail.v2alpha.Product.images]. You may
+     * ignore this metric if all your products are at
+     * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+     *
+     * * "variant-has-price-info": the
+     * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+     * [price_info][google.cloud.retail.v2alpha.Product.price_info] set. You may
+     * ignore this metric if all your products are at
+     * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+     *
+     * * "has-publish-time": product has non-empty
+     * [publish_time][google.cloud.retail.v2alpha.Product.publish_time].
+     * 
+ * + * string requirement_key = 1; + * + * @return The bytes for requirementKey. + */ + com.google.protobuf.ByteString getRequirementKeyBytes(); + + /** + * + * + *
+     * Number of products passing the quality requirement check. We only check
+     * searchable products.
+     * 
+ * + * int32 qualified_product_count = 2; + * + * @return The qualifiedProductCount. + */ + int getQualifiedProductCount(); + + /** + * + * + *
+     * Number of products failing the quality requirement check. We only check
+     * searchable products.
+     * 
+ * + * int32 unqualified_product_count = 3; + * + * @return The unqualifiedProductCount. + */ + int getUnqualifiedProductCount(); + + /** + * + * + *
+     * Value from 0 to 100 representing the suggested percentage of products
+     * that meet the quality requirements to get good search and recommendation
+     * performance. 100 * (qualified_product_count) /
+     * (qualified_product_count + unqualified_product_count) should be greater
+     * or equal to this suggestion.
+     * 
+ * + * double suggested_quality_percent_threshold = 4; + * + * @return The suggestedQualityPercentThreshold. + */ + double getSuggestedQualityPercentThreshold(); + + /** + * + * + *
+     * A list of a maximum of 100 sample products that do not qualify for
+     * this requirement.
+     *
+     * This field is only populated in the response to
+     * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+     * API, and is always empty for
+     * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+     *
+     * Only the following fields are set in the
+     * [Product][google.cloud.retail.v2alpha.Product].
+     *
+     * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+     * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+     * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + java.util.List getUnqualifiedSampleProductsList(); + /** + * + * + *
+     * A list of a maximum of 100 sample products that do not qualify for
+     * this requirement.
+     *
+     * This field is only populated in the response to
+     * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+     * API, and is always empty for
+     * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+     *
+     * Only the following fields are set in the
+     * [Product][google.cloud.retail.v2alpha.Product].
+     *
+     * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+     * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+     * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + com.google.cloud.retail.v2alpha.Product getUnqualifiedSampleProducts(int index); + /** + * + * + *
+     * A list of a maximum of 100 sample products that do not qualify for
+     * this requirement.
+     *
+     * This field is only populated in the response to
+     * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+     * API, and is always empty for
+     * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+     *
+     * Only the following fields are set in the
+     * [Product][google.cloud.retail.v2alpha.Product].
+     *
+     * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+     * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+     * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + int getUnqualifiedSampleProductsCount(); + /** + * + * + *
+     * A list of a maximum of 100 sample products that do not qualify for
+     * this requirement.
+     *
+     * This field is only populated in the response to
+     * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+     * API, and is always empty for
+     * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+     *
+     * Only the following fields are set in the
+     * [Product][google.cloud.retail.v2alpha.Product].
+     *
+     * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+     * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+     * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + java.util.List + getUnqualifiedSampleProductsOrBuilderList(); + /** + * + * + *
+     * A list of a maximum of 100 sample products that do not qualify for
+     * this requirement.
+     *
+     * This field is only populated in the response to
+     * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+     * API, and is always empty for
+     * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+     *
+     * Only the following fields are set in the
+     * [Product][google.cloud.retail.v2alpha.Product].
+     *
+     * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+     * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+     * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + com.google.cloud.retail.v2alpha.ProductOrBuilder getUnqualifiedSampleProductsOrBuilder( + int index); + } + /** + * + * + *
+   * Metric measured on a group of
+   * [Product][google.cloud.retail.v2alpha.Product]s against a certain quality
+   * requirement. Contains the number of products that pass the check and the
+   * number of products that don't.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.Branch.QualityMetric} + */ + public static final class QualityMetric extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.Branch.QualityMetric) + QualityMetricOrBuilder { + private static final long serialVersionUID = 0L; + // Use QualityMetric.newBuilder() to construct. + private QualityMetric(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QualityMetric() { + requirementKey_ = ""; + unqualifiedSampleProducts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QualityMetric(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_QualityMetric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_QualityMetric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Branch.QualityMetric.class, + com.google.cloud.retail.v2alpha.Branch.QualityMetric.Builder.class); + } + + public static final int REQUIREMENT_KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object requirementKey_ = ""; + /** + * + * + *
+     * The key that represents a quality requirement rule.
+     *
+     * Supported keys:
+     * * "has-valid-uri": product has a valid and accessible
+     * [uri][google.cloud.retail.v2alpha.Product.uri].
+     *
+     * * "available-expire-time-conformance":
+     * [Product.available_time][google.cloud.retail.v2alpha.Product.available_time]
+     * is early than "now", and
+     * [Product.expire_time][google.cloud.retail.v2alpha.Product.expire_time] is
+     * greater than "now".
+     *
+     * * "has-searchable-attributes": product has at least one
+     * [attribute][google.cloud.retail.v2alpha.Product.attributes] set to
+     * searchable.
+     *
+     * * "has-description": product has non-empty
+     * [description][google.cloud.retail.v2alpha.Product.description].
+     *
+     * * "has-at-least-bigram-title": Product
+     * [title][google.cloud.retail.v2alpha.Product.title] has at least two
+     * words. A comprehensive title helps to improve search quality.
+     *
+     * * "variant-has-image": the
+     * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+     * at least one [image][google.cloud.retail.v2alpha.Product.images]. You may
+     * ignore this metric if all your products are at
+     * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+     *
+     * * "variant-has-price-info": the
+     * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+     * [price_info][google.cloud.retail.v2alpha.Product.price_info] set. You may
+     * ignore this metric if all your products are at
+     * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+     *
+     * * "has-publish-time": product has non-empty
+     * [publish_time][google.cloud.retail.v2alpha.Product.publish_time].
+     * 
+ * + * string requirement_key = 1; + * + * @return The requirementKey. + */ + @java.lang.Override + public java.lang.String getRequirementKey() { + java.lang.Object ref = requirementKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requirementKey_ = s; + return s; + } + } + /** + * + * + *
+     * The key that represents a quality requirement rule.
+     *
+     * Supported keys:
+     * * "has-valid-uri": product has a valid and accessible
+     * [uri][google.cloud.retail.v2alpha.Product.uri].
+     *
+     * * "available-expire-time-conformance":
+     * [Product.available_time][google.cloud.retail.v2alpha.Product.available_time]
+     * is early than "now", and
+     * [Product.expire_time][google.cloud.retail.v2alpha.Product.expire_time] is
+     * greater than "now".
+     *
+     * * "has-searchable-attributes": product has at least one
+     * [attribute][google.cloud.retail.v2alpha.Product.attributes] set to
+     * searchable.
+     *
+     * * "has-description": product has non-empty
+     * [description][google.cloud.retail.v2alpha.Product.description].
+     *
+     * * "has-at-least-bigram-title": Product
+     * [title][google.cloud.retail.v2alpha.Product.title] has at least two
+     * words. A comprehensive title helps to improve search quality.
+     *
+     * * "variant-has-image": the
+     * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+     * at least one [image][google.cloud.retail.v2alpha.Product.images]. You may
+     * ignore this metric if all your products are at
+     * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+     *
+     * * "variant-has-price-info": the
+     * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+     * [price_info][google.cloud.retail.v2alpha.Product.price_info] set. You may
+     * ignore this metric if all your products are at
+     * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+     *
+     * * "has-publish-time": product has non-empty
+     * [publish_time][google.cloud.retail.v2alpha.Product.publish_time].
+     * 
+ * + * string requirement_key = 1; + * + * @return The bytes for requirementKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequirementKeyBytes() { + java.lang.Object ref = requirementKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requirementKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUALIFIED_PRODUCT_COUNT_FIELD_NUMBER = 2; + private int qualifiedProductCount_ = 0; + /** + * + * + *
+     * Number of products passing the quality requirement check. We only check
+     * searchable products.
+     * 
+ * + * int32 qualified_product_count = 2; + * + * @return The qualifiedProductCount. + */ + @java.lang.Override + public int getQualifiedProductCount() { + return qualifiedProductCount_; + } + + public static final int UNQUALIFIED_PRODUCT_COUNT_FIELD_NUMBER = 3; + private int unqualifiedProductCount_ = 0; + /** + * + * + *
+     * Number of products failing the quality requirement check. We only check
+     * searchable products.
+     * 
+ * + * int32 unqualified_product_count = 3; + * + * @return The unqualifiedProductCount. + */ + @java.lang.Override + public int getUnqualifiedProductCount() { + return unqualifiedProductCount_; + } + + public static final int SUGGESTED_QUALITY_PERCENT_THRESHOLD_FIELD_NUMBER = 4; + private double suggestedQualityPercentThreshold_ = 0D; + /** + * + * + *
+     * Value from 0 to 100 representing the suggested percentage of products
+     * that meet the quality requirements to get good search and recommendation
+     * performance. 100 * (qualified_product_count) /
+     * (qualified_product_count + unqualified_product_count) should be greater
+     * or equal to this suggestion.
+     * 
+ * + * double suggested_quality_percent_threshold = 4; + * + * @return The suggestedQualityPercentThreshold. + */ + @java.lang.Override + public double getSuggestedQualityPercentThreshold() { + return suggestedQualityPercentThreshold_; + } + + public static final int UNQUALIFIED_SAMPLE_PRODUCTS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List unqualifiedSampleProducts_; + /** + * + * + *
+     * A list of a maximum of 100 sample products that do not qualify for
+     * this requirement.
+     *
+     * This field is only populated in the response to
+     * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+     * API, and is always empty for
+     * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+     *
+     * Only the following fields are set in the
+     * [Product][google.cloud.retail.v2alpha.Product].
+     *
+     * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+     * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+     * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + @java.lang.Override + public java.util.List + getUnqualifiedSampleProductsList() { + return unqualifiedSampleProducts_; + } + /** + * + * + *
+     * A list of a maximum of 100 sample products that do not qualify for
+     * this requirement.
+     *
+     * This field is only populated in the response to
+     * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+     * API, and is always empty for
+     * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+     *
+     * Only the following fields are set in the
+     * [Product][google.cloud.retail.v2alpha.Product].
+     *
+     * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+     * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+     * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + @java.lang.Override + public java.util.List + getUnqualifiedSampleProductsOrBuilderList() { + return unqualifiedSampleProducts_; + } + /** + * + * + *
+     * A list of a maximum of 100 sample products that do not qualify for
+     * this requirement.
+     *
+     * This field is only populated in the response to
+     * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+     * API, and is always empty for
+     * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+     *
+     * Only the following fields are set in the
+     * [Product][google.cloud.retail.v2alpha.Product].
+     *
+     * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+     * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+     * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + @java.lang.Override + public int getUnqualifiedSampleProductsCount() { + return unqualifiedSampleProducts_.size(); + } + /** + * + * + *
+     * A list of a maximum of 100 sample products that do not qualify for
+     * this requirement.
+     *
+     * This field is only populated in the response to
+     * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+     * API, and is always empty for
+     * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+     *
+     * Only the following fields are set in the
+     * [Product][google.cloud.retail.v2alpha.Product].
+     *
+     * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+     * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+     * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Product getUnqualifiedSampleProducts(int index) { + return unqualifiedSampleProducts_.get(index); + } + /** + * + * + *
+     * A list of a maximum of 100 sample products that do not qualify for
+     * this requirement.
+     *
+     * This field is only populated in the response to
+     * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+     * API, and is always empty for
+     * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+     *
+     * Only the following fields are set in the
+     * [Product][google.cloud.retail.v2alpha.Product].
+     *
+     * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+     * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+     * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.ProductOrBuilder getUnqualifiedSampleProductsOrBuilder( + int index) { + return unqualifiedSampleProducts_.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.GeneratedMessageV3.isStringEmpty(requirementKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, requirementKey_); + } + if (qualifiedProductCount_ != 0) { + output.writeInt32(2, qualifiedProductCount_); + } + if (unqualifiedProductCount_ != 0) { + output.writeInt32(3, unqualifiedProductCount_); + } + if (java.lang.Double.doubleToRawLongBits(suggestedQualityPercentThreshold_) != 0) { + output.writeDouble(4, suggestedQualityPercentThreshold_); + } + for (int i = 0; i < unqualifiedSampleProducts_.size(); i++) { + output.writeMessage(5, unqualifiedSampleProducts_.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.GeneratedMessageV3.isStringEmpty(requirementKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, requirementKey_); + } + if (qualifiedProductCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, qualifiedProductCount_); + } + if (unqualifiedProductCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, unqualifiedProductCount_); + } + if (java.lang.Double.doubleToRawLongBits(suggestedQualityPercentThreshold_) != 0) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 4, suggestedQualityPercentThreshold_); + } + for (int i = 0; i < unqualifiedSampleProducts_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, unqualifiedSampleProducts_.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.retail.v2alpha.Branch.QualityMetric)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.Branch.QualityMetric other = + (com.google.cloud.retail.v2alpha.Branch.QualityMetric) obj; + + if (!getRequirementKey().equals(other.getRequirementKey())) return false; + if (getQualifiedProductCount() != other.getQualifiedProductCount()) return false; + if (getUnqualifiedProductCount() != other.getUnqualifiedProductCount()) return false; + if (java.lang.Double.doubleToLongBits(getSuggestedQualityPercentThreshold()) + != java.lang.Double.doubleToLongBits(other.getSuggestedQualityPercentThreshold())) + return false; + if (!getUnqualifiedSampleProductsList().equals(other.getUnqualifiedSampleProductsList())) + 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) + REQUIREMENT_KEY_FIELD_NUMBER; + hash = (53 * hash) + getRequirementKey().hashCode(); + hash = (37 * hash) + QUALIFIED_PRODUCT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getQualifiedProductCount(); + hash = (37 * hash) + UNQUALIFIED_PRODUCT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getUnqualifiedProductCount(); + hash = (37 * hash) + SUGGESTED_QUALITY_PERCENT_THRESHOLD_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getSuggestedQualityPercentThreshold())); + if (getUnqualifiedSampleProductsCount() > 0) { + hash = (37 * hash) + UNQUALIFIED_SAMPLE_PRODUCTS_FIELD_NUMBER; + hash = (53 * hash) + getUnqualifiedSampleProductsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.Branch.QualityMetric parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Branch.QualityMetric parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Branch.QualityMetric parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Branch.QualityMetric parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Branch.QualityMetric parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Branch.QualityMetric parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Branch.QualityMetric parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Branch.QualityMetric parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Branch.QualityMetric parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Branch.QualityMetric parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Branch.QualityMetric parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Branch.QualityMetric parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.Branch.QualityMetric prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Metric measured on a group of
+     * [Product][google.cloud.retail.v2alpha.Product]s against a certain quality
+     * requirement. Contains the number of products that pass the check and the
+     * number of products that don't.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.Branch.QualityMetric} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.Branch.QualityMetric) + com.google.cloud.retail.v2alpha.Branch.QualityMetricOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_QualityMetric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_QualityMetric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Branch.QualityMetric.class, + com.google.cloud.retail.v2alpha.Branch.QualityMetric.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.Branch.QualityMetric.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + requirementKey_ = ""; + qualifiedProductCount_ = 0; + unqualifiedProductCount_ = 0; + suggestedQualityPercentThreshold_ = 0D; + if (unqualifiedSampleProductsBuilder_ == null) { + unqualifiedSampleProducts_ = java.util.Collections.emptyList(); + } else { + unqualifiedSampleProducts_ = null; + unqualifiedSampleProductsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_QualityMetric_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch.QualityMetric getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.Branch.QualityMetric.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch.QualityMetric build() { + com.google.cloud.retail.v2alpha.Branch.QualityMetric result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch.QualityMetric buildPartial() { + com.google.cloud.retail.v2alpha.Branch.QualityMetric result = + new com.google.cloud.retail.v2alpha.Branch.QualityMetric(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.retail.v2alpha.Branch.QualityMetric result) { + if (unqualifiedSampleProductsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + unqualifiedSampleProducts_ = + java.util.Collections.unmodifiableList(unqualifiedSampleProducts_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.unqualifiedSampleProducts_ = unqualifiedSampleProducts_; + } else { + result.unqualifiedSampleProducts_ = unqualifiedSampleProductsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.Branch.QualityMetric result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.requirementKey_ = requirementKey_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.qualifiedProductCount_ = qualifiedProductCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.unqualifiedProductCount_ = unqualifiedProductCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.suggestedQualityPercentThreshold_ = suggestedQualityPercentThreshold_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.Branch.QualityMetric) { + return mergeFrom((com.google.cloud.retail.v2alpha.Branch.QualityMetric) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.Branch.QualityMetric other) { + if (other == com.google.cloud.retail.v2alpha.Branch.QualityMetric.getDefaultInstance()) + return this; + if (!other.getRequirementKey().isEmpty()) { + requirementKey_ = other.requirementKey_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getQualifiedProductCount() != 0) { + setQualifiedProductCount(other.getQualifiedProductCount()); + } + if (other.getUnqualifiedProductCount() != 0) { + setUnqualifiedProductCount(other.getUnqualifiedProductCount()); + } + if (other.getSuggestedQualityPercentThreshold() != 0D) { + setSuggestedQualityPercentThreshold(other.getSuggestedQualityPercentThreshold()); + } + if (unqualifiedSampleProductsBuilder_ == null) { + if (!other.unqualifiedSampleProducts_.isEmpty()) { + if (unqualifiedSampleProducts_.isEmpty()) { + unqualifiedSampleProducts_ = other.unqualifiedSampleProducts_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureUnqualifiedSampleProductsIsMutable(); + unqualifiedSampleProducts_.addAll(other.unqualifiedSampleProducts_); + } + onChanged(); + } + } else { + if (!other.unqualifiedSampleProducts_.isEmpty()) { + if (unqualifiedSampleProductsBuilder_.isEmpty()) { + unqualifiedSampleProductsBuilder_.dispose(); + unqualifiedSampleProductsBuilder_ = null; + unqualifiedSampleProducts_ = other.unqualifiedSampleProducts_; + bitField0_ = (bitField0_ & ~0x00000010); + unqualifiedSampleProductsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getUnqualifiedSampleProductsFieldBuilder() + : null; + } else { + unqualifiedSampleProductsBuilder_.addAllMessages(other.unqualifiedSampleProducts_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + requirementKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + qualifiedProductCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + unqualifiedProductCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 33: + { + suggestedQualityPercentThreshold_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 + case 42: + { + com.google.cloud.retail.v2alpha.Product m = + input.readMessage( + com.google.cloud.retail.v2alpha.Product.parser(), extensionRegistry); + if (unqualifiedSampleProductsBuilder_ == null) { + ensureUnqualifiedSampleProductsIsMutable(); + unqualifiedSampleProducts_.add(m); + } else { + unqualifiedSampleProductsBuilder_.addMessage(m); + } + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object requirementKey_ = ""; + /** + * + * + *
+       * The key that represents a quality requirement rule.
+       *
+       * Supported keys:
+       * * "has-valid-uri": product has a valid and accessible
+       * [uri][google.cloud.retail.v2alpha.Product.uri].
+       *
+       * * "available-expire-time-conformance":
+       * [Product.available_time][google.cloud.retail.v2alpha.Product.available_time]
+       * is early than "now", and
+       * [Product.expire_time][google.cloud.retail.v2alpha.Product.expire_time] is
+       * greater than "now".
+       *
+       * * "has-searchable-attributes": product has at least one
+       * [attribute][google.cloud.retail.v2alpha.Product.attributes] set to
+       * searchable.
+       *
+       * * "has-description": product has non-empty
+       * [description][google.cloud.retail.v2alpha.Product.description].
+       *
+       * * "has-at-least-bigram-title": Product
+       * [title][google.cloud.retail.v2alpha.Product.title] has at least two
+       * words. A comprehensive title helps to improve search quality.
+       *
+       * * "variant-has-image": the
+       * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+       * at least one [image][google.cloud.retail.v2alpha.Product.images]. You may
+       * ignore this metric if all your products are at
+       * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+       *
+       * * "variant-has-price-info": the
+       * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+       * [price_info][google.cloud.retail.v2alpha.Product.price_info] set. You may
+       * ignore this metric if all your products are at
+       * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+       *
+       * * "has-publish-time": product has non-empty
+       * [publish_time][google.cloud.retail.v2alpha.Product.publish_time].
+       * 
+ * + * string requirement_key = 1; + * + * @return The requirementKey. + */ + public java.lang.String getRequirementKey() { + java.lang.Object ref = requirementKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requirementKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The key that represents a quality requirement rule.
+       *
+       * Supported keys:
+       * * "has-valid-uri": product has a valid and accessible
+       * [uri][google.cloud.retail.v2alpha.Product.uri].
+       *
+       * * "available-expire-time-conformance":
+       * [Product.available_time][google.cloud.retail.v2alpha.Product.available_time]
+       * is early than "now", and
+       * [Product.expire_time][google.cloud.retail.v2alpha.Product.expire_time] is
+       * greater than "now".
+       *
+       * * "has-searchable-attributes": product has at least one
+       * [attribute][google.cloud.retail.v2alpha.Product.attributes] set to
+       * searchable.
+       *
+       * * "has-description": product has non-empty
+       * [description][google.cloud.retail.v2alpha.Product.description].
+       *
+       * * "has-at-least-bigram-title": Product
+       * [title][google.cloud.retail.v2alpha.Product.title] has at least two
+       * words. A comprehensive title helps to improve search quality.
+       *
+       * * "variant-has-image": the
+       * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+       * at least one [image][google.cloud.retail.v2alpha.Product.images]. You may
+       * ignore this metric if all your products are at
+       * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+       *
+       * * "variant-has-price-info": the
+       * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+       * [price_info][google.cloud.retail.v2alpha.Product.price_info] set. You may
+       * ignore this metric if all your products are at
+       * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+       *
+       * * "has-publish-time": product has non-empty
+       * [publish_time][google.cloud.retail.v2alpha.Product.publish_time].
+       * 
+ * + * string requirement_key = 1; + * + * @return The bytes for requirementKey. + */ + public com.google.protobuf.ByteString getRequirementKeyBytes() { + java.lang.Object ref = requirementKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requirementKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The key that represents a quality requirement rule.
+       *
+       * Supported keys:
+       * * "has-valid-uri": product has a valid and accessible
+       * [uri][google.cloud.retail.v2alpha.Product.uri].
+       *
+       * * "available-expire-time-conformance":
+       * [Product.available_time][google.cloud.retail.v2alpha.Product.available_time]
+       * is early than "now", and
+       * [Product.expire_time][google.cloud.retail.v2alpha.Product.expire_time] is
+       * greater than "now".
+       *
+       * * "has-searchable-attributes": product has at least one
+       * [attribute][google.cloud.retail.v2alpha.Product.attributes] set to
+       * searchable.
+       *
+       * * "has-description": product has non-empty
+       * [description][google.cloud.retail.v2alpha.Product.description].
+       *
+       * * "has-at-least-bigram-title": Product
+       * [title][google.cloud.retail.v2alpha.Product.title] has at least two
+       * words. A comprehensive title helps to improve search quality.
+       *
+       * * "variant-has-image": the
+       * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+       * at least one [image][google.cloud.retail.v2alpha.Product.images]. You may
+       * ignore this metric if all your products are at
+       * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+       *
+       * * "variant-has-price-info": the
+       * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+       * [price_info][google.cloud.retail.v2alpha.Product.price_info] set. You may
+       * ignore this metric if all your products are at
+       * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+       *
+       * * "has-publish-time": product has non-empty
+       * [publish_time][google.cloud.retail.v2alpha.Product.publish_time].
+       * 
+ * + * string requirement_key = 1; + * + * @param value The requirementKey to set. + * @return This builder for chaining. + */ + public Builder setRequirementKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requirementKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The key that represents a quality requirement rule.
+       *
+       * Supported keys:
+       * * "has-valid-uri": product has a valid and accessible
+       * [uri][google.cloud.retail.v2alpha.Product.uri].
+       *
+       * * "available-expire-time-conformance":
+       * [Product.available_time][google.cloud.retail.v2alpha.Product.available_time]
+       * is early than "now", and
+       * [Product.expire_time][google.cloud.retail.v2alpha.Product.expire_time] is
+       * greater than "now".
+       *
+       * * "has-searchable-attributes": product has at least one
+       * [attribute][google.cloud.retail.v2alpha.Product.attributes] set to
+       * searchable.
+       *
+       * * "has-description": product has non-empty
+       * [description][google.cloud.retail.v2alpha.Product.description].
+       *
+       * * "has-at-least-bigram-title": Product
+       * [title][google.cloud.retail.v2alpha.Product.title] has at least two
+       * words. A comprehensive title helps to improve search quality.
+       *
+       * * "variant-has-image": the
+       * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+       * at least one [image][google.cloud.retail.v2alpha.Product.images]. You may
+       * ignore this metric if all your products are at
+       * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+       *
+       * * "variant-has-price-info": the
+       * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+       * [price_info][google.cloud.retail.v2alpha.Product.price_info] set. You may
+       * ignore this metric if all your products are at
+       * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+       *
+       * * "has-publish-time": product has non-empty
+       * [publish_time][google.cloud.retail.v2alpha.Product.publish_time].
+       * 
+ * + * string requirement_key = 1; + * + * @return This builder for chaining. + */ + public Builder clearRequirementKey() { + requirementKey_ = getDefaultInstance().getRequirementKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The key that represents a quality requirement rule.
+       *
+       * Supported keys:
+       * * "has-valid-uri": product has a valid and accessible
+       * [uri][google.cloud.retail.v2alpha.Product.uri].
+       *
+       * * "available-expire-time-conformance":
+       * [Product.available_time][google.cloud.retail.v2alpha.Product.available_time]
+       * is early than "now", and
+       * [Product.expire_time][google.cloud.retail.v2alpha.Product.expire_time] is
+       * greater than "now".
+       *
+       * * "has-searchable-attributes": product has at least one
+       * [attribute][google.cloud.retail.v2alpha.Product.attributes] set to
+       * searchable.
+       *
+       * * "has-description": product has non-empty
+       * [description][google.cloud.retail.v2alpha.Product.description].
+       *
+       * * "has-at-least-bigram-title": Product
+       * [title][google.cloud.retail.v2alpha.Product.title] has at least two
+       * words. A comprehensive title helps to improve search quality.
+       *
+       * * "variant-has-image": the
+       * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+       * at least one [image][google.cloud.retail.v2alpha.Product.images]. You may
+       * ignore this metric if all your products are at
+       * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+       *
+       * * "variant-has-price-info": the
+       * [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
+       * [price_info][google.cloud.retail.v2alpha.Product.price_info] set. You may
+       * ignore this metric if all your products are at
+       * [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
+       *
+       * * "has-publish-time": product has non-empty
+       * [publish_time][google.cloud.retail.v2alpha.Product.publish_time].
+       * 
+ * + * string requirement_key = 1; + * + * @param value The bytes for requirementKey to set. + * @return This builder for chaining. + */ + public Builder setRequirementKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requirementKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int qualifiedProductCount_; + /** + * + * + *
+       * Number of products passing the quality requirement check. We only check
+       * searchable products.
+       * 
+ * + * int32 qualified_product_count = 2; + * + * @return The qualifiedProductCount. + */ + @java.lang.Override + public int getQualifiedProductCount() { + return qualifiedProductCount_; + } + /** + * + * + *
+       * Number of products passing the quality requirement check. We only check
+       * searchable products.
+       * 
+ * + * int32 qualified_product_count = 2; + * + * @param value The qualifiedProductCount to set. + * @return This builder for chaining. + */ + public Builder setQualifiedProductCount(int value) { + + qualifiedProductCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Number of products passing the quality requirement check. We only check
+       * searchable products.
+       * 
+ * + * int32 qualified_product_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearQualifiedProductCount() { + bitField0_ = (bitField0_ & ~0x00000002); + qualifiedProductCount_ = 0; + onChanged(); + return this; + } + + private int unqualifiedProductCount_; + /** + * + * + *
+       * Number of products failing the quality requirement check. We only check
+       * searchable products.
+       * 
+ * + * int32 unqualified_product_count = 3; + * + * @return The unqualifiedProductCount. + */ + @java.lang.Override + public int getUnqualifiedProductCount() { + return unqualifiedProductCount_; + } + /** + * + * + *
+       * Number of products failing the quality requirement check. We only check
+       * searchable products.
+       * 
+ * + * int32 unqualified_product_count = 3; + * + * @param value The unqualifiedProductCount to set. + * @return This builder for chaining. + */ + public Builder setUnqualifiedProductCount(int value) { + + unqualifiedProductCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Number of products failing the quality requirement check. We only check
+       * searchable products.
+       * 
+ * + * int32 unqualified_product_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnqualifiedProductCount() { + bitField0_ = (bitField0_ & ~0x00000004); + unqualifiedProductCount_ = 0; + onChanged(); + return this; + } + + private double suggestedQualityPercentThreshold_; + /** + * + * + *
+       * Value from 0 to 100 representing the suggested percentage of products
+       * that meet the quality requirements to get good search and recommendation
+       * performance. 100 * (qualified_product_count) /
+       * (qualified_product_count + unqualified_product_count) should be greater
+       * or equal to this suggestion.
+       * 
+ * + * double suggested_quality_percent_threshold = 4; + * + * @return The suggestedQualityPercentThreshold. + */ + @java.lang.Override + public double getSuggestedQualityPercentThreshold() { + return suggestedQualityPercentThreshold_; + } + /** + * + * + *
+       * Value from 0 to 100 representing the suggested percentage of products
+       * that meet the quality requirements to get good search and recommendation
+       * performance. 100 * (qualified_product_count) /
+       * (qualified_product_count + unqualified_product_count) should be greater
+       * or equal to this suggestion.
+       * 
+ * + * double suggested_quality_percent_threshold = 4; + * + * @param value The suggestedQualityPercentThreshold to set. + * @return This builder for chaining. + */ + public Builder setSuggestedQualityPercentThreshold(double value) { + + suggestedQualityPercentThreshold_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Value from 0 to 100 representing the suggested percentage of products
+       * that meet the quality requirements to get good search and recommendation
+       * performance. 100 * (qualified_product_count) /
+       * (qualified_product_count + unqualified_product_count) should be greater
+       * or equal to this suggestion.
+       * 
+ * + * double suggested_quality_percent_threshold = 4; + * + * @return This builder for chaining. + */ + public Builder clearSuggestedQualityPercentThreshold() { + bitField0_ = (bitField0_ & ~0x00000008); + suggestedQualityPercentThreshold_ = 0D; + onChanged(); + return this; + } + + private java.util.List unqualifiedSampleProducts_ = + java.util.Collections.emptyList(); + + private void ensureUnqualifiedSampleProductsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + unqualifiedSampleProducts_ = + new java.util.ArrayList( + unqualifiedSampleProducts_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Product, + com.google.cloud.retail.v2alpha.Product.Builder, + com.google.cloud.retail.v2alpha.ProductOrBuilder> + unqualifiedSampleProductsBuilder_; + + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public java.util.List + getUnqualifiedSampleProductsList() { + if (unqualifiedSampleProductsBuilder_ == null) { + return java.util.Collections.unmodifiableList(unqualifiedSampleProducts_); + } else { + return unqualifiedSampleProductsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public int getUnqualifiedSampleProductsCount() { + if (unqualifiedSampleProductsBuilder_ == null) { + return unqualifiedSampleProducts_.size(); + } else { + return unqualifiedSampleProductsBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public com.google.cloud.retail.v2alpha.Product getUnqualifiedSampleProducts(int index) { + if (unqualifiedSampleProductsBuilder_ == null) { + return unqualifiedSampleProducts_.get(index); + } else { + return unqualifiedSampleProductsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public Builder setUnqualifiedSampleProducts( + int index, com.google.cloud.retail.v2alpha.Product value) { + if (unqualifiedSampleProductsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnqualifiedSampleProductsIsMutable(); + unqualifiedSampleProducts_.set(index, value); + onChanged(); + } else { + unqualifiedSampleProductsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public Builder setUnqualifiedSampleProducts( + int index, com.google.cloud.retail.v2alpha.Product.Builder builderForValue) { + if (unqualifiedSampleProductsBuilder_ == null) { + ensureUnqualifiedSampleProductsIsMutable(); + unqualifiedSampleProducts_.set(index, builderForValue.build()); + onChanged(); + } else { + unqualifiedSampleProductsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public Builder addUnqualifiedSampleProducts(com.google.cloud.retail.v2alpha.Product value) { + if (unqualifiedSampleProductsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnqualifiedSampleProductsIsMutable(); + unqualifiedSampleProducts_.add(value); + onChanged(); + } else { + unqualifiedSampleProductsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public Builder addUnqualifiedSampleProducts( + int index, com.google.cloud.retail.v2alpha.Product value) { + if (unqualifiedSampleProductsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnqualifiedSampleProductsIsMutable(); + unqualifiedSampleProducts_.add(index, value); + onChanged(); + } else { + unqualifiedSampleProductsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public Builder addUnqualifiedSampleProducts( + com.google.cloud.retail.v2alpha.Product.Builder builderForValue) { + if (unqualifiedSampleProductsBuilder_ == null) { + ensureUnqualifiedSampleProductsIsMutable(); + unqualifiedSampleProducts_.add(builderForValue.build()); + onChanged(); + } else { + unqualifiedSampleProductsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public Builder addUnqualifiedSampleProducts( + int index, com.google.cloud.retail.v2alpha.Product.Builder builderForValue) { + if (unqualifiedSampleProductsBuilder_ == null) { + ensureUnqualifiedSampleProductsIsMutable(); + unqualifiedSampleProducts_.add(index, builderForValue.build()); + onChanged(); + } else { + unqualifiedSampleProductsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public Builder addAllUnqualifiedSampleProducts( + java.lang.Iterable values) { + if (unqualifiedSampleProductsBuilder_ == null) { + ensureUnqualifiedSampleProductsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unqualifiedSampleProducts_); + onChanged(); + } else { + unqualifiedSampleProductsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public Builder clearUnqualifiedSampleProducts() { + if (unqualifiedSampleProductsBuilder_ == null) { + unqualifiedSampleProducts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + unqualifiedSampleProductsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public Builder removeUnqualifiedSampleProducts(int index) { + if (unqualifiedSampleProductsBuilder_ == null) { + ensureUnqualifiedSampleProductsIsMutable(); + unqualifiedSampleProducts_.remove(index); + onChanged(); + } else { + unqualifiedSampleProductsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public com.google.cloud.retail.v2alpha.Product.Builder getUnqualifiedSampleProductsBuilder( + int index) { + return getUnqualifiedSampleProductsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public com.google.cloud.retail.v2alpha.ProductOrBuilder getUnqualifiedSampleProductsOrBuilder( + int index) { + if (unqualifiedSampleProductsBuilder_ == null) { + return unqualifiedSampleProducts_.get(index); + } else { + return unqualifiedSampleProductsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public java.util.List + getUnqualifiedSampleProductsOrBuilderList() { + if (unqualifiedSampleProductsBuilder_ != null) { + return unqualifiedSampleProductsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(unqualifiedSampleProducts_); + } + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public com.google.cloud.retail.v2alpha.Product.Builder addUnqualifiedSampleProductsBuilder() { + return getUnqualifiedSampleProductsFieldBuilder() + .addBuilder(com.google.cloud.retail.v2alpha.Product.getDefaultInstance()); + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public com.google.cloud.retail.v2alpha.Product.Builder addUnqualifiedSampleProductsBuilder( + int index) { + return getUnqualifiedSampleProductsFieldBuilder() + .addBuilder(index, com.google.cloud.retail.v2alpha.Product.getDefaultInstance()); + } + /** + * + * + *
+       * A list of a maximum of 100 sample products that do not qualify for
+       * this requirement.
+       *
+       * This field is only populated in the response to
+       * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+       * API, and is always empty for
+       * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
+       *
+       * Only the following fields are set in the
+       * [Product][google.cloud.retail.v2alpha.Product].
+       *
+       * * [Product.name][google.cloud.retail.v2alpha.Product.name]
+       * * [Product.id][google.cloud.retail.v2alpha.Product.id]
+       * * [Product.title][google.cloud.retail.v2alpha.Product.title]
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5; + */ + public java.util.List + getUnqualifiedSampleProductsBuilderList() { + return getUnqualifiedSampleProductsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Product, + com.google.cloud.retail.v2alpha.Product.Builder, + com.google.cloud.retail.v2alpha.ProductOrBuilder> + getUnqualifiedSampleProductsFieldBuilder() { + if (unqualifiedSampleProductsBuilder_ == null) { + unqualifiedSampleProductsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Product, + com.google.cloud.retail.v2alpha.Product.Builder, + com.google.cloud.retail.v2alpha.ProductOrBuilder>( + unqualifiedSampleProducts_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + unqualifiedSampleProducts_ = null; + } + return unqualifiedSampleProductsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.Branch.QualityMetric) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.Branch.QualityMetric) + private static final com.google.cloud.retail.v2alpha.Branch.QualityMetric DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.Branch.QualityMetric(); + } + + public static com.google.cloud.retail.v2alpha.Branch.QualityMetric getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QualityMetric parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.Branch.QualityMetric getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Immutable. Full resource name of the branch, such as
+   * `projects/*/locations/global/catalogs/default_catalog/branches/branch_id`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. Full resource name of the branch, such as
+   * `projects/*/locations/global/catalogs/default_catalog/branches/branch_id`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Output only. Human readable name of the branch to display in the UI.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+   * Output only. Human readable name of the branch to display in the UI.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 IS_DEFAULT_FIELD_NUMBER = 3; + private boolean isDefault_ = false; + /** + * + * + *
+   * Output only. Indicates whether this branch is set as the default branch of
+   * its parent catalog.
+   * 
+ * + * bool is_default = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + + public static final int LAST_PRODUCT_IMPORT_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp lastProductImportTime_; + /** + * + * + *
+   * Output only. Timestamp of last import through
+   * [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts].
+   * Empty value means no import has been made to this branch.
+   * 
+ * + * + * .google.protobuf.Timestamp last_product_import_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastProductImportTime field is set. + */ + @java.lang.Override + public boolean hasLastProductImportTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Timestamp of last import through
+   * [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts].
+   * Empty value means no import has been made to this branch.
+   * 
+ * + * + * .google.protobuf.Timestamp last_product_import_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastProductImportTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastProductImportTime() { + return lastProductImportTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastProductImportTime_; + } + /** + * + * + *
+   * Output only. Timestamp of last import through
+   * [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts].
+   * Empty value means no import has been made to this branch.
+   * 
+ * + * + * .google.protobuf.Timestamp last_product_import_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastProductImportTimeOrBuilder() { + return lastProductImportTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastProductImportTime_; + } + + public static final int PRODUCT_COUNT_STATS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List + productCountStats_; + /** + * + * + *
+   * Output only. Statistics for number of products in the branch, provided for
+   * different
+   * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getProductCountStatsList() { + return productCountStats_; + } + /** + * + * + *
+   * Output only. Statistics for number of products in the branch, provided for
+   * different
+   * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.retail.v2alpha.Branch.ProductCountStatisticOrBuilder> + getProductCountStatsOrBuilderList() { + return productCountStats_; + } + /** + * + * + *
+   * Output only. Statistics for number of products in the branch, provided for
+   * different
+   * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getProductCountStatsCount() { + return productCountStats_.size(); + } + /** + * + * + *
+   * Output only. Statistics for number of products in the branch, provided for
+   * different
+   * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic getProductCountStats( + int index) { + return productCountStats_.get(index); + } + /** + * + * + *
+   * Output only. Statistics for number of products in the branch, provided for
+   * different
+   * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch.ProductCountStatisticOrBuilder + getProductCountStatsOrBuilder(int index) { + return productCountStats_.get(index); + } + + public static final int QUALITY_METRICS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List qualityMetrics_; + /** + * + * + *
+   * Output only. The quality metrics measured among products of this branch.
+   *
+   * See
+   * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+   * for supported metrics. Metrics could be missing if failed to retrieve.
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getQualityMetricsList() { + return qualityMetrics_; + } + /** + * + * + *
+   * Output only. The quality metrics measured among products of this branch.
+   *
+   * See
+   * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+   * for supported metrics. Metrics could be missing if failed to retrieve.
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getQualityMetricsOrBuilderList() { + return qualityMetrics_; + } + /** + * + * + *
+   * Output only. The quality metrics measured among products of this branch.
+   *
+   * See
+   * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+   * for supported metrics. Metrics could be missing if failed to retrieve.
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getQualityMetricsCount() { + return qualityMetrics_.size(); + } + /** + * + * + *
+   * Output only. The quality metrics measured among products of this branch.
+   *
+   * See
+   * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+   * for supported metrics. Metrics could be missing if failed to retrieve.
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch.QualityMetric getQualityMetrics(int index) { + return qualityMetrics_.get(index); + } + /** + * + * + *
+   * Output only. The quality metrics measured among products of this branch.
+   *
+   * See
+   * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+   * for supported metrics. Metrics could be missing if failed to retrieve.
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch.QualityMetricOrBuilder getQualityMetricsOrBuilder( + int index) { + return qualityMetrics_.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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (isDefault_ != false) { + output.writeBool(3, isDefault_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getLastProductImportTime()); + } + for (int i = 0; i < qualityMetrics_.size(); i++) { + output.writeMessage(6, qualityMetrics_.get(i)); + } + for (int i = 0; i < productCountStats_.size(); i++) { + output.writeMessage(7, productCountStats_.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (isDefault_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isDefault_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, getLastProductImportTime()); + } + for (int i = 0; i < qualityMetrics_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, qualityMetrics_.get(i)); + } + for (int i = 0; i < productCountStats_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, productCountStats_.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.retail.v2alpha.Branch)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.Branch other = (com.google.cloud.retail.v2alpha.Branch) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (getIsDefault() != other.getIsDefault()) return false; + if (hasLastProductImportTime() != other.hasLastProductImportTime()) return false; + if (hasLastProductImportTime()) { + if (!getLastProductImportTime().equals(other.getLastProductImportTime())) return false; + } + if (!getProductCountStatsList().equals(other.getProductCountStatsList())) return false; + if (!getQualityMetricsList().equals(other.getQualityMetricsList())) 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) + IS_DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsDefault()); + if (hasLastProductImportTime()) { + hash = (37 * hash) + LAST_PRODUCT_IMPORT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastProductImportTime().hashCode(); + } + if (getProductCountStatsCount() > 0) { + hash = (37 * hash) + PRODUCT_COUNT_STATS_FIELD_NUMBER; + hash = (53 * hash) + getProductCountStatsList().hashCode(); + } + if (getQualityMetricsCount() > 0) { + hash = (37 * hash) + QUALITY_METRICS_FIELD_NUMBER; + hash = (53 * hash) + getQualityMetricsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.Branch parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Branch parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Branch parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Branch parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Branch parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Branch parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Branch parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Branch parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Branch parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Branch parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Branch parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Branch parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.Branch prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A data branch that stores [Product][google.cloud.retail.v2alpha.Product]s.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.Branch} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.Branch) + com.google.cloud.retail.v2alpha.BranchOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Branch.class, + com.google.cloud.retail.v2alpha.Branch.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.Branch.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLastProductImportTimeFieldBuilder(); + getProductCountStatsFieldBuilder(); + getQualityMetricsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + isDefault_ = false; + lastProductImportTime_ = null; + if (lastProductImportTimeBuilder_ != null) { + lastProductImportTimeBuilder_.dispose(); + lastProductImportTimeBuilder_ = null; + } + if (productCountStatsBuilder_ == null) { + productCountStats_ = java.util.Collections.emptyList(); + } else { + productCountStats_ = null; + productCountStatsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (qualityMetricsBuilder_ == null) { + qualityMetrics_ = java.util.Collections.emptyList(); + } else { + qualityMetrics_ = null; + qualityMetricsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.BranchProto + .internal_static_google_cloud_retail_v2alpha_Branch_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.Branch.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch build() { + com.google.cloud.retail.v2alpha.Branch result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch buildPartial() { + com.google.cloud.retail.v2alpha.Branch result = + new com.google.cloud.retail.v2alpha.Branch(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.retail.v2alpha.Branch result) { + if (productCountStatsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + productCountStats_ = java.util.Collections.unmodifiableList(productCountStats_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.productCountStats_ = productCountStats_; + } else { + result.productCountStats_ = productCountStatsBuilder_.build(); + } + if (qualityMetricsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + qualityMetrics_ = java.util.Collections.unmodifiableList(qualityMetrics_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.qualityMetrics_ = qualityMetrics_; + } else { + result.qualityMetrics_ = qualityMetricsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.Branch 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.isDefault_ = isDefault_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.lastProductImportTime_ = + lastProductImportTimeBuilder_ == null + ? lastProductImportTime_ + : lastProductImportTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.Branch) { + return mergeFrom((com.google.cloud.retail.v2alpha.Branch) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.Branch other) { + if (other == com.google.cloud.retail.v2alpha.Branch.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.getIsDefault() != false) { + setIsDefault(other.getIsDefault()); + } + if (other.hasLastProductImportTime()) { + mergeLastProductImportTime(other.getLastProductImportTime()); + } + if (productCountStatsBuilder_ == null) { + if (!other.productCountStats_.isEmpty()) { + if (productCountStats_.isEmpty()) { + productCountStats_ = other.productCountStats_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureProductCountStatsIsMutable(); + productCountStats_.addAll(other.productCountStats_); + } + onChanged(); + } + } else { + if (!other.productCountStats_.isEmpty()) { + if (productCountStatsBuilder_.isEmpty()) { + productCountStatsBuilder_.dispose(); + productCountStatsBuilder_ = null; + productCountStats_ = other.productCountStats_; + bitField0_ = (bitField0_ & ~0x00000010); + productCountStatsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getProductCountStatsFieldBuilder() + : null; + } else { + productCountStatsBuilder_.addAllMessages(other.productCountStats_); + } + } + } + if (qualityMetricsBuilder_ == null) { + if (!other.qualityMetrics_.isEmpty()) { + if (qualityMetrics_.isEmpty()) { + qualityMetrics_ = other.qualityMetrics_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureQualityMetricsIsMutable(); + qualityMetrics_.addAll(other.qualityMetrics_); + } + onChanged(); + } + } else { + if (!other.qualityMetrics_.isEmpty()) { + if (qualityMetricsBuilder_.isEmpty()) { + qualityMetricsBuilder_.dispose(); + qualityMetricsBuilder_ = null; + qualityMetrics_ = other.qualityMetrics_; + bitField0_ = (bitField0_ & ~0x00000020); + qualityMetricsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getQualityMetricsFieldBuilder() + : null; + } else { + qualityMetricsBuilder_.addAllMessages(other.qualityMetrics_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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: + { + isDefault_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 42: + { + input.readMessage( + getLastProductImportTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + com.google.cloud.retail.v2alpha.Branch.QualityMetric m = + input.readMessage( + com.google.cloud.retail.v2alpha.Branch.QualityMetric.parser(), + extensionRegistry); + if (qualityMetricsBuilder_ == null) { + ensureQualityMetricsIsMutable(); + qualityMetrics_.add(m); + } else { + qualityMetricsBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic m = + input.readMessage( + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.parser(), + extensionRegistry); + if (productCountStatsBuilder_ == null) { + ensureProductCountStatsIsMutable(); + productCountStats_.add(m); + } else { + productCountStatsBuilder_.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 name_ = ""; + /** + * + * + *
+     * Immutable. Full resource name of the branch, such as
+     * `projects/*/locations/global/catalogs/default_catalog/branches/branch_id`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. Full resource name of the branch, such as
+     * `projects/*/locations/global/catalogs/default_catalog/branches/branch_id`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. Full resource name of the branch, such as
+     * `projects/*/locations/global/catalogs/default_catalog/branches/branch_id`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Full resource name of the branch, such as
+     * `projects/*/locations/global/catalogs/default_catalog/branches/branch_id`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Full resource name of the branch, such as
+     * `projects/*/locations/global/catalogs/default_catalog/branches/branch_id`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Output only. Human readable name of the branch to display in the UI.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. Human readable name of the branch to display in the UI.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. Human readable name of the branch to display in the UI.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + /** + * + * + *
+     * Output only. Human readable name of the branch to display in the UI.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human readable name of the branch to display in the UI.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 boolean isDefault_; + /** + * + * + *
+     * Output only. Indicates whether this branch is set as the default branch of
+     * its parent catalog.
+     * 
+ * + * bool is_default = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + /** + * + * + *
+     * Output only. Indicates whether this branch is set as the default branch of
+     * its parent catalog.
+     * 
+ * + * bool is_default = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The isDefault to set. + * @return This builder for chaining. + */ + public Builder setIsDefault(boolean value) { + + isDefault_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates whether this branch is set as the default branch of
+     * its parent catalog.
+     * 
+ * + * bool is_default = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearIsDefault() { + bitField0_ = (bitField0_ & ~0x00000004); + isDefault_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastProductImportTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastProductImportTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp of last import through
+     * [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts].
+     * Empty value means no import has been made to this branch.
+     * 
+ * + * + * .google.protobuf.Timestamp last_product_import_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastProductImportTime field is set. + */ + public boolean hasLastProductImportTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Timestamp of last import through
+     * [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts].
+     * Empty value means no import has been made to this branch.
+     * 
+ * + * + * .google.protobuf.Timestamp last_product_import_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastProductImportTime. + */ + public com.google.protobuf.Timestamp getLastProductImportTime() { + if (lastProductImportTimeBuilder_ == null) { + return lastProductImportTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastProductImportTime_; + } else { + return lastProductImportTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp of last import through
+     * [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts].
+     * Empty value means no import has been made to this branch.
+     * 
+ * + * + * .google.protobuf.Timestamp last_product_import_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastProductImportTime(com.google.protobuf.Timestamp value) { + if (lastProductImportTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastProductImportTime_ = value; + } else { + lastProductImportTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp of last import through
+     * [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts].
+     * Empty value means no import has been made to this branch.
+     * 
+ * + * + * .google.protobuf.Timestamp last_product_import_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastProductImportTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastProductImportTimeBuilder_ == null) { + lastProductImportTime_ = builderForValue.build(); + } else { + lastProductImportTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp of last import through
+     * [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts].
+     * Empty value means no import has been made to this branch.
+     * 
+ * + * + * .google.protobuf.Timestamp last_product_import_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastProductImportTime(com.google.protobuf.Timestamp value) { + if (lastProductImportTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && lastProductImportTime_ != null + && lastProductImportTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLastProductImportTimeBuilder().mergeFrom(value); + } else { + lastProductImportTime_ = value; + } + } else { + lastProductImportTimeBuilder_.mergeFrom(value); + } + if (lastProductImportTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp of last import through
+     * [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts].
+     * Empty value means no import has been made to this branch.
+     * 
+ * + * + * .google.protobuf.Timestamp last_product_import_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastProductImportTime() { + bitField0_ = (bitField0_ & ~0x00000008); + lastProductImportTime_ = null; + if (lastProductImportTimeBuilder_ != null) { + lastProductImportTimeBuilder_.dispose(); + lastProductImportTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp of last import through
+     * [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts].
+     * Empty value means no import has been made to this branch.
+     * 
+ * + * + * .google.protobuf.Timestamp last_product_import_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastProductImportTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getLastProductImportTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp of last import through
+     * [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts].
+     * Empty value means no import has been made to this branch.
+     * 
+ * + * + * .google.protobuf.Timestamp last_product_import_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastProductImportTimeOrBuilder() { + if (lastProductImportTimeBuilder_ != null) { + return lastProductImportTimeBuilder_.getMessageOrBuilder(); + } else { + return lastProductImportTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastProductImportTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp of last import through
+     * [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts].
+     * Empty value means no import has been made to this branch.
+     * 
+ * + * + * .google.protobuf.Timestamp last_product_import_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastProductImportTimeFieldBuilder() { + if (lastProductImportTimeBuilder_ == null) { + lastProductImportTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastProductImportTime(), getParentForChildren(), isClean()); + lastProductImportTime_ = null; + } + return lastProductImportTimeBuilder_; + } + + private java.util.List + productCountStats_ = java.util.Collections.emptyList(); + + private void ensureProductCountStatsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + productCountStats_ = + new java.util.ArrayList( + productCountStats_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic, + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.Builder, + com.google.cloud.retail.v2alpha.Branch.ProductCountStatisticOrBuilder> + productCountStatsBuilder_; + + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getProductCountStatsList() { + if (productCountStatsBuilder_ == null) { + return java.util.Collections.unmodifiableList(productCountStats_); + } else { + return productCountStatsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getProductCountStatsCount() { + if (productCountStatsBuilder_ == null) { + return productCountStats_.size(); + } else { + return productCountStatsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic getProductCountStats( + int index) { + if (productCountStatsBuilder_ == null) { + return productCountStats_.get(index); + } else { + return productCountStatsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setProductCountStats( + int index, com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic value) { + if (productCountStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductCountStatsIsMutable(); + productCountStats_.set(index, value); + onChanged(); + } else { + productCountStatsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setProductCountStats( + int index, + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.Builder builderForValue) { + if (productCountStatsBuilder_ == null) { + ensureProductCountStatsIsMutable(); + productCountStats_.set(index, builderForValue.build()); + onChanged(); + } else { + productCountStatsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addProductCountStats( + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic value) { + if (productCountStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductCountStatsIsMutable(); + productCountStats_.add(value); + onChanged(); + } else { + productCountStatsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addProductCountStats( + int index, com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic value) { + if (productCountStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductCountStatsIsMutable(); + productCountStats_.add(index, value); + onChanged(); + } else { + productCountStatsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addProductCountStats( + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.Builder builderForValue) { + if (productCountStatsBuilder_ == null) { + ensureProductCountStatsIsMutable(); + productCountStats_.add(builderForValue.build()); + onChanged(); + } else { + productCountStatsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addProductCountStats( + int index, + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.Builder builderForValue) { + if (productCountStatsBuilder_ == null) { + ensureProductCountStatsIsMutable(); + productCountStats_.add(index, builderForValue.build()); + onChanged(); + } else { + productCountStatsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllProductCountStats( + java.lang.Iterable + values) { + if (productCountStatsBuilder_ == null) { + ensureProductCountStatsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, productCountStats_); + onChanged(); + } else { + productCountStatsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearProductCountStats() { + if (productCountStatsBuilder_ == null) { + productCountStats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + productCountStatsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeProductCountStats(int index) { + if (productCountStatsBuilder_ == null) { + ensureProductCountStatsIsMutable(); + productCountStats_.remove(index); + onChanged(); + } else { + productCountStatsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.Builder + getProductCountStatsBuilder(int index) { + return getProductCountStatsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2alpha.Branch.ProductCountStatisticOrBuilder + getProductCountStatsOrBuilder(int index) { + if (productCountStatsBuilder_ == null) { + return productCountStats_.get(index); + } else { + return productCountStatsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.retail.v2alpha.Branch.ProductCountStatisticOrBuilder> + getProductCountStatsOrBuilderList() { + if (productCountStatsBuilder_ != null) { + return productCountStatsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(productCountStats_); + } + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.Builder + addProductCountStatsBuilder() { + return getProductCountStatsFieldBuilder() + .addBuilder( + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.Builder + addProductCountStatsBuilder(int index) { + return getProductCountStatsFieldBuilder() + .addBuilder( + index, + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Statistics for number of products in the branch, provided for
+     * different
+     * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getProductCountStatsBuilderList() { + return getProductCountStatsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic, + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.Builder, + com.google.cloud.retail.v2alpha.Branch.ProductCountStatisticOrBuilder> + getProductCountStatsFieldBuilder() { + if (productCountStatsBuilder_ == null) { + productCountStatsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic, + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic.Builder, + com.google.cloud.retail.v2alpha.Branch.ProductCountStatisticOrBuilder>( + productCountStats_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + productCountStats_ = null; + } + return productCountStatsBuilder_; + } + + private java.util.List qualityMetrics_ = + java.util.Collections.emptyList(); + + private void ensureQualityMetricsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + qualityMetrics_ = + new java.util.ArrayList( + qualityMetrics_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Branch.QualityMetric, + com.google.cloud.retail.v2alpha.Branch.QualityMetric.Builder, + com.google.cloud.retail.v2alpha.Branch.QualityMetricOrBuilder> + qualityMetricsBuilder_; + + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getQualityMetricsList() { + if (qualityMetricsBuilder_ == null) { + return java.util.Collections.unmodifiableList(qualityMetrics_); + } else { + return qualityMetricsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getQualityMetricsCount() { + if (qualityMetricsBuilder_ == null) { + return qualityMetrics_.size(); + } else { + return qualityMetricsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2alpha.Branch.QualityMetric getQualityMetrics(int index) { + if (qualityMetricsBuilder_ == null) { + return qualityMetrics_.get(index); + } else { + return qualityMetricsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setQualityMetrics( + int index, com.google.cloud.retail.v2alpha.Branch.QualityMetric value) { + if (qualityMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQualityMetricsIsMutable(); + qualityMetrics_.set(index, value); + onChanged(); + } else { + qualityMetricsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setQualityMetrics( + int index, com.google.cloud.retail.v2alpha.Branch.QualityMetric.Builder builderForValue) { + if (qualityMetricsBuilder_ == null) { + ensureQualityMetricsIsMutable(); + qualityMetrics_.set(index, builderForValue.build()); + onChanged(); + } else { + qualityMetricsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addQualityMetrics(com.google.cloud.retail.v2alpha.Branch.QualityMetric value) { + if (qualityMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQualityMetricsIsMutable(); + qualityMetrics_.add(value); + onChanged(); + } else { + qualityMetricsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addQualityMetrics( + int index, com.google.cloud.retail.v2alpha.Branch.QualityMetric value) { + if (qualityMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQualityMetricsIsMutable(); + qualityMetrics_.add(index, value); + onChanged(); + } else { + qualityMetricsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addQualityMetrics( + com.google.cloud.retail.v2alpha.Branch.QualityMetric.Builder builderForValue) { + if (qualityMetricsBuilder_ == null) { + ensureQualityMetricsIsMutable(); + qualityMetrics_.add(builderForValue.build()); + onChanged(); + } else { + qualityMetricsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addQualityMetrics( + int index, com.google.cloud.retail.v2alpha.Branch.QualityMetric.Builder builderForValue) { + if (qualityMetricsBuilder_ == null) { + ensureQualityMetricsIsMutable(); + qualityMetrics_.add(index, builderForValue.build()); + onChanged(); + } else { + qualityMetricsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllQualityMetrics( + java.lang.Iterable values) { + if (qualityMetricsBuilder_ == null) { + ensureQualityMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, qualityMetrics_); + onChanged(); + } else { + qualityMetricsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearQualityMetrics() { + if (qualityMetricsBuilder_ == null) { + qualityMetrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + qualityMetricsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeQualityMetrics(int index) { + if (qualityMetricsBuilder_ == null) { + ensureQualityMetricsIsMutable(); + qualityMetrics_.remove(index); + onChanged(); + } else { + qualityMetricsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2alpha.Branch.QualityMetric.Builder getQualityMetricsBuilder( + int index) { + return getQualityMetricsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2alpha.Branch.QualityMetricOrBuilder getQualityMetricsOrBuilder( + int index) { + if (qualityMetricsBuilder_ == null) { + return qualityMetrics_.get(index); + } else { + return qualityMetricsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getQualityMetricsOrBuilderList() { + if (qualityMetricsBuilder_ != null) { + return qualityMetricsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(qualityMetrics_); + } + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2alpha.Branch.QualityMetric.Builder addQualityMetricsBuilder() { + return getQualityMetricsFieldBuilder() + .addBuilder(com.google.cloud.retail.v2alpha.Branch.QualityMetric.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2alpha.Branch.QualityMetric.Builder addQualityMetricsBuilder( + int index) { + return getQualityMetricsFieldBuilder() + .addBuilder( + index, com.google.cloud.retail.v2alpha.Branch.QualityMetric.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The quality metrics measured among products of this branch.
+     *
+     * See
+     * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+     * for supported metrics. Metrics could be missing if failed to retrieve.
+     *
+     * This field is not populated in [BranchView.BASIC][] view.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getQualityMetricsBuilderList() { + return getQualityMetricsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Branch.QualityMetric, + com.google.cloud.retail.v2alpha.Branch.QualityMetric.Builder, + com.google.cloud.retail.v2alpha.Branch.QualityMetricOrBuilder> + getQualityMetricsFieldBuilder() { + if (qualityMetricsBuilder_ == null) { + qualityMetricsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Branch.QualityMetric, + com.google.cloud.retail.v2alpha.Branch.QualityMetric.Builder, + com.google.cloud.retail.v2alpha.Branch.QualityMetricOrBuilder>( + qualityMetrics_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + qualityMetrics_ = null; + } + return qualityMetricsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.Branch) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.Branch) + private static final com.google.cloud.retail.v2alpha.Branch DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.Branch(); + } + + public static com.google.cloud.retail.v2alpha.Branch getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Branch parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.Branch getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BranchOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BranchOrBuilder.java new file mode 100644 index 000000000000..9aa8567c4d20 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BranchOrBuilder.java @@ -0,0 +1,316 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/branch.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface BranchOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.Branch) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. Full resource name of the branch, such as
+   * `projects/*/locations/global/catalogs/default_catalog/branches/branch_id`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Immutable. Full resource name of the branch, such as
+   * `projects/*/locations/global/catalogs/default_catalog/branches/branch_id`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Human readable name of the branch to display in the UI.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Output only. Human readable name of the branch to display in the UI.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. Indicates whether this branch is set as the default branch of
+   * its parent catalog.
+   * 
+ * + * bool is_default = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isDefault. + */ + boolean getIsDefault(); + + /** + * + * + *
+   * Output only. Timestamp of last import through
+   * [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts].
+   * Empty value means no import has been made to this branch.
+   * 
+ * + * + * .google.protobuf.Timestamp last_product_import_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastProductImportTime field is set. + */ + boolean hasLastProductImportTime(); + /** + * + * + *
+   * Output only. Timestamp of last import through
+   * [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts].
+   * Empty value means no import has been made to this branch.
+   * 
+ * + * + * .google.protobuf.Timestamp last_product_import_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastProductImportTime. + */ + com.google.protobuf.Timestamp getLastProductImportTime(); + /** + * + * + *
+   * Output only. Timestamp of last import through
+   * [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts].
+   * Empty value means no import has been made to this branch.
+   * 
+ * + * + * .google.protobuf.Timestamp last_product_import_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastProductImportTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Statistics for number of products in the branch, provided for
+   * different
+   * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getProductCountStatsList(); + /** + * + * + *
+   * Output only. Statistics for number of products in the branch, provided for
+   * different
+   * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.retail.v2alpha.Branch.ProductCountStatistic getProductCountStats(int index); + /** + * + * + *
+   * Output only. Statistics for number of products in the branch, provided for
+   * different
+   * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getProductCountStatsCount(); + /** + * + * + *
+   * Output only. Statistics for number of products in the branch, provided for
+   * different
+   * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getProductCountStatsOrBuilderList(); + /** + * + * + *
+   * Output only. Statistics for number of products in the branch, provided for
+   * different
+   * [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope].
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.ProductCountStatistic product_count_stats = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.retail.v2alpha.Branch.ProductCountStatisticOrBuilder + getProductCountStatsOrBuilder(int index); + + /** + * + * + *
+   * Output only. The quality metrics measured among products of this branch.
+   *
+   * See
+   * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+   * for supported metrics. Metrics could be missing if failed to retrieve.
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getQualityMetricsList(); + /** + * + * + *
+   * Output only. The quality metrics measured among products of this branch.
+   *
+   * See
+   * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+   * for supported metrics. Metrics could be missing if failed to retrieve.
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.retail.v2alpha.Branch.QualityMetric getQualityMetrics(int index); + /** + * + * + *
+   * Output only. The quality metrics measured among products of this branch.
+   *
+   * See
+   * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+   * for supported metrics. Metrics could be missing if failed to retrieve.
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getQualityMetricsCount(); + /** + * + * + *
+   * Output only. The quality metrics measured among products of this branch.
+   *
+   * See
+   * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+   * for supported metrics. Metrics could be missing if failed to retrieve.
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getQualityMetricsOrBuilderList(); + /** + * + * + *
+   * Output only. The quality metrics measured among products of this branch.
+   *
+   * See
+   * [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key]
+   * for supported metrics. Metrics could be missing if failed to retrieve.
+   *
+   * This field is not populated in [BranchView.BASIC][] view.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Branch.QualityMetric quality_metrics = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.retail.v2alpha.Branch.QualityMetricOrBuilder getQualityMetricsOrBuilder( + int index); +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BranchProto.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BranchProto.java new file mode 100644 index 000000000000..7c4d9ab4afb2 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BranchProto.java @@ -0,0 +1,161 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/branch.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public final class BranchProto { + private BranchProto() {} + + 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_retail_v2alpha_Branch_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_Branch_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_CountsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_CountsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_Branch_QualityMetric_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_Branch_QualityMetric_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/retail/v2alpha/branch.pro" + + "to\022\033google.cloud.retail.v2alpha\032\037google/" + + "api/field_behavior.proto\032\031google/api/res" + + "ource.proto\032)google/cloud/retail/v2alpha" + + "/product.proto\032\037google/protobuf/timestam" + + "p.proto\"\371\007\n\006Branch\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\003\022\027\n\nis_default\030\003" + + " \001(\010B\003\340A\003\022A\n\030last_product_import_time\030\005 " + + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\022[\n\023" + + "product_count_stats\030\007 \003(\01329.google.cloud" + + ".retail.v2alpha.Branch.ProductCountStati" + + "sticB\003\340A\003\022O\n\017quality_metrics\030\006 \003(\01321.goo" + + "gle.cloud.retail.v2alpha.Branch.QualityM" + + "etricB\003\340A\003\032\336\002\n\025ProductCountStatistic\022Z\n\005" + + "scope\030\001 \001(\0162K.google.cloud.retail.v2alph" + + "a.Branch.ProductCountStatistic.ProductCo" + + "untScope\022U\n\006counts\030\002 \003(\0132E.google.cloud." + + "retail.v2alpha.Branch.ProductCountStatis" + + "tic.CountsEntry\032-\n\013CountsEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\003:\0028\001\"c\n\021ProductCountSc" + + "ope\022#\n\037PRODUCT_COUNT_SCOPE_UNSPECIFIED\020\000" + + "\022\020\n\014ALL_PRODUCTS\020\001\022\027\n\023LAST_24_HOUR_UPDAT" + + "E\020\002\032\344\001\n\rQualityMetric\022\027\n\017requirement_key" + + "\030\001 \001(\t\022\037\n\027qualified_product_count\030\002 \001(\005\022" + + "!\n\031unqualified_product_count\030\003 \001(\005\022+\n#su" + + "ggested_quality_percent_threshold\030\004 \001(\001\022" + + "I\n\033unqualified_sample_products\030\005 \003(\0132$.g" + + "oogle.cloud.retail.v2alpha.Product:o\352Al\n" + + "\034retail.googleapis.com/Branch\022Lprojects/" + + "{project}/locations/{location}/catalogs/" + + "{catalog}/branches/{branch}*V\n\nBranchVie" + + "w\022\033\n\027BRANCH_VIEW_UNSPECIFIED\020\000\022\025\n\021BRANCH" + + "_VIEW_BASIC\020\001\022\024\n\020BRANCH_VIEW_FULL\020\002B\317\001\n\037" + + "com.google.cloud.retail.v2alphaB\013BranchP" + + "rotoP\001Z7cloud.google.com/go/retail/apiv2" + + "alpha/retailpb;retailpb\242\002\006RETAIL\252\002\033Googl" + + "e.Cloud.Retail.V2Alpha\312\002\033Google\\Cloud\\Re" + + "tail\\V2alpha\352\002\036Google::Cloud::Retail::V2" + + "alphab\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.retail.v2alpha.ProductProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_retail_v2alpha_Branch_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_retail_v2alpha_Branch_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_Branch_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "IsDefault", + "LastProductImportTime", + "ProductCountStats", + "QualityMetrics", + }); + internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_descriptor = + internal_static_google_cloud_retail_v2alpha_Branch_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_descriptor, + new java.lang.String[] { + "Scope", "Counts", + }); + internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_CountsEntry_descriptor = + internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_CountsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_Branch_ProductCountStatistic_CountsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_retail_v2alpha_Branch_QualityMetric_descriptor = + internal_static_google_cloud_retail_v2alpha_Branch_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_retail_v2alpha_Branch_QualityMetric_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_Branch_QualityMetric_descriptor, + new java.lang.String[] { + "RequirementKey", + "QualifiedProductCount", + "UnqualifiedProductCount", + "SuggestedQualityPercentThreshold", + "UnqualifiedSampleProducts", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.retail.v2alpha.ProductProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BranchServiceProto.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BranchServiceProto.java new file mode 100644 index 000000000000..86825c2af916 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BranchServiceProto.java @@ -0,0 +1,137 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/branch_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public final class BranchServiceProto { + private BranchServiceProto() {} + + 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_retail_v2alpha_ListBranchesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_ListBranchesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_ListBranchesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_ListBranchesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_GetBranchRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_GetBranchRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/retail/v2alpha/branch_ser" + + "vice.proto\022\033google.cloud.retail.v2alpha\032" + + "\034google/api/annotations.proto\032\027google/ap" + + "i/client.proto\032\037google/api/field_behavio" + + "r.proto\032\031google/api/resource.proto\032(goog" + + "le/cloud/retail/v2alpha/branch.proto\"\203\001\n" + + "\023ListBranchesRequest\0225\n\006parent\030\001 \001(\tB%\340A" + + "\002\372A\037\n\035retail.googleapis.com/Catalog\0225\n\004v" + + "iew\030\002 \001(\0162\'.google.cloud.retail.v2alpha." + + "BranchView\"M\n\024ListBranchesResponse\0225\n\010br" + + "anches\030\001 \003(\0132#.google.cloud.retail.v2alp" + + "ha.Branch\"}\n\020GetBranchRequest\0222\n\004name\030\001 " + + "\001(\tB$\340A\002\372A\036\n\034retail.googleapis.com/Branc" + + "h\0225\n\004view\030\002 \001(\0162\'.google.cloud.retail.v2" + + "alpha.BranchView2\316\003\n\rBranchService\022\302\001\n\014L" + + "istBranches\0220.google.cloud.retail.v2alph" + + "a.ListBranchesRequest\0321.google.cloud.ret" + + "ail.v2alpha.ListBranchesResponse\"M\332A\006par" + + "ent\202\323\344\223\002>\022\022 + * A view that specifies different level of fields of a + * [Branch][google.cloud.retail.v2alpha.Branch] to show in responses. + * + * + * Protobuf enum {@code google.cloud.retail.v2alpha.BranchView} + */ +public enum BranchView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The value when it's unspecified. This defaults to the BASIC view.
+   * 
+ * + * BRANCH_VIEW_UNSPECIFIED = 0; + */ + BRANCH_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * Includes basic metadata about the branch, but not statistical fields.
+   * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+   * to find what fields are excluded from BASIC view.
+   * 
+ * + * BRANCH_VIEW_BASIC = 1; + */ + BRANCH_VIEW_BASIC(1), + /** + * + * + *
+   * Includes all fields of a [Branch][google.cloud.retail.v2alpha.Branch].
+   * 
+ * + * BRANCH_VIEW_FULL = 2; + */ + BRANCH_VIEW_FULL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The value when it's unspecified. This defaults to the BASIC view.
+   * 
+ * + * BRANCH_VIEW_UNSPECIFIED = 0; + */ + public static final int BRANCH_VIEW_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Includes basic metadata about the branch, but not statistical fields.
+   * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+   * to find what fields are excluded from BASIC view.
+   * 
+ * + * BRANCH_VIEW_BASIC = 1; + */ + public static final int BRANCH_VIEW_BASIC_VALUE = 1; + /** + * + * + *
+   * Includes all fields of a [Branch][google.cloud.retail.v2alpha.Branch].
+   * 
+ * + * BRANCH_VIEW_FULL = 2; + */ + public static final int BRANCH_VIEW_FULL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BranchView 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 BranchView forNumber(int value) { + switch (value) { + case 0: + return BRANCH_VIEW_UNSPECIFIED; + case 1: + return BRANCH_VIEW_BASIC; + case 2: + return BRANCH_VIEW_FULL; + 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 BranchView findValueByNumber(int number) { + return BranchView.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.BranchProto.getDescriptor().getEnumTypes().get(0); + } + + private static final BranchView[] VALUES = values(); + + public static BranchView 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 BranchView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2alpha.BranchView) +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Catalog.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Catalog.java index 755556f7b004..7f0fbaf3963a 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Catalog.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Catalog.java @@ -245,9 +245,9 @@ public com.google.cloud.retail.v2alpha.ProductLevelConfig getProductLevelConfig( * *
    * The Merchant Center linking configuration.
-   * Once a link is added, the data stream from Merchant Center to Cloud Retail
+   * After a link is added, the data stream from Merchant Center to Cloud Retail
    * will be enabled automatically. The requester must have access to the
-   * merchant center account in order to make changes to this field.
+   * Merchant Center account in order to make changes to this field.
    * 
* * @@ -265,9 +265,9 @@ public boolean hasMerchantCenterLinkingConfig() { * *
    * The Merchant Center linking configuration.
-   * Once a link is added, the data stream from Merchant Center to Cloud Retail
+   * After a link is added, the data stream from Merchant Center to Cloud Retail
    * will be enabled automatically. The requester must have access to the
-   * merchant center account in order to make changes to this field.
+   * Merchant Center account in order to make changes to this field.
    * 
* * @@ -288,9 +288,9 @@ public boolean hasMerchantCenterLinkingConfig() { * *
    * The Merchant Center linking configuration.
-   * Once a link is added, the data stream from Merchant Center to Cloud Retail
+   * After a link is added, the data stream from Merchant Center to Cloud Retail
    * will be enabled automatically. The requester must have access to the
-   * merchant center account in order to make changes to this field.
+   * Merchant Center account in order to make changes to this field.
    * 
* * @@ -1223,9 +1223,9 @@ public Builder clearProductLevelConfig() { * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1242,9 +1242,9 @@ public boolean hasMerchantCenterLinkingConfig() { * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1268,9 +1268,9 @@ public boolean hasMerchantCenterLinkingConfig() { * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1296,9 +1296,9 @@ public Builder setMerchantCenterLinkingConfig( * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1321,9 +1321,9 @@ public Builder setMerchantCenterLinkingConfig( * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1356,9 +1356,9 @@ public Builder mergeMerchantCenterLinkingConfig( * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1380,9 +1380,9 @@ public Builder clearMerchantCenterLinkingConfig() { * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1400,9 +1400,9 @@ public Builder clearMerchantCenterLinkingConfig() { * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1424,9 +1424,9 @@ public Builder clearMerchantCenterLinkingConfig() { * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttribute.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttribute.java index abe24b89c207..b404019032b3 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttribute.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttribute.java @@ -1032,6 +1032,7900 @@ private RetrievableOption(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2alpha.CatalogAttribute.RetrievableOption) } + public interface FacetConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + java.util.List getFacetIntervalsList(); + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + com.google.cloud.retail.v2alpha.Interval getFacetIntervals(int index); + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + int getFacetIntervalsCount(); + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + java.util.List + getFacetIntervalsOrBuilderList(); + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + com.google.cloud.retail.v2alpha.IntervalOrBuilder getFacetIntervalsOrBuilder(int index); + + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + java.util.List + getIgnoredFacetValuesList(); + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + getIgnoredFacetValues(int index); + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + int getIgnoredFacetValuesCount(); + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .IgnoredFacetValuesOrBuilder> + getIgnoredFacetValuesOrBuilderList(); + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder + getIgnoredFacetValuesOrBuilder(int index); + + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + java.util.List + getMergedFacetValuesList(); + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + getMergedFacetValues(int index); + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + int getMergedFacetValuesCount(); + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .MergedFacetValueOrBuilder> + getMergedFacetValuesOrBuilderList(); + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder + getMergedFacetValuesOrBuilder(int index); + + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return Whether the mergedFacet field is set. + */ + boolean hasMergedFacet(); + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return The mergedFacet. + */ + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet getMergedFacet(); + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetOrBuilder + getMergedFacetOrBuilder(); + + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return Whether the rerankConfig field is set. + */ + boolean hasRerankConfig(); + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return The rerankConfig. + */ + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig getRerankConfig(); + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfigOrBuilder + getRerankConfigOrBuilder(); + } + /** + * + * + *
+   * Possible options for the facet that corresponds to the current attribute
+   * config.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig} + */ + public static final class FacetConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig) + FacetConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use FacetConfig.newBuilder() to construct. + private FacetConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FacetConfig() { + facetIntervals_ = java.util.Collections.emptyList(); + ignoredFacetValues_ = java.util.Collections.emptyList(); + mergedFacetValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FacetConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.class, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.Builder.class); + } + + public interface IgnoredFacetValuesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + int getValuesCount(); + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + java.lang.String getValues(int index); + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + com.google.protobuf.ByteString getValuesBytes(int index); + + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + } + /** + * + * + *
+     * [Facet values][google.cloud.retail.v2alpha.SearchResponse.Facet.values]
+     * to ignore on [facets][google.cloud.retail.v2alpha.SearchResponse.Facet]
+     * during the specified time range for the given
+     * [SearchResponse.Facet.key][google.cloud.retail.v2alpha.SearchResponse.Facet.key]
+     * attribute.
+     * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues} + */ + public static final class IgnoredFacetValues extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues) + IgnoredFacetValuesOrBuilder { + private static final long serialVersionUID = 0L; + // Use IgnoredFacetValues.newBuilder() to construct. + private IgnoredFacetValues(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IgnoredFacetValues() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IgnoredFacetValues(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_IgnoredFacetValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + .class, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + .Builder.class); + } + + private int bitField0_; + public static final int VALUES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_; + } + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 < values_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, values_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getEndTime()); + } + 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 < values_.size(); i++) { + dataSize += computeStringSizeNoTag(values_.getRaw(i)); + } + size += dataSize; + size += 1 * getValuesList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues other = + (com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues) obj; + + if (!getValuesList().equals(other.getValuesList())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) 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 (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * [Facet values][google.cloud.retail.v2alpha.SearchResponse.Facet.values]
+       * to ignore on [facets][google.cloud.retail.v2alpha.SearchResponse.Facet]
+       * during the specified time range for the given
+       * [SearchResponse.Facet.key][google.cloud.retail.v2alpha.SearchResponse.Facet.key]
+       * attribute.
+       * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues) + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_IgnoredFacetValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + .class, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + .Builder.class); + } + + // Construct using + // com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + build() { + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + buildPartial() { + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues result = + new com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); + result.values_ = values_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues) { + return mergeFrom( + (com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues other) { + if (other + == com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + .getDefaultInstance()) return this; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ |= 0x00000001; + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(); + ensureValuesIsMutable(); + values_.add(s); + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureValuesIsMutable() { + if (!values_.isModifiable()) { + values_ = new com.google.protobuf.LazyStringArrayList(values_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + values_.makeImmutable(); + return values_; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param value The bytes of the values to add. + * @return This builder for chaining. + */ + public Builder addValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @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(); + } + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues) + private static final com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .IgnoredFacetValues + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues(); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IgnoredFacetValues parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MergedFacetValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + int getValuesCount(); + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + java.lang.String getValues(int index); + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + com.google.protobuf.ByteString getValuesBytes(int index); + + /** + * + * + *
+       * All the previous values are replaced by this merged facet value.
+       * This merged_value must be non-empty and can have up to 128 characters.
+       * 
+ * + * string merged_value = 2; + * + * @return The mergedValue. + */ + java.lang.String getMergedValue(); + /** + * + * + *
+       * All the previous values are replaced by this merged facet value.
+       * This merged_value must be non-empty and can have up to 128 characters.
+       * 
+ * + * string merged_value = 2; + * + * @return The bytes for mergedValue. + */ + com.google.protobuf.ByteString getMergedValueBytes(); + } + /** + * + * + *
+     * Replaces a set of textual facet values by the same (possibly different)
+     * merged facet value. Each facet value should appear at most once as a
+     * value per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]. This
+     * feature is available only for textual custom attributes.
+     * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue} + */ + public static final class MergedFacetValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue) + MergedFacetValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use MergedFacetValue.newBuilder() to construct. + private MergedFacetValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MergedFacetValue() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + mergedValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MergedFacetValue(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacetValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.class, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + .Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_; + } + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + public static final int MERGED_VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object mergedValue_ = ""; + /** + * + * + *
+       * All the previous values are replaced by this merged facet value.
+       * This merged_value must be non-empty and can have up to 128 characters.
+       * 
+ * + * string merged_value = 2; + * + * @return The mergedValue. + */ + @java.lang.Override + public java.lang.String getMergedValue() { + java.lang.Object ref = mergedValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergedValue_ = s; + return s; + } + } + /** + * + * + *
+       * All the previous values are replaced by this merged facet value.
+       * This merged_value must be non-empty and can have up to 128 characters.
+       * 
+ * + * string merged_value = 2; + * + * @return The bytes for mergedValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMergedValueBytes() { + java.lang.Object ref = mergedValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mergedValue_ = 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 < values_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, values_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mergedValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mergedValue_); + } + 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 < values_.size(); i++) { + dataSize += computeStringSizeNoTag(values_.getRaw(i)); + } + size += dataSize; + size += 1 * getValuesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mergedValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mergedValue_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue other = + (com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue) obj; + + if (!getValuesList().equals(other.getValuesList())) return false; + if (!getMergedValue().equals(other.getMergedValue())) 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 (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (37 * hash) + MERGED_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getMergedValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Replaces a set of textual facet values by the same (possibly different)
+       * merged facet value. Each facet value should appear at most once as a
+       * value per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue) + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacetValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + .class, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + .Builder.class); + } + + // Construct using + // com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + mergedValue_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + build() { + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + buildPartial() { + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue result = + new com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); + result.values_ = values_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.mergedValue_ = mergedValue_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue) { + return mergeFrom( + (com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue other) { + if (other + == com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + .getDefaultInstance()) return this; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ |= 0x00000001; + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + if (!other.getMergedValue().isEmpty()) { + mergedValue_ = other.mergedValue_; + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureValuesIsMutable(); + values_.add(s); + break; + } // case 10 + case 18: + { + mergedValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureValuesIsMutable() { + if (!values_.isModifiable()) { + values_ = new com.google.protobuf.LazyStringArrayList(values_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + values_.makeImmutable(); + return values_; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param value The bytes of the values to add. + * @return This builder for chaining. + */ + public Builder addValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object mergedValue_ = ""; + /** + * + * + *
+         * All the previous values are replaced by this merged facet value.
+         * This merged_value must be non-empty and can have up to 128 characters.
+         * 
+ * + * string merged_value = 2; + * + * @return The mergedValue. + */ + public java.lang.String getMergedValue() { + java.lang.Object ref = mergedValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergedValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * All the previous values are replaced by this merged facet value.
+         * This merged_value must be non-empty and can have up to 128 characters.
+         * 
+ * + * string merged_value = 2; + * + * @return The bytes for mergedValue. + */ + public com.google.protobuf.ByteString getMergedValueBytes() { + java.lang.Object ref = mergedValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mergedValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * All the previous values are replaced by this merged facet value.
+         * This merged_value must be non-empty and can have up to 128 characters.
+         * 
+ * + * string merged_value = 2; + * + * @param value The mergedValue to set. + * @return This builder for chaining. + */ + public Builder setMergedValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mergedValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * All the previous values are replaced by this merged facet value.
+         * This merged_value must be non-empty and can have up to 128 characters.
+         * 
+ * + * string merged_value = 2; + * + * @return This builder for chaining. + */ + public Builder clearMergedValue() { + mergedValue_ = getDefaultInstance().getMergedValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * All the previous values are replaced by this merged facet value.
+         * This merged_value must be non-empty and can have up to 128 characters.
+         * 
+ * + * string merged_value = 2; + * + * @param value The bytes for mergedValue to set. + * @return This builder for chaining. + */ + public Builder setMergedValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mergedValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue) + private static final com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .MergedFacetValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue(); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MergedFacetValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MergedFacetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The merged facet key should be a valid facet key that is different than
+       * the facet key of the current catalog attribute. We refer this is
+       * merged facet key as the child of the current catalog attribute. This
+       * merged facet key can't be a parent of another facet key (i.e. no
+       * directed path of length 2). This merged facet key needs to be either a
+       * textual custom attribute or a numerical custom attribute.
+       * 
+ * + * string merged_facet_key = 1; + * + * @return The mergedFacetKey. + */ + java.lang.String getMergedFacetKey(); + /** + * + * + *
+       * The merged facet key should be a valid facet key that is different than
+       * the facet key of the current catalog attribute. We refer this is
+       * merged facet key as the child of the current catalog attribute. This
+       * merged facet key can't be a parent of another facet key (i.e. no
+       * directed path of length 2). This merged facet key needs to be either a
+       * textual custom attribute or a numerical custom attribute.
+       * 
+ * + * string merged_facet_key = 1; + * + * @return The bytes for mergedFacetKey. + */ + com.google.protobuf.ByteString getMergedFacetKeyBytes(); + } + /** + * + * + *
+     * The current facet key (i.e. attribute config) maps into the
+     * [merged_facet_key][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet.merged_facet_key].
+     * A facet key can have at most one child. The current facet key and the
+     * merged facet key need both to be textual custom attributes or both
+     * numerical custom attributes (same type).
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet} + */ + public static final class MergedFacet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet) + MergedFacetOrBuilder { + private static final long serialVersionUID = 0L; + // Use MergedFacet.newBuilder() to construct. + private MergedFacet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MergedFacet() { + mergedFacetKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MergedFacet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet.class, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet.Builder + .class); + } + + public static final int MERGED_FACET_KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object mergedFacetKey_ = ""; + /** + * + * + *
+       * The merged facet key should be a valid facet key that is different than
+       * the facet key of the current catalog attribute. We refer this is
+       * merged facet key as the child of the current catalog attribute. This
+       * merged facet key can't be a parent of another facet key (i.e. no
+       * directed path of length 2). This merged facet key needs to be either a
+       * textual custom attribute or a numerical custom attribute.
+       * 
+ * + * string merged_facet_key = 1; + * + * @return The mergedFacetKey. + */ + @java.lang.Override + public java.lang.String getMergedFacetKey() { + java.lang.Object ref = mergedFacetKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergedFacetKey_ = s; + return s; + } + } + /** + * + * + *
+       * The merged facet key should be a valid facet key that is different than
+       * the facet key of the current catalog attribute. We refer this is
+       * merged facet key as the child of the current catalog attribute. This
+       * merged facet key can't be a parent of another facet key (i.e. no
+       * directed path of length 2). This merged facet key needs to be either a
+       * textual custom attribute or a numerical custom attribute.
+       * 
+ * + * string merged_facet_key = 1; + * + * @return The bytes for mergedFacetKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMergedFacetKeyBytes() { + java.lang.Object ref = mergedFacetKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mergedFacetKey_ = 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.GeneratedMessageV3.isStringEmpty(mergedFacetKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mergedFacetKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mergedFacetKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mergedFacetKey_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet other = + (com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet) obj; + + if (!getMergedFacetKey().equals(other.getMergedFacetKey())) 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) + MERGED_FACET_KEY_FIELD_NUMBER; + hash = (53 * hash) + getMergedFacetKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * The current facet key (i.e. attribute config) maps into the
+       * [merged_facet_key][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet.merged_facet_key].
+       * A facet key can have at most one child. The current facet key and the
+       * merged facet key need both to be textual custom attributes or both
+       * numerical custom attributes (same type).
+       * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet) + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet.class, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet.Builder + .class); + } + + // Construct using + // com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mergedFacetKey_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacet_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet build() { + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + buildPartial() { + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet result = + new com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mergedFacetKey_ = mergedFacetKey_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet) { + return mergeFrom( + (com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet other) { + if (other + == com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance()) return this; + if (!other.getMergedFacetKey().isEmpty()) { + mergedFacetKey_ = other.mergedFacetKey_; + 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: + { + mergedFacetKey_ = 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 mergedFacetKey_ = ""; + /** + * + * + *
+         * The merged facet key should be a valid facet key that is different than
+         * the facet key of the current catalog attribute. We refer this is
+         * merged facet key as the child of the current catalog attribute. This
+         * merged facet key can't be a parent of another facet key (i.e. no
+         * directed path of length 2). This merged facet key needs to be either a
+         * textual custom attribute or a numerical custom attribute.
+         * 
+ * + * string merged_facet_key = 1; + * + * @return The mergedFacetKey. + */ + public java.lang.String getMergedFacetKey() { + java.lang.Object ref = mergedFacetKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergedFacetKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The merged facet key should be a valid facet key that is different than
+         * the facet key of the current catalog attribute. We refer this is
+         * merged facet key as the child of the current catalog attribute. This
+         * merged facet key can't be a parent of another facet key (i.e. no
+         * directed path of length 2). This merged facet key needs to be either a
+         * textual custom attribute or a numerical custom attribute.
+         * 
+ * + * string merged_facet_key = 1; + * + * @return The bytes for mergedFacetKey. + */ + public com.google.protobuf.ByteString getMergedFacetKeyBytes() { + java.lang.Object ref = mergedFacetKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mergedFacetKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The merged facet key should be a valid facet key that is different than
+         * the facet key of the current catalog attribute. We refer this is
+         * merged facet key as the child of the current catalog attribute. This
+         * merged facet key can't be a parent of another facet key (i.e. no
+         * directed path of length 2). This merged facet key needs to be either a
+         * textual custom attribute or a numerical custom attribute.
+         * 
+ * + * string merged_facet_key = 1; + * + * @param value The mergedFacetKey to set. + * @return This builder for chaining. + */ + public Builder setMergedFacetKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mergedFacetKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The merged facet key should be a valid facet key that is different than
+         * the facet key of the current catalog attribute. We refer this is
+         * merged facet key as the child of the current catalog attribute. This
+         * merged facet key can't be a parent of another facet key (i.e. no
+         * directed path of length 2). This merged facet key needs to be either a
+         * textual custom attribute or a numerical custom attribute.
+         * 
+ * + * string merged_facet_key = 1; + * + * @return This builder for chaining. + */ + public Builder clearMergedFacetKey() { + mergedFacetKey_ = getDefaultInstance().getMergedFacetKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * The merged facet key should be a valid facet key that is different than
+         * the facet key of the current catalog attribute. We refer this is
+         * merged facet key as the child of the current catalog attribute. This
+         * merged facet key can't be a parent of another facet key (i.e. no
+         * directed path of length 2). This merged facet key needs to be either a
+         * textual custom attribute or a numerical custom attribute.
+         * 
+ * + * string merged_facet_key = 1; + * + * @param value The bytes for mergedFacetKey to set. + * @return This builder for chaining. + */ + public Builder setMergedFacetKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mergedFacetKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet) + private static final com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet(); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MergedFacet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RerankConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * If set to true, then we also rerank the dynamic facets based on the
+       * facet values engaged by the user for the current attribute key during
+       * serving.
+       * 
+ * + * bool rerank_facet = 1; + * + * @return The rerankFacet. + */ + boolean getRerankFacet(); + + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @return A list containing the facetValues. + */ + java.util.List getFacetValuesList(); + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @return The count of facetValues. + */ + int getFacetValuesCount(); + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the element to return. + * @return The facetValues at the given index. + */ + java.lang.String getFacetValues(int index); + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the value to return. + * @return The bytes of the facetValues at the given index. + */ + com.google.protobuf.ByteString getFacetValuesBytes(int index); + } + /** + * + * + *
+     * Options to rerank based on facet values engaged by the user for the
+     * current key. That key needs to be a custom textual key and facetable.
+     * To use this control, you also need to pass all the facet keys engaged by
+     * the user in the request using the field [SearchRequest.FacetSpec]. In
+     * particular, if you don't pass the facet keys engaged that you want to
+     * rerank on, this control won't be effective. Moreover, to obtain better
+     * results, the facet values that you want to rerank on should be close to
+     * English (ideally made of words, underscores, and spaces).
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig} + */ + public static final class RerankConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig) + RerankConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RerankConfig.newBuilder() to construct. + private RerankConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RerankConfig() { + facetValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RerankConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_RerankConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_RerankConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig.class, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig.Builder + .class); + } + + public static final int RERANK_FACET_FIELD_NUMBER = 1; + private boolean rerankFacet_ = false; + /** + * + * + *
+       * If set to true, then we also rerank the dynamic facets based on the
+       * facet values engaged by the user for the current attribute key during
+       * serving.
+       * 
+ * + * bool rerank_facet = 1; + * + * @return The rerankFacet. + */ + @java.lang.Override + public boolean getRerankFacet() { + return rerankFacet_; + } + + public static final int FACET_VALUES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList facetValues_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @return A list containing the facetValues. + */ + public com.google.protobuf.ProtocolStringList getFacetValuesList() { + return facetValues_; + } + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @return The count of facetValues. + */ + public int getFacetValuesCount() { + return facetValues_.size(); + } + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the element to return. + * @return The facetValues at the given index. + */ + public java.lang.String getFacetValues(int index) { + return facetValues_.get(index); + } + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the value to return. + * @return The bytes of the facetValues at the given index. + */ + public com.google.protobuf.ByteString getFacetValuesBytes(int index) { + return facetValues_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (rerankFacet_ != false) { + output.writeBool(1, rerankFacet_); + } + for (int i = 0; i < facetValues_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, facetValues_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rerankFacet_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, rerankFacet_); + } + { + int dataSize = 0; + for (int i = 0; i < facetValues_.size(); i++) { + dataSize += computeStringSizeNoTag(facetValues_.getRaw(i)); + } + size += dataSize; + size += 1 * getFacetValuesList().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.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig other = + (com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig) obj; + + if (getRerankFacet() != other.getRerankFacet()) return false; + if (!getFacetValuesList().equals(other.getFacetValuesList())) 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) + RERANK_FACET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRerankFacet()); + if (getFacetValuesCount() > 0) { + hash = (37 * hash) + FACET_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getFacetValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Options to rerank based on facet values engaged by the user for the
+       * current key. That key needs to be a custom textual key and facetable.
+       * To use this control, you also need to pass all the facet keys engaged by
+       * the user in the request using the field [SearchRequest.FacetSpec]. In
+       * particular, if you don't pass the facet keys engaged that you want to
+       * rerank on, this control won't be effective. Moreover, to obtain better
+       * results, the facet values that you want to rerank on should be close to
+       * English (ideally made of words, underscores, and spaces).
+       * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig) + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_RerankConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_RerankConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig.class, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rerankFacet_ = false; + facetValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_RerankConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig build() { + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + buildPartial() { + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig result = + new com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rerankFacet_ = rerankFacet_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + facetValues_.makeImmutable(); + result.facetValues_ = facetValues_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig) { + return mergeFrom( + (com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig other) { + if (other + == com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance()) return this; + if (other.getRerankFacet() != false) { + setRerankFacet(other.getRerankFacet()); + } + if (!other.facetValues_.isEmpty()) { + if (facetValues_.isEmpty()) { + facetValues_ = other.facetValues_; + bitField0_ |= 0x00000002; + } else { + ensureFacetValuesIsMutable(); + facetValues_.addAll(other.facetValues_); + } + 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: + { + rerankFacet_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFacetValuesIsMutable(); + facetValues_.add(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 bitField0_; + + private boolean rerankFacet_; + /** + * + * + *
+         * If set to true, then we also rerank the dynamic facets based on the
+         * facet values engaged by the user for the current attribute key during
+         * serving.
+         * 
+ * + * bool rerank_facet = 1; + * + * @return The rerankFacet. + */ + @java.lang.Override + public boolean getRerankFacet() { + return rerankFacet_; + } + /** + * + * + *
+         * If set to true, then we also rerank the dynamic facets based on the
+         * facet values engaged by the user for the current attribute key during
+         * serving.
+         * 
+ * + * bool rerank_facet = 1; + * + * @param value The rerankFacet to set. + * @return This builder for chaining. + */ + public Builder setRerankFacet(boolean value) { + + rerankFacet_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * If set to true, then we also rerank the dynamic facets based on the
+         * facet values engaged by the user for the current attribute key during
+         * serving.
+         * 
+ * + * bool rerank_facet = 1; + * + * @return This builder for chaining. + */ + public Builder clearRerankFacet() { + bitField0_ = (bitField0_ & ~0x00000001); + rerankFacet_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList facetValues_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureFacetValuesIsMutable() { + if (!facetValues_.isModifiable()) { + facetValues_ = new com.google.protobuf.LazyStringArrayList(facetValues_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @return A list containing the facetValues. + */ + public com.google.protobuf.ProtocolStringList getFacetValuesList() { + facetValues_.makeImmutable(); + return facetValues_; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @return The count of facetValues. + */ + public int getFacetValuesCount() { + return facetValues_.size(); + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the element to return. + * @return The facetValues at the given index. + */ + public java.lang.String getFacetValues(int index) { + return facetValues_.get(index); + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the value to return. + * @return The bytes of the facetValues at the given index. + */ + public com.google.protobuf.ByteString getFacetValuesBytes(int index) { + return facetValues_.getByteString(index); + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param index The index to set the value at. + * @param value The facetValues to set. + * @return This builder for chaining. + */ + public Builder setFacetValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetValuesIsMutable(); + facetValues_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param value The facetValues to add. + * @return This builder for chaining. + */ + public Builder addFacetValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetValuesIsMutable(); + facetValues_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param values The facetValues to add. + * @return This builder for chaining. + */ + public Builder addAllFacetValues(java.lang.Iterable values) { + ensureFacetValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, facetValues_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @return This builder for chaining. + */ + public Builder clearFacetValues() { + facetValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param value The bytes of the facetValues to add. + * @return This builder for chaining. + */ + public Builder addFacetValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFacetValuesIsMutable(); + facetValues_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig) + private static final com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig(); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RerankConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int FACET_INTERVALS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List facetIntervals_; + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + @java.lang.Override + public java.util.List getFacetIntervalsList() { + return facetIntervals_; + } + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + @java.lang.Override + public java.util.List + getFacetIntervalsOrBuilderList() { + return facetIntervals_; + } + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + @java.lang.Override + public int getFacetIntervalsCount() { + return facetIntervals_.size(); + } + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Interval getFacetIntervals(int index) { + return facetIntervals_.get(index); + } + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.IntervalOrBuilder getFacetIntervalsOrBuilder(int index) { + return facetIntervals_.get(index); + } + + public static final int IGNORED_FACET_VALUES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues> + ignoredFacetValues_; + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues> + getIgnoredFacetValuesList() { + return ignoredFacetValues_; + } + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .IgnoredFacetValuesOrBuilder> + getIgnoredFacetValuesOrBuilderList() { + return ignoredFacetValues_; + } + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + @java.lang.Override + public int getIgnoredFacetValuesCount() { + return ignoredFacetValues_.size(); + } + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + getIgnoredFacetValues(int index) { + return ignoredFacetValues_.get(index); + } + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder + getIgnoredFacetValuesOrBuilder(int index) { + return ignoredFacetValues_.get(index); + } + + public static final int MERGED_FACET_VALUES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue> + mergedFacetValues_; + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue> + getMergedFacetValuesList() { + return mergedFacetValues_; + } + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .MergedFacetValueOrBuilder> + getMergedFacetValuesOrBuilderList() { + return mergedFacetValues_; + } + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + @java.lang.Override + public int getMergedFacetValuesCount() { + return mergedFacetValues_.size(); + } + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + getMergedFacetValues(int index) { + return mergedFacetValues_.get(index); + } + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder + getMergedFacetValuesOrBuilder(int index) { + return mergedFacetValues_.get(index); + } + + public static final int MERGED_FACET_FIELD_NUMBER = 4; + private com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet mergedFacet_; + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return Whether the mergedFacet field is set. + */ + @java.lang.Override + public boolean hasMergedFacet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return The mergedFacet. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + getMergedFacet() { + return mergedFacet_ == null + ? com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance() + : mergedFacet_; + } + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetOrBuilder + getMergedFacetOrBuilder() { + return mergedFacet_ == null + ? com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance() + : mergedFacet_; + } + + public static final int RERANK_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerankConfig_; + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return Whether the rerankConfig field is set. + */ + @java.lang.Override + public boolean hasRerankConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return The rerankConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + getRerankConfig() { + return rerankConfig_ == null + ? com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance() + : rerankConfig_; + } + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfigOrBuilder + getRerankConfigOrBuilder() { + return rerankConfig_ == null + ? com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance() + : rerankConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 < facetIntervals_.size(); i++) { + output.writeMessage(1, facetIntervals_.get(i)); + } + for (int i = 0; i < ignoredFacetValues_.size(); i++) { + output.writeMessage(2, ignoredFacetValues_.get(i)); + } + for (int i = 0; i < mergedFacetValues_.size(); i++) { + output.writeMessage(3, mergedFacetValues_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getMergedFacet()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getRerankConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < facetIntervals_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, facetIntervals_.get(i)); + } + for (int i = 0; i < ignoredFacetValues_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, ignoredFacetValues_.get(i)); + } + for (int i = 0; i < mergedFacetValues_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, mergedFacetValues_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getMergedFacet()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRerankConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2alpha.CatalogAttribute.FacetConfig)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig other = + (com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig) obj; + + if (!getFacetIntervalsList().equals(other.getFacetIntervalsList())) return false; + if (!getIgnoredFacetValuesList().equals(other.getIgnoredFacetValuesList())) return false; + if (!getMergedFacetValuesList().equals(other.getMergedFacetValuesList())) return false; + if (hasMergedFacet() != other.hasMergedFacet()) return false; + if (hasMergedFacet()) { + if (!getMergedFacet().equals(other.getMergedFacet())) return false; + } + if (hasRerankConfig() != other.hasRerankConfig()) return false; + if (hasRerankConfig()) { + if (!getRerankConfig().equals(other.getRerankConfig())) 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 (getFacetIntervalsCount() > 0) { + hash = (37 * hash) + FACET_INTERVALS_FIELD_NUMBER; + hash = (53 * hash) + getFacetIntervalsList().hashCode(); + } + if (getIgnoredFacetValuesCount() > 0) { + hash = (37 * hash) + IGNORED_FACET_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getIgnoredFacetValuesList().hashCode(); + } + if (getMergedFacetValuesCount() > 0) { + hash = (37 * hash) + MERGED_FACET_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getMergedFacetValuesList().hashCode(); + } + if (hasMergedFacet()) { + hash = (37 * hash) + MERGED_FACET_FIELD_NUMBER; + hash = (53 * hash) + getMergedFacet().hashCode(); + } + if (hasRerankConfig()) { + hash = (37 * hash) + RERANK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getRerankConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.CatalogAttribute.FacetConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Possible options for the facet that corresponds to the current attribute
+     * config.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig) + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.class, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFacetIntervalsFieldBuilder(); + getIgnoredFacetValuesFieldBuilder(); + getMergedFacetValuesFieldBuilder(); + getMergedFacetFieldBuilder(); + getRerankConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (facetIntervalsBuilder_ == null) { + facetIntervals_ = java.util.Collections.emptyList(); + } else { + facetIntervals_ = null; + facetIntervalsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (ignoredFacetValuesBuilder_ == null) { + ignoredFacetValues_ = java.util.Collections.emptyList(); + } else { + ignoredFacetValues_ = null; + ignoredFacetValuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (mergedFacetValuesBuilder_ == null) { + mergedFacetValues_ = java.util.Collections.emptyList(); + } else { + mergedFacetValues_ = null; + mergedFacetValuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + mergedFacet_ = null; + if (mergedFacetBuilder_ != null) { + mergedFacetBuilder_.dispose(); + mergedFacetBuilder_ = null; + } + rerankConfig_ = null; + if (rerankConfigBuilder_ != null) { + rerankConfigBuilder_.dispose(); + rerankConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.CatalogProto + .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig build() { + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig buildPartial() { + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig result = + new com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig result) { + if (facetIntervalsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + facetIntervals_ = java.util.Collections.unmodifiableList(facetIntervals_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.facetIntervals_ = facetIntervals_; + } else { + result.facetIntervals_ = facetIntervalsBuilder_.build(); + } + if (ignoredFacetValuesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + ignoredFacetValues_ = java.util.Collections.unmodifiableList(ignoredFacetValues_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.ignoredFacetValues_ = ignoredFacetValues_; + } else { + result.ignoredFacetValues_ = ignoredFacetValuesBuilder_.build(); + } + if (mergedFacetValuesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + mergedFacetValues_ = java.util.Collections.unmodifiableList(mergedFacetValues_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.mergedFacetValues_ = mergedFacetValues_; + } else { + result.mergedFacetValues_ = mergedFacetValuesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.mergedFacet_ = + mergedFacetBuilder_ == null ? mergedFacet_ : mergedFacetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.rerankConfig_ = + rerankConfigBuilder_ == null ? rerankConfig_ : rerankConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig) { + return mergeFrom((com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig other) { + if (other + == com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.getDefaultInstance()) + return this; + if (facetIntervalsBuilder_ == null) { + if (!other.facetIntervals_.isEmpty()) { + if (facetIntervals_.isEmpty()) { + facetIntervals_ = other.facetIntervals_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFacetIntervalsIsMutable(); + facetIntervals_.addAll(other.facetIntervals_); + } + onChanged(); + } + } else { + if (!other.facetIntervals_.isEmpty()) { + if (facetIntervalsBuilder_.isEmpty()) { + facetIntervalsBuilder_.dispose(); + facetIntervalsBuilder_ = null; + facetIntervals_ = other.facetIntervals_; + bitField0_ = (bitField0_ & ~0x00000001); + facetIntervalsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFacetIntervalsFieldBuilder() + : null; + } else { + facetIntervalsBuilder_.addAllMessages(other.facetIntervals_); + } + } + } + if (ignoredFacetValuesBuilder_ == null) { + if (!other.ignoredFacetValues_.isEmpty()) { + if (ignoredFacetValues_.isEmpty()) { + ignoredFacetValues_ = other.ignoredFacetValues_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.addAll(other.ignoredFacetValues_); + } + onChanged(); + } + } else { + if (!other.ignoredFacetValues_.isEmpty()) { + if (ignoredFacetValuesBuilder_.isEmpty()) { + ignoredFacetValuesBuilder_.dispose(); + ignoredFacetValuesBuilder_ = null; + ignoredFacetValues_ = other.ignoredFacetValues_; + bitField0_ = (bitField0_ & ~0x00000002); + ignoredFacetValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIgnoredFacetValuesFieldBuilder() + : null; + } else { + ignoredFacetValuesBuilder_.addAllMessages(other.ignoredFacetValues_); + } + } + } + if (mergedFacetValuesBuilder_ == null) { + if (!other.mergedFacetValues_.isEmpty()) { + if (mergedFacetValues_.isEmpty()) { + mergedFacetValues_ = other.mergedFacetValues_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.addAll(other.mergedFacetValues_); + } + onChanged(); + } + } else { + if (!other.mergedFacetValues_.isEmpty()) { + if (mergedFacetValuesBuilder_.isEmpty()) { + mergedFacetValuesBuilder_.dispose(); + mergedFacetValuesBuilder_ = null; + mergedFacetValues_ = other.mergedFacetValues_; + bitField0_ = (bitField0_ & ~0x00000004); + mergedFacetValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMergedFacetValuesFieldBuilder() + : null; + } else { + mergedFacetValuesBuilder_.addAllMessages(other.mergedFacetValues_); + } + } + } + if (other.hasMergedFacet()) { + mergeMergedFacet(other.getMergedFacet()); + } + if (other.hasRerankConfig()) { + mergeRerankConfig(other.getRerankConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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.retail.v2alpha.Interval m = + input.readMessage( + com.google.cloud.retail.v2alpha.Interval.parser(), extensionRegistry); + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + facetIntervals_.add(m); + } else { + facetIntervalsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + m = + input.readMessage( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .IgnoredFacetValues.parser(), + extensionRegistry); + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.add(m); + } else { + ignoredFacetValuesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue m = + input.readMessage( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .MergedFacetValue.parser(), + extensionRegistry); + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.add(m); + } else { + mergedFacetValuesBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + input.readMessage(getMergedFacetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getRerankConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List facetIntervals_ = + java.util.Collections.emptyList(); + + private void ensureFacetIntervalsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + facetIntervals_ = + new java.util.ArrayList(facetIntervals_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Interval, + com.google.cloud.retail.v2alpha.Interval.Builder, + com.google.cloud.retail.v2alpha.IntervalOrBuilder> + facetIntervalsBuilder_; + + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public java.util.List getFacetIntervalsList() { + if (facetIntervalsBuilder_ == null) { + return java.util.Collections.unmodifiableList(facetIntervals_); + } else { + return facetIntervalsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public int getFacetIntervalsCount() { + if (facetIntervalsBuilder_ == null) { + return facetIntervals_.size(); + } else { + return facetIntervalsBuilder_.getCount(); + } + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public com.google.cloud.retail.v2alpha.Interval getFacetIntervals(int index) { + if (facetIntervalsBuilder_ == null) { + return facetIntervals_.get(index); + } else { + return facetIntervalsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public Builder setFacetIntervals(int index, com.google.cloud.retail.v2alpha.Interval value) { + if (facetIntervalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetIntervalsIsMutable(); + facetIntervals_.set(index, value); + onChanged(); + } else { + facetIntervalsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public Builder setFacetIntervals( + int index, com.google.cloud.retail.v2alpha.Interval.Builder builderForValue) { + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + facetIntervals_.set(index, builderForValue.build()); + onChanged(); + } else { + facetIntervalsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public Builder addFacetIntervals(com.google.cloud.retail.v2alpha.Interval value) { + if (facetIntervalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetIntervalsIsMutable(); + facetIntervals_.add(value); + onChanged(); + } else { + facetIntervalsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public Builder addFacetIntervals(int index, com.google.cloud.retail.v2alpha.Interval value) { + if (facetIntervalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetIntervalsIsMutable(); + facetIntervals_.add(index, value); + onChanged(); + } else { + facetIntervalsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public Builder addFacetIntervals( + com.google.cloud.retail.v2alpha.Interval.Builder builderForValue) { + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + facetIntervals_.add(builderForValue.build()); + onChanged(); + } else { + facetIntervalsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public Builder addFacetIntervals( + int index, com.google.cloud.retail.v2alpha.Interval.Builder builderForValue) { + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + facetIntervals_.add(index, builderForValue.build()); + onChanged(); + } else { + facetIntervalsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public Builder addAllFacetIntervals( + java.lang.Iterable values) { + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, facetIntervals_); + onChanged(); + } else { + facetIntervalsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public Builder clearFacetIntervals() { + if (facetIntervalsBuilder_ == null) { + facetIntervals_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + facetIntervalsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public Builder removeFacetIntervals(int index) { + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + facetIntervals_.remove(index); + onChanged(); + } else { + facetIntervalsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public com.google.cloud.retail.v2alpha.Interval.Builder getFacetIntervalsBuilder(int index) { + return getFacetIntervalsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public com.google.cloud.retail.v2alpha.IntervalOrBuilder getFacetIntervalsOrBuilder( + int index) { + if (facetIntervalsBuilder_ == null) { + return facetIntervals_.get(index); + } else { + return facetIntervalsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public java.util.List + getFacetIntervalsOrBuilderList() { + if (facetIntervalsBuilder_ != null) { + return facetIntervalsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(facetIntervals_); + } + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public com.google.cloud.retail.v2alpha.Interval.Builder addFacetIntervalsBuilder() { + return getFacetIntervalsFieldBuilder() + .addBuilder(com.google.cloud.retail.v2alpha.Interval.getDefaultInstance()); + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public com.google.cloud.retail.v2alpha.Interval.Builder addFacetIntervalsBuilder(int index) { + return getFacetIntervalsFieldBuilder() + .addBuilder(index, com.google.cloud.retail.v2alpha.Interval.getDefaultInstance()); + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1; + */ + public java.util.List + getFacetIntervalsBuilderList() { + return getFacetIntervalsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Interval, + com.google.cloud.retail.v2alpha.Interval.Builder, + com.google.cloud.retail.v2alpha.IntervalOrBuilder> + getFacetIntervalsFieldBuilder() { + if (facetIntervalsBuilder_ == null) { + facetIntervalsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Interval, + com.google.cloud.retail.v2alpha.Interval.Builder, + com.google.cloud.retail.v2alpha.IntervalOrBuilder>( + facetIntervals_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + facetIntervals_ = null; + } + return facetIntervalsBuilder_; + } + + private java.util.List< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues> + ignoredFacetValues_ = java.util.Collections.emptyList(); + + private void ensureIgnoredFacetValuesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + ignoredFacetValues_ = + new java.util.ArrayList< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues>( + ignoredFacetValues_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + .Builder, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .IgnoredFacetValuesOrBuilder> + ignoredFacetValuesBuilder_; + + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public java.util.List< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues> + getIgnoredFacetValuesList() { + if (ignoredFacetValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(ignoredFacetValues_); + } else { + return ignoredFacetValuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public int getIgnoredFacetValuesCount() { + if (ignoredFacetValuesBuilder_ == null) { + return ignoredFacetValues_.size(); + } else { + return ignoredFacetValuesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + getIgnoredFacetValues(int index) { + if (ignoredFacetValuesBuilder_ == null) { + return ignoredFacetValues_.get(index); + } else { + return ignoredFacetValuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder setIgnoredFacetValues( + int index, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues value) { + if (ignoredFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.set(index, value); + onChanged(); + } else { + ignoredFacetValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder setIgnoredFacetValues( + int index, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + builderForValue) { + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.set(index, builderForValue.build()); + onChanged(); + } else { + ignoredFacetValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder addIgnoredFacetValues( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues value) { + if (ignoredFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.add(value); + onChanged(); + } else { + ignoredFacetValuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder addIgnoredFacetValues( + int index, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues value) { + if (ignoredFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.add(index, value); + onChanged(); + } else { + ignoredFacetValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder addIgnoredFacetValues( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + builderForValue) { + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.add(builderForValue.build()); + onChanged(); + } else { + ignoredFacetValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder addIgnoredFacetValues( + int index, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + builderForValue) { + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.add(index, builderForValue.build()); + onChanged(); + } else { + ignoredFacetValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder addAllIgnoredFacetValues( + java.lang.Iterable< + ? extends + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .IgnoredFacetValues> + values) { + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ignoredFacetValues_); + onChanged(); + } else { + ignoredFacetValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder clearIgnoredFacetValues() { + if (ignoredFacetValuesBuilder_ == null) { + ignoredFacetValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + ignoredFacetValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder removeIgnoredFacetValues(int index) { + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.remove(index); + onChanged(); + } else { + ignoredFacetValuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + getIgnoredFacetValuesBuilder(int index) { + return getIgnoredFacetValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .IgnoredFacetValuesOrBuilder + getIgnoredFacetValuesOrBuilder(int index) { + if (ignoredFacetValuesBuilder_ == null) { + return ignoredFacetValues_.get(index); + } else { + return ignoredFacetValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .IgnoredFacetValuesOrBuilder> + getIgnoredFacetValuesOrBuilderList() { + if (ignoredFacetValuesBuilder_ != null) { + return ignoredFacetValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ignoredFacetValues_); + } + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + addIgnoredFacetValuesBuilder() { + return getIgnoredFacetValuesFieldBuilder() + .addBuilder( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + addIgnoredFacetValuesBuilder(int index) { + return getIgnoredFacetValuesFieldBuilder() + .addBuilder( + index, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public java.util.List< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + .Builder> + getIgnoredFacetValuesBuilderList() { + return getIgnoredFacetValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + .Builder, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .IgnoredFacetValuesOrBuilder> + getIgnoredFacetValuesFieldBuilder() { + if (ignoredFacetValuesBuilder_ == null) { + ignoredFacetValuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues + .Builder, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .IgnoredFacetValuesOrBuilder>( + ignoredFacetValues_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + ignoredFacetValues_ = null; + } + return ignoredFacetValuesBuilder_; + } + + private java.util.List< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue> + mergedFacetValues_ = java.util.Collections.emptyList(); + + private void ensureMergedFacetValuesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + mergedFacetValues_ = + new java.util.ArrayList< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue>( + mergedFacetValues_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.Builder, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .MergedFacetValueOrBuilder> + mergedFacetValuesBuilder_; + + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public java.util.List< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue> + getMergedFacetValuesList() { + if (mergedFacetValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(mergedFacetValues_); + } else { + return mergedFacetValuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public int getMergedFacetValuesCount() { + if (mergedFacetValuesBuilder_ == null) { + return mergedFacetValues_.size(); + } else { + return mergedFacetValuesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + getMergedFacetValues(int index) { + if (mergedFacetValuesBuilder_ == null) { + return mergedFacetValues_.get(index); + } else { + return mergedFacetValuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder setMergedFacetValues( + int index, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue value) { + if (mergedFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.set(index, value); + onChanged(); + } else { + mergedFacetValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder setMergedFacetValues( + int index, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + builderForValue) { + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.set(index, builderForValue.build()); + onChanged(); + } else { + mergedFacetValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder addMergedFacetValues( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue value) { + if (mergedFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.add(value); + onChanged(); + } else { + mergedFacetValuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder addMergedFacetValues( + int index, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue value) { + if (mergedFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.add(index, value); + onChanged(); + } else { + mergedFacetValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder addMergedFacetValues( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + builderForValue) { + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.add(builderForValue.build()); + onChanged(); + } else { + mergedFacetValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder addMergedFacetValues( + int index, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + builderForValue) { + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.add(index, builderForValue.build()); + onChanged(); + } else { + mergedFacetValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder addAllMergedFacetValues( + java.lang.Iterable< + ? extends + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue> + values) { + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mergedFacetValues_); + onChanged(); + } else { + mergedFacetValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder clearMergedFacetValues() { + if (mergedFacetValuesBuilder_ == null) { + mergedFacetValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + mergedFacetValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder removeMergedFacetValues(int index) { + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.remove(index); + onChanged(); + } else { + mergedFacetValuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + getMergedFacetValuesBuilder(int index) { + return getMergedFacetValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder + getMergedFacetValuesOrBuilder(int index) { + if (mergedFacetValuesBuilder_ == null) { + return mergedFacetValues_.get(index); + } else { + return mergedFacetValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .MergedFacetValueOrBuilder> + getMergedFacetValuesOrBuilderList() { + if (mergedFacetValuesBuilder_ != null) { + return mergedFacetValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(mergedFacetValues_); + } + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + addMergedFacetValuesBuilder() { + return getMergedFacetValuesFieldBuilder() + .addBuilder( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + addMergedFacetValuesBuilder(int index) { + return getMergedFacetValuesFieldBuilder() + .addBuilder( + index, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public java.util.List< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.Builder> + getMergedFacetValuesBuilderList() { + return getMergedFacetValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.Builder, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .MergedFacetValueOrBuilder> + getMergedFacetValuesFieldBuilder() { + if (mergedFacetValuesBuilder_ == null) { + mergedFacetValuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue + .Builder, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .MergedFacetValueOrBuilder>( + mergedFacetValues_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + mergedFacetValues_ = null; + } + return mergedFacetValuesBuilder_; + } + + private com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet mergedFacet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet.Builder, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetOrBuilder> + mergedFacetBuilder_; + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return Whether the mergedFacet field is set. + */ + public boolean hasMergedFacet() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return The mergedFacet. + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + getMergedFacet() { + if (mergedFacetBuilder_ == null) { + return mergedFacet_ == null + ? com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance() + : mergedFacet_; + } else { + return mergedFacetBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public Builder setMergedFacet( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet value) { + if (mergedFacetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mergedFacet_ = value; + } else { + mergedFacetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public Builder setMergedFacet( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet.Builder + builderForValue) { + if (mergedFacetBuilder_ == null) { + mergedFacet_ = builderForValue.build(); + } else { + mergedFacetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public Builder mergeMergedFacet( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet value) { + if (mergedFacetBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && mergedFacet_ != null + && mergedFacet_ + != com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance()) { + getMergedFacetBuilder().mergeFrom(value); + } else { + mergedFacet_ = value; + } + } else { + mergedFacetBuilder_.mergeFrom(value); + } + if (mergedFacet_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public Builder clearMergedFacet() { + bitField0_ = (bitField0_ & ~0x00000008); + mergedFacet_ = null; + if (mergedFacetBuilder_ != null) { + mergedFacetBuilder_.dispose(); + mergedFacetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet.Builder + getMergedFacetBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getMergedFacetFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetOrBuilder + getMergedFacetOrBuilder() { + if (mergedFacetBuilder_ != null) { + return mergedFacetBuilder_.getMessageOrBuilder(); + } else { + return mergedFacet_ == null + ? com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance() + : mergedFacet_; + } + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet.Builder, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetOrBuilder> + getMergedFacetFieldBuilder() { + if (mergedFacetBuilder_ == null) { + mergedFacetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet.Builder, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .MergedFacetOrBuilder>(getMergedFacet(), getParentForChildren(), isClean()); + mergedFacet_ = null; + } + return mergedFacetBuilder_; + } + + private com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + rerankConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig.Builder, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfigOrBuilder> + rerankConfigBuilder_; + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return Whether the rerankConfig field is set. + */ + public boolean hasRerankConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return The rerankConfig. + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + getRerankConfig() { + if (rerankConfigBuilder_ == null) { + return rerankConfig_ == null + ? com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance() + : rerankConfig_; + } else { + return rerankConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public Builder setRerankConfig( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig value) { + if (rerankConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rerankConfig_ = value; + } else { + rerankConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public Builder setRerankConfig( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig.Builder + builderForValue) { + if (rerankConfigBuilder_ == null) { + rerankConfig_ = builderForValue.build(); + } else { + rerankConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public Builder mergeRerankConfig( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig value) { + if (rerankConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && rerankConfig_ != null + && rerankConfig_ + != com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance()) { + getRerankConfigBuilder().mergeFrom(value); + } else { + rerankConfig_ = value; + } + } else { + rerankConfigBuilder_.mergeFrom(value); + } + if (rerankConfig_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public Builder clearRerankConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + rerankConfig_ = null; + if (rerankConfigBuilder_ != null) { + rerankConfigBuilder_.dispose(); + rerankConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig.Builder + getRerankConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getRerankConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfigOrBuilder + getRerankConfigOrBuilder() { + if (rerankConfigBuilder_ != null) { + return rerankConfigBuilder_.getMessageOrBuilder(); + } else { + return rerankConfig_ == null + ? com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance() + : rerankConfig_; + } + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig.Builder, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfigOrBuilder> + getRerankConfigFieldBuilder() { + if (rerankConfigBuilder_ == null) { + rerankConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig.Builder, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .RerankConfigOrBuilder>(getRerankConfig(), getParentForChildren(), isClean()); + rerankConfig_ = null; + } + return rerankConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig) + private static final com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig(); + } + + public static com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FacetConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.CatalogAttribute.FacetConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; public static final int KEY_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -1199,7 +9093,9 @@ public com.google.cloud.retail.v2alpha.CatalogAttribute.AttributeType getType() * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.IndexableOption indexable_option = 5; @@ -1221,7 +9117,9 @@ public int getIndexableOptionValue() { * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.IndexableOption indexable_option = 5; @@ -1309,7 +9207,9 @@ public int getDynamicFacetableOptionValue() { * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search], * as there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.SearchableOption searchable_option = 7; @@ -1336,7 +9236,9 @@ public int getSearchableOptionValue() { * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search], * as there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.SearchableOption searchable_option = 7; @@ -1502,6 +9404,57 @@ public com.google.cloud.retail.v2alpha.CatalogAttribute.RetrievableOption getRet : result; } + public static final int FACET_CONFIG_FIELD_NUMBER = 13; + private com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facetConfig_; + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return Whether the facetConfig field is set. + */ + @java.lang.Override + public boolean hasFacetConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return The facetConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig getFacetConfig() { + return facetConfig_ == null + ? com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.getDefaultInstance() + : facetConfig_; + } + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facet_config = 13; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfigOrBuilder + getFacetConfigOrBuilder() { + return facetConfig_ == null + ? com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.getDefaultInstance() + : facetConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1562,6 +9515,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(12, retrievableOption_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(13, getFacetConfig()); + } getUnknownFields().writeTo(output); } @@ -1618,6 +9574,9 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, retrievableOption_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getFacetConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1643,6 +9602,10 @@ public boolean equals(final java.lang.Object obj) { if (recommendationsFilteringOption_ != other.recommendationsFilteringOption_) return false; if (exactSearchableOption_ != other.exactSearchableOption_) return false; if (retrievableOption_ != other.retrievableOption_) return false; + if (hasFacetConfig() != other.hasFacetConfig()) return false; + if (hasFacetConfig()) { + if (!getFacetConfig().equals(other.getFacetConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1672,6 +9635,10 @@ public int hashCode() { hash = (53 * hash) + exactSearchableOption_; hash = (37 * hash) + RETRIEVABLE_OPTION_FIELD_NUMBER; hash = (53 * hash) + retrievableOption_; + if (hasFacetConfig()) { + hash = (37 * hash) + FACET_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getFacetConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1802,10 +9769,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.CatalogAttribute.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFacetConfigFieldBuilder(); + } } @java.lang.Override @@ -1821,6 +9797,11 @@ public Builder clear() { recommendationsFilteringOption_ = 0; exactSearchableOption_ = 0; retrievableOption_ = 0; + facetConfig_ = null; + if (facetConfigBuilder_ != null) { + facetConfigBuilder_.dispose(); + facetConfigBuilder_ = null; + } return this; } @@ -1884,6 +9865,13 @@ private void buildPartial0(com.google.cloud.retail.v2alpha.CatalogAttribute resu if (((from_bitField0_ & 0x00000100) != 0)) { result.retrievableOption_ = retrievableOption_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000200) != 0)) { + result.facetConfig_ = + facetConfigBuilder_ == null ? facetConfig_ : facetConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1961,6 +9949,9 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.CatalogAttribute other) if (other.retrievableOption_ != 0) { setRetrievableOptionValue(other.getRetrievableOptionValue()); } + if (other.hasFacetConfig()) { + mergeFacetConfig(other.getFacetConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2041,6 +10032,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000100; break; } // case 96 + case 106: + { + input.readMessage(getFacetConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2456,7 +10453,9 @@ public Builder clearType() { * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.IndexableOption indexable_option = 5; @@ -2478,7 +10477,9 @@ public int getIndexableOptionValue() { * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.IndexableOption indexable_option = 5; @@ -2503,7 +10504,9 @@ public Builder setIndexableOptionValue(int value) { * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.IndexableOption indexable_option = 5; @@ -2530,7 +10533,9 @@ public com.google.cloud.retail.v2alpha.CatalogAttribute.IndexableOption getIndex * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.IndexableOption indexable_option = 5; @@ -2559,7 +10564,9 @@ public Builder setIndexableOption( * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.IndexableOption indexable_option = 5; @@ -2720,7 +10727,9 @@ public Builder clearDynamicFacetableOption() { * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search], * as there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.SearchableOption searchable_option = 7; @@ -2747,7 +10756,9 @@ public int getSearchableOptionValue() { * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search], * as there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.SearchableOption searchable_option = 7; @@ -2777,7 +10788,9 @@ public Builder setSearchableOptionValue(int value) { * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search], * as there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.SearchableOption searchable_option = 7; @@ -2809,7 +10822,9 @@ public com.google.cloud.retail.v2alpha.CatalogAttribute.SearchableOption getSear * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search], * as there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.SearchableOption searchable_option = 7; @@ -2843,7 +10858,9 @@ public Builder setSearchableOption( * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search], * as there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.SearchableOption searchable_option = 7; @@ -3228,6 +11245,198 @@ public Builder clearRetrievableOption() { return this; } + private com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facetConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.Builder, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfigOrBuilder> + facetConfigBuilder_; + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return Whether the facetConfig field is set. + */ + public boolean hasFacetConfig() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return The facetConfig. + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig getFacetConfig() { + if (facetConfigBuilder_ == null) { + return facetConfig_ == null + ? com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.getDefaultInstance() + : facetConfig_; + } else { + return facetConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facet_config = 13; + */ + public Builder setFacetConfig( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig value) { + if (facetConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + facetConfig_ = value; + } else { + facetConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facet_config = 13; + */ + public Builder setFacetConfig( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.Builder builderForValue) { + if (facetConfigBuilder_ == null) { + facetConfig_ = builderForValue.build(); + } else { + facetConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facet_config = 13; + */ + public Builder mergeFacetConfig( + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig value) { + if (facetConfigBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && facetConfig_ != null + && facetConfig_ + != com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig + .getDefaultInstance()) { + getFacetConfigBuilder().mergeFrom(value); + } else { + facetConfig_ = value; + } + } else { + facetConfigBuilder_.mergeFrom(value); + } + if (facetConfig_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facet_config = 13; + */ + public Builder clearFacetConfig() { + bitField0_ = (bitField0_ & ~0x00000200); + facetConfig_ = null; + if (facetConfigBuilder_ != null) { + facetConfigBuilder_.dispose(); + facetConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facet_config = 13; + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.Builder + getFacetConfigBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getFacetConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facet_config = 13; + */ + public com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfigOrBuilder + getFacetConfigOrBuilder() { + if (facetConfigBuilder_ != null) { + return facetConfigBuilder_.getMessageOrBuilder(); + } else { + return facetConfig_ == null + ? com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.getDefaultInstance() + : facetConfig_; + } + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facet_config = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.Builder, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfigOrBuilder> + getFacetConfigFieldBuilder() { + if (facetConfigBuilder_ == null) { + facetConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.Builder, + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfigOrBuilder>( + getFacetConfig(), getParentForChildren(), isClean()); + facetConfig_ = null; + } + return facetConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttributeOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttributeOrBuilder.java index cfdbf8c810bd..63adc77015aa 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttributeOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttributeOrBuilder.java @@ -146,7 +146,9 @@ public interface CatalogAttributeOrBuilder * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.IndexableOption indexable_option = 5; @@ -165,7 +167,9 @@ public interface CatalogAttributeOrBuilder * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.IndexableOption indexable_option = 5; @@ -230,7 +234,9 @@ public interface CatalogAttributeOrBuilder * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search], * as there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.SearchableOption searchable_option = 7; @@ -254,7 +260,9 @@ public interface CatalogAttributeOrBuilder * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search], * as there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2alpha.CatalogAttribute.SearchableOption searchable_option = 7; @@ -371,4 +379,39 @@ public interface CatalogAttributeOrBuilder * @return The retrievableOption. */ com.google.cloud.retail.v2alpha.CatalogAttribute.RetrievableOption getRetrievableOption(); + + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return Whether the facetConfig field is set. + */ + boolean hasFacetConfig(); + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return The facetConfig. + */ + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig getFacetConfig(); + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig facet_config = 13; + */ + com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfigOrBuilder getFacetConfigOrBuilder(); } diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogOrBuilder.java index 9a63969acbec..508b8c1b0584 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogOrBuilder.java @@ -134,9 +134,9 @@ public interface CatalogOrBuilder * *
    * The Merchant Center linking configuration.
-   * Once a link is added, the data stream from Merchant Center to Cloud Retail
+   * After a link is added, the data stream from Merchant Center to Cloud Retail
    * will be enabled automatically. The requester must have access to the
-   * merchant center account in order to make changes to this field.
+   * Merchant Center account in order to make changes to this field.
    * 
* * @@ -151,9 +151,9 @@ public interface CatalogOrBuilder * *
    * The Merchant Center linking configuration.
-   * Once a link is added, the data stream from Merchant Center to Cloud Retail
+   * After a link is added, the data stream from Merchant Center to Cloud Retail
    * will be enabled automatically. The requester must have access to the
-   * merchant center account in order to make changes to this field.
+   * Merchant Center account in order to make changes to this field.
    * 
* * @@ -168,9 +168,9 @@ public interface CatalogOrBuilder * *
    * The Merchant Center linking configuration.
-   * Once a link is added, the data stream from Merchant Center to Cloud Retail
+   * After a link is added, the data stream from Merchant Center to Cloud Retail
    * will be enabled automatically. The requester must have access to the
-   * merchant center account in order to make changes to this field.
+   * Merchant Center account in order to make changes to this field.
    * 
* * diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogProto.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogProto.java index 1ce0c63b27cf..2332b30313c3 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogProto.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogProto.java @@ -36,6 +36,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2alpha_CatalogAttribute_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2alpha_CatalogAttribute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_IgnoredFacetValues_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacetValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacet_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_RerankConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_RerankConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_retail_v2alpha_AttributesConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -78,96 +98,118 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/api/field_behavior.proto\032\031google/api/re" + "source.proto\032(google/cloud/retail/v2alph" + "a/common.proto\032/google/cloud/retail/v2al" - + "pha/import_config.proto\"^\n\022ProductLevelC" - + "onfig\022\036\n\026ingestion_product_type\030\001 \001(\t\022(\n" - + " merchant_center_product_id_field\030\002 \001(\t\"" - + "\304\n\n\020CatalogAttribute\022\020\n\003key\030\001 \001(\tB\003\340A\002\022\023" - + "\n\006in_use\030\t \001(\010B\003\340A\003\022N\n\004type\030\n \001(\0162;.goog" - + "le.cloud.retail.v2alpha.CatalogAttribute" - + ".AttributeTypeB\003\340A\003\022W\n\020indexable_option\030" - + "\005 \001(\0162=.google.cloud.retail.v2alpha.Cata" - + "logAttribute.IndexableOption\022f\n\030dynamic_" - + "facetable_option\030\006 \001(\0162D.google.cloud.re" - + "tail.v2alpha.CatalogAttribute.DynamicFac" - + "etableOption\022Y\n\021searchable_option\030\007 \001(\0162" - + ">.google.cloud.retail.v2alpha.CatalogAtt" - + "ribute.SearchableOption\022e\n recommendatio" - + "ns_filtering_option\030\010 \001(\0162;.google.cloud" - + ".retail.v2alpha.RecommendationsFiltering" - + "Option\022d\n\027exact_searchable_option\030\013 \001(\0162" - + "C.google.cloud.retail.v2alpha.CatalogAtt" - + "ribute.ExactSearchableOption\022[\n\022retrieva" - + "ble_option\030\014 \001(\0162?.google.cloud.retail.v" - + "2alpha.CatalogAttribute.RetrievableOptio" - + "n\"8\n\rAttributeType\022\013\n\007UNKNOWN\020\000\022\013\n\007TEXTU" - + "AL\020\001\022\r\n\tNUMERICAL\020\002\"b\n\017IndexableOption\022 " - + "\n\034INDEXABLE_OPTION_UNSPECIFIED\020\000\022\025\n\021INDE" - + "XABLE_ENABLED\020\001\022\026\n\022INDEXABLE_DISABLED\020\002\"" - + "\201\001\n\026DynamicFacetableOption\022(\n$DYNAMIC_FA" - + "CETABLE_OPTION_UNSPECIFIED\020\000\022\035\n\031DYNAMIC_" - + "FACETABLE_ENABLED\020\001\022\036\n\032DYNAMIC_FACETABLE" - + "_DISABLED\020\002\"f\n\020SearchableOption\022!\n\035SEARC" - + "HABLE_OPTION_UNSPECIFIED\020\000\022\026\n\022SEARCHABLE" - + "_ENABLED\020\001\022\027\n\023SEARCHABLE_DISABLED\020\002\"}\n\025E" - + "xactSearchableOption\022\'\n#EXACT_SEARCHABLE" - + "_OPTION_UNSPECIFIED\020\000\022\034\n\030EXACT_SEARCHABL" - + "E_ENABLED\020\001\022\035\n\031EXACT_SEARCHABLE_DISABLED" - + "\020\002\"j\n\021RetrievableOption\022\"\n\036RETRIEVABLE_O" - + "PTION_UNSPECIFIED\020\000\022\027\n\023RETRIEVABLE_ENABL" - + "ED\020\001\022\030\n\024RETRIEVABLE_DISABLED\020\002\"\305\003\n\020Attri" - + "butesConfig\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022`\n\022cat" - + "alog_attributes\030\002 \003(\0132D.google.cloud.ret" - + "ail.v2alpha.AttributesConfig.CatalogAttr" - + "ibutesEntry\022V\n\026attribute_config_level\030\003 " - + "\001(\01621.google.cloud.retail.v2alpha.Attrib" - + "uteConfigLevelB\003\340A\003\032g\n\026CatalogAttributes" - + "Entry\022\013\n\003key\030\001 \001(\t\022<\n\005value\030\002 \001(\0132-.goog" - + "le.cloud.retail.v2alpha.CatalogAttribute" - + ":\0028\001:x\352Au\n&retail.googleapis.com/Attribu" - + "tesConfig\022Kprojects/{project}/locations/" - + "{location}/catalogs/{catalog}/attributes" - + "Config\"\250\005\n\020CompletionConfig\022\024\n\004name\030\001 \001(" - + "\tB\006\340A\002\340A\005\022\026\n\016matching_order\030\002 \001(\t\022\027\n\017max" - + "_suggestions\030\003 \001(\005\022\031\n\021min_prefix_length\030" - + "\004 \001(\005\022\025\n\rauto_learning\030\013 \001(\010\022]\n\030suggesti" - + "ons_input_config\030\005 \001(\01326.google.cloud.re" - + "tail.v2alpha.CompletionDataInputConfigB\003" - + "\340A\003\022.\n!last_suggestions_import_operation" - + "\030\006 \001(\tB\003\340A\003\022Z\n\025denylist_input_config\030\007 \001" - + "(\01326.google.cloud.retail.v2alpha.Complet" - + "ionDataInputConfigB\003\340A\003\022+\n\036last_denylist" - + "_import_operation\030\010 \001(\tB\003\340A\003\022[\n\026allowlis" - + "t_input_config\030\t \001(\01326.google.cloud.reta" - + "il.v2alpha.CompletionDataInputConfigB\003\340A" - + "\003\022,\n\037last_allowlist_import_operation\030\n \001" - + "(\tB\003\340A\003:x\352Au\n&retail.googleapis.com/Comp" - + "letionConfig\022Kprojects/{project}/locatio" - + "ns/{location}/catalogs/{catalog}/complet" - + "ionConfig\"\330\001\n\022MerchantCenterLink\022\'\n\032merc" - + "hant_center_account_id\030\001 \001(\003B\003\340A\002\022\021\n\tbra" - + "nch_id\030\002 \001(\t\022\024\n\014destinations\030\003 \003(\t\022\023\n\013re" - + "gion_code\030\004 \001(\t\022\025\n\rlanguage_code\030\005 \001(\t\022D" - + "\n\005feeds\030\006 \003(\01325.google.cloud.retail.v2al" - + "pha.MerchantCenterFeedFilter\"N\n\030Merchant" - + "CenterFeedFilter\022\027\n\017primary_feed_id\030\001 \001(" - + "\003\022\031\n\021primary_feed_name\030\002 \001(\t\"]\n\033Merchant" - + "CenterLinkingConfig\022>\n\005links\030\001 \003(\0132/.goo" - + "gle.cloud.retail.v2alpha.MerchantCenterL" - + "ink\"\323\002\n\007Catalog\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022\034\n" - + "\014display_name\030\002 \001(\tB\006\340A\002\340A\005\022R\n\024product_l" - + "evel_config\030\004 \001(\0132/.google.cloud.retail." - + "v2alpha.ProductLevelConfigB\003\340A\002\022`\n\036merch" - + "ant_center_linking_config\030\006 \001(\01328.google" - + ".cloud.retail.v2alpha.MerchantCenterLink" - + "ingConfig:^\352A[\n\035retail.googleapis.com/Ca" - + "talog\022:projects/{project}/locations/{loc" - + "ation}/catalogs/{catalog}B\320\001\n\037com.google" - + ".cloud.retail.v2alphaB\014CatalogProtoP\001Z7c" - + "loud.google.com/go/retail/apiv2alpha/ret" - + "ailpb;retailpb\242\002\006RETAIL\252\002\033Google.Cloud.R" - + "etail.V2Alpha\312\002\033Google\\Cloud\\Retail\\V2al" - + "pha\352\002\036Google::Cloud::Retail::V2alphab\006pr" - + "oto3" + + "pha/import_config.proto\032\037google/protobuf" + + "/timestamp.proto\"^\n\022ProductLevelConfig\022\036" + + "\n\026ingestion_product_type\030\001 \001(\t\022(\n mercha" + + "nt_center_product_id_field\030\002 \001(\t\"\232\021\n\020Cat" + + "alogAttribute\022\020\n\003key\030\001 \001(\tB\003\340A\002\022\023\n\006in_us" + + "e\030\t \001(\010B\003\340A\003\022N\n\004type\030\n \001(\0162;.google.clou" + + "d.retail.v2alpha.CatalogAttribute.Attrib" + + "uteTypeB\003\340A\003\022W\n\020indexable_option\030\005 \001(\0162=" + + ".google.cloud.retail.v2alpha.CatalogAttr" + + "ibute.IndexableOption\022f\n\030dynamic_facetab" + + "le_option\030\006 \001(\0162D.google.cloud.retail.v2" + + "alpha.CatalogAttribute.DynamicFacetableO" + + "ption\022Y\n\021searchable_option\030\007 \001(\0162>.googl" + + "e.cloud.retail.v2alpha.CatalogAttribute." + + "SearchableOption\022e\n recommendations_filt" + + "ering_option\030\010 \001(\0162;.google.cloud.retail" + + ".v2alpha.RecommendationsFilteringOption\022" + + "d\n\027exact_searchable_option\030\013 \001(\0162C.googl" + + "e.cloud.retail.v2alpha.CatalogAttribute." + + "ExactSearchableOption\022[\n\022retrievable_opt" + + "ion\030\014 \001(\0162?.google.cloud.retail.v2alpha." + + "CatalogAttribute.RetrievableOption\022O\n\014fa" + + "cet_config\030\r \001(\01329.google.cloud.retail.v" + + "2alpha.CatalogAttribute.FacetConfig\032\202\006\n\013" + + "FacetConfig\022>\n\017facet_intervals\030\001 \003(\0132%.g" + + "oogle.cloud.retail.v2alpha.Interval\022j\n\024i" + + "gnored_facet_values\030\002 \003(\0132L.google.cloud" + + ".retail.v2alpha.CatalogAttribute.FacetCo" + + "nfig.IgnoredFacetValues\022g\n\023merged_facet_" + + "values\030\003 \003(\0132J.google.cloud.retail.v2alp" + + "ha.CatalogAttribute.FacetConfig.MergedFa" + + "cetValue\022[\n\014merged_facet\030\004 \001(\0132E.google." + + "cloud.retail.v2alpha.CatalogAttribute.Fa" + + "cetConfig.MergedFacet\022]\n\rrerank_config\030\005" + + " \001(\0132F.google.cloud.retail.v2alpha.Catal" + + "ogAttribute.FacetConfig.RerankConfig\032\202\001\n" + + "\022IgnoredFacetValues\022\016\n\006values\030\001 \003(\t\022.\n\ns" + + "tart_time\030\002 \001(\0132\032.google.protobuf.Timest" + + "amp\022,\n\010end_time\030\003 \001(\0132\032.google.protobuf." + + "Timestamp\0328\n\020MergedFacetValue\022\016\n\006values\030" + + "\001 \003(\t\022\024\n\014merged_value\030\002 \001(\t\032\'\n\013MergedFac" + + "et\022\030\n\020merged_facet_key\030\001 \001(\t\032:\n\014RerankCo" + + "nfig\022\024\n\014rerank_facet\030\001 \001(\010\022\024\n\014facet_valu" + + "es\030\002 \003(\t\"8\n\rAttributeType\022\013\n\007UNKNOWN\020\000\022\013" + + "\n\007TEXTUAL\020\001\022\r\n\tNUMERICAL\020\002\"b\n\017IndexableO" + + "ption\022 \n\034INDEXABLE_OPTION_UNSPECIFIED\020\000\022" + + "\025\n\021INDEXABLE_ENABLED\020\001\022\026\n\022INDEXABLE_DISA" + + "BLED\020\002\"\201\001\n\026DynamicFacetableOption\022(\n$DYN" + + "AMIC_FACETABLE_OPTION_UNSPECIFIED\020\000\022\035\n\031D" + + "YNAMIC_FACETABLE_ENABLED\020\001\022\036\n\032DYNAMIC_FA" + + "CETABLE_DISABLED\020\002\"f\n\020SearchableOption\022!" + + "\n\035SEARCHABLE_OPTION_UNSPECIFIED\020\000\022\026\n\022SEA" + + "RCHABLE_ENABLED\020\001\022\027\n\023SEARCHABLE_DISABLED" + + "\020\002\"}\n\025ExactSearchableOption\022\'\n#EXACT_SEA" + + "RCHABLE_OPTION_UNSPECIFIED\020\000\022\034\n\030EXACT_SE" + + "ARCHABLE_ENABLED\020\001\022\035\n\031EXACT_SEARCHABLE_D" + + "ISABLED\020\002\"j\n\021RetrievableOption\022\"\n\036RETRIE" + + "VABLE_OPTION_UNSPECIFIED\020\000\022\027\n\023RETRIEVABL" + + "E_ENABLED\020\001\022\030\n\024RETRIEVABLE_DISABLED\020\002\"\305\003" + + "\n\020AttributesConfig\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005" + + "\022`\n\022catalog_attributes\030\002 \003(\0132D.google.cl" + + "oud.retail.v2alpha.AttributesConfig.Cata" + + "logAttributesEntry\022V\n\026attribute_config_l" + + "evel\030\003 \001(\01621.google.cloud.retail.v2alpha" + + ".AttributeConfigLevelB\003\340A\003\032g\n\026CatalogAtt" + + "ributesEntry\022\013\n\003key\030\001 \001(\t\022<\n\005value\030\002 \001(\013" + + "2-.google.cloud.retail.v2alpha.CatalogAt" + + "tribute:\0028\001:x\352Au\n&retail.googleapis.com/" + + "AttributesConfig\022Kprojects/{project}/loc" + + "ations/{location}/catalogs/{catalog}/att" + + "ributesConfig\"\250\005\n\020CompletionConfig\022\024\n\004na" + + "me\030\001 \001(\tB\006\340A\002\340A\005\022\026\n\016matching_order\030\002 \001(\t" + + "\022\027\n\017max_suggestions\030\003 \001(\005\022\031\n\021min_prefix_" + + "length\030\004 \001(\005\022\025\n\rauto_learning\030\013 \001(\010\022]\n\030s" + + "uggestions_input_config\030\005 \001(\01326.google.c" + + "loud.retail.v2alpha.CompletionDataInputC" + + "onfigB\003\340A\003\022.\n!last_suggestions_import_op" + + "eration\030\006 \001(\tB\003\340A\003\022Z\n\025denylist_input_con" + + "fig\030\007 \001(\01326.google.cloud.retail.v2alpha." + + "CompletionDataInputConfigB\003\340A\003\022+\n\036last_d" + + "enylist_import_operation\030\010 \001(\tB\003\340A\003\022[\n\026a" + + "llowlist_input_config\030\t \001(\01326.google.clo" + + "ud.retail.v2alpha.CompletionDataInputCon" + + "figB\003\340A\003\022,\n\037last_allowlist_import_operat" + + "ion\030\n \001(\tB\003\340A\003:x\352Au\n&retail.googleapis.c" + + "om/CompletionConfig\022Kprojects/{project}/" + + "locations/{location}/catalogs/{catalog}/" + + "completionConfig\"\330\001\n\022MerchantCenterLink\022" + + "\'\n\032merchant_center_account_id\030\001 \001(\003B\003\340A\002" + + "\022\021\n\tbranch_id\030\002 \001(\t\022\024\n\014destinations\030\003 \003(" + + "\t\022\023\n\013region_code\030\004 \001(\t\022\025\n\rlanguage_code\030" + + "\005 \001(\t\022D\n\005feeds\030\006 \003(\01325.google.cloud.reta" + + "il.v2alpha.MerchantCenterFeedFilter\"N\n\030M" + + "erchantCenterFeedFilter\022\027\n\017primary_feed_" + + "id\030\001 \001(\003\022\031\n\021primary_feed_name\030\002 \001(\t\"]\n\033M" + + "erchantCenterLinkingConfig\022>\n\005links\030\001 \003(" + + "\0132/.google.cloud.retail.v2alpha.Merchant" + + "CenterLink\"\323\002\n\007Catalog\022\024\n\004name\030\001 \001(\tB\006\340A" + + "\002\340A\005\022\034\n\014display_name\030\002 \001(\tB\006\340A\002\340A\005\022R\n\024pr" + + "oduct_level_config\030\004 \001(\0132/.google.cloud." + + "retail.v2alpha.ProductLevelConfigB\003\340A\002\022`" + + "\n\036merchant_center_linking_config\030\006 \001(\01328" + + ".google.cloud.retail.v2alpha.MerchantCen" + + "terLinkingConfig:^\352A[\n\035retail.googleapis" + + ".com/Catalog\022:projects/{project}/locatio" + + "ns/{location}/catalogs/{catalog}B\320\001\n\037com" + + ".google.cloud.retail.v2alphaB\014CatalogPro" + + "toP\001Z7cloud.google.com/go/retail/apiv2al" + + "pha/retailpb;retailpb\242\002\006RETAIL\252\002\033Google." + + "Cloud.Retail.V2Alpha\312\002\033Google\\Cloud\\Reta" + + "il\\V2alpha\352\002\036Google::Cloud::Retail::V2al" + + "phab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -177,6 +219,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.cloud.retail.v2alpha.CommonProto.getDescriptor(), com.google.cloud.retail.v2alpha.ImportConfigProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_retail_v2alpha_ProductLevelConfig_descriptor = getDescriptor().getMessageTypes().get(0); @@ -201,6 +244,61 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RecommendationsFilteringOption", "ExactSearchableOption", "RetrievableOption", + "FacetConfig", + }); + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_descriptor = + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_descriptor, + new java.lang.String[] { + "FacetIntervals", + "IgnoredFacetValues", + "MergedFacetValues", + "MergedFacet", + "RerankConfig", + }); + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor = + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_IgnoredFacetValues_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor, + new java.lang.String[] { + "Values", "StartTime", "EndTime", + }); + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor = + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacetValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor, + new java.lang.String[] { + "Values", "MergedValue", + }); + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacet_descriptor = + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_MergedFacet_descriptor, + new java.lang.String[] { + "MergedFacetKey", + }); + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_RerankConfig_descriptor = + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_RerankConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_CatalogAttribute_FacetConfig_RerankConfig_descriptor, + new java.lang.String[] { + "RerankFacet", "FacetValues", }); internal_static_google_cloud_retail_v2alpha_AttributesConfig_descriptor = getDescriptor().getMessageTypes().get(2); @@ -285,6 +383,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.cloud.retail.v2alpha.CommonProto.getDescriptor(); com.google.cloud.retail.v2alpha.ImportConfigProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CommonProto.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CommonProto.java index 3c72e00ed4bd..d75dcb87273c 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CommonProto.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CommonProto.java @@ -76,6 +76,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2alpha_Rule_IgnoreAction_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2alpha_Rule_IgnoreAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_FacetPositionAdjustment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_Rule_RemoveFacetAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_Rule_RemoveFacetAction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_retail_v2alpha_Audience_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -136,98 +148,110 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n(google/cloud/retail/v2alpha/common.pro" + "to\022\033google.cloud.retail.v2alpha\032\037google/" + "api/field_behavior.proto\032\037google/protobu" - + "f/timestamp.proto\"\272\002\n\tCondition\022E\n\013query" + + "f/timestamp.proto\"\323\002\n\tCondition\022E\n\013query" + "_terms\030\001 \003(\01320.google.cloud.retail.v2alp" + "ha.Condition.QueryTerm\022K\n\021active_time_ra" + "nge\030\003 \003(\01320.google.cloud.retail.v2alpha." - + "Condition.TimeRange\032.\n\tQueryTerm\022\r\n\005valu" - + "e\030\001 \001(\t\022\022\n\nfull_match\030\002 \001(\010\032i\n\tTimeRange" - + "\022.\n\nstart_time\030\001 \001(\0132\032.google.protobuf.T" - + "imestamp\022,\n\010end_time\030\002 \001(\0132\032.google.prot" - + "obuf.Timestamp\"\252\t\n\004Rule\022E\n\014boost_action\030" - + "\002 \001(\0132-.google.cloud.retail.v2alpha.Rule" - + ".BoostActionH\000\022K\n\017redirect_action\030\003 \001(\0132" - + "0.google.cloud.retail.v2alpha.Rule.Redir" - + "ectActionH\000\022X\n\026oneway_synonyms_action\030\006 " - + "\001(\01326.google.cloud.retail.v2alpha.Rule.O" - + "newaySynonymsActionH\000\022Y\n\027do_not_associat" - + "e_action\030\007 \001(\01326.google.cloud.retail.v2a" - + "lpha.Rule.DoNotAssociateActionH\000\022Q\n\022repl" - + "acement_action\030\010 \001(\01323.google.cloud.reta" - + "il.v2alpha.Rule.ReplacementActionH\000\022G\n\ri" - + "gnore_action\030\t \001(\0132..google.cloud.retail" - + ".v2alpha.Rule.IgnoreActionH\000\022G\n\rfilter_a" - + "ction\030\n \001(\0132..google.cloud.retail.v2alph" - + "a.Rule.FilterActionH\000\022X\n\026twoway_synonyms" - + "_action\030\013 \001(\01326.google.cloud.retail.v2al" - + "pha.Rule.TwowaySynonymsActionH\000\022>\n\tcondi" - + "tion\030\001 \001(\0132&.google.cloud.retail.v2alpha" - + ".ConditionB\003\340A\002\0325\n\013BoostAction\022\r\n\005boost\030" - + "\001 \001(\002\022\027\n\017products_filter\030\002 \001(\t\032\036\n\014Filter" - + "Action\022\016\n\006filter\030\001 \001(\t\032&\n\016RedirectAction" - + "\022\024\n\014redirect_uri\030\001 \001(\t\032(\n\024TwowaySynonyms" - + "Action\022\020\n\010synonyms\030\001 \003(\t\032S\n\024OnewaySynony" - + "msAction\022\023\n\013query_terms\030\003 \003(\t\022\020\n\010synonym" - + "s\030\004 \003(\t\022\024\n\014oneway_terms\030\002 \003(\t\032Z\n\024DoNotAs" - + "sociateAction\022\023\n\013query_terms\030\002 \003(\t\022\036\n\026do" - + "_not_associate_terms\030\003 \003(\t\022\r\n\005terms\030\001 \003(" - + "\t\032P\n\021ReplacementAction\022\023\n\013query_terms\030\002 " - + "\003(\t\022\030\n\020replacement_term\030\003 \001(\t\022\014\n\004term\030\001 " - + "\001(\t\032$\n\014IgnoreAction\022\024\n\014ignore_terms\030\001 \003(" - + "\tB\010\n\006action\"/\n\010Audience\022\017\n\007genders\030\001 \003(\t" - + "\022\022\n\nage_groups\030\002 \003(\t\"3\n\tColorInfo\022\026\n\016col" - + "or_families\030\001 \003(\t\022\016\n\006colors\030\002 \003(\t\"\206\001\n\017Cu" - + "stomAttribute\022\014\n\004text\030\001 \003(\t\022\017\n\007numbers\030\002" - + " \003(\001\022\033\n\nsearchable\030\003 \001(\010B\002\030\001H\000\210\001\001\022\032\n\tind" - + "exable\030\004 \001(\010B\002\030\001H\001\210\001\001B\r\n\013_searchableB\014\n\n" - + "_indexable\"2\n\017FulfillmentInfo\022\014\n\004type\030\001 " - + "\001(\t\022\021\n\tplace_ids\030\002 \003(\t\"8\n\005Image\022\020\n\003uri\030\001" - + " \001(\tB\003\340A\002\022\016\n\006height\030\002 \001(\005\022\r\n\005width\030\003 \001(\005" - + "\"x\n\010Interval\022\021\n\007minimum\030\001 \001(\001H\000\022\033\n\021exclu" - + "sive_minimum\030\002 \001(\001H\000\022\021\n\007maximum\030\003 \001(\001H\001\022" - + "\033\n\021exclusive_maximum\030\004 \001(\001H\001B\005\n\003minB\005\n\003m" - + "ax\"\231\003\n\tPriceInfo\022\025\n\rcurrency_code\030\001 \001(\t\022" - + "\r\n\005price\030\002 \001(\002\022\026\n\016original_price\030\003 \001(\002\022\014" - + "\n\004cost\030\004 \001(\002\0228\n\024price_effective_time\030\005 \001" - + "(\0132\032.google.protobuf.Timestamp\0225\n\021price_" - + "expire_time\030\006 \001(\0132\032.google.protobuf.Time" - + "stamp\022K\n\013price_range\030\007 \001(\01321.google.clou" - + "d.retail.v2alpha.PriceInfo.PriceRangeB\003\340" - + "A\003\032\201\001\n\nPriceRange\0224\n\005price\030\001 \001(\0132%.googl" - + "e.cloud.retail.v2alpha.Interval\022=\n\016origi" - + "nal_price\030\002 \001(\0132%.google.cloud.retail.v2" - + "alpha.Interval\"P\n\006Rating\022\024\n\014rating_count" - + "\030\001 \001(\005\022\026\n\016average_rating\030\002 \001(\002\022\030\n\020rating" - + "_histogram\030\003 \003(\005\"`\n\010UserInfo\022\017\n\007user_id\030" - + "\001 \001(\t\022\022\n\nip_address\030\002 \001(\t\022\022\n\nuser_agent\030" - + "\003 \001(\t\022\033\n\023direct_user_request\030\004 \001(\010\"\260\002\n\016L" - + "ocalInventory\022\020\n\010place_id\030\001 \001(\t\022:\n\nprice" - + "_info\030\002 \001(\0132&.google.cloud.retail.v2alph" - + "a.PriceInfo\022O\n\nattributes\030\003 \003(\0132;.google" - + ".cloud.retail.v2alpha.LocalInventory.Att" - + "ributesEntry\022\036\n\021fulfillment_types\030\004 \003(\tB" - + "\003\340A\004\032_\n\017AttributesEntry\022\013\n\003key\030\001 \001(\t\022;\n\005" - + "value\030\002 \001(\0132,.google.cloud.retail.v2alph" - + "a.CustomAttribute:\0028\001*\206\001\n\024AttributeConfi" - + "gLevel\022&\n\"ATTRIBUTE_CONFIG_LEVEL_UNSPECI" - + "FIED\020\000\022\"\n\036PRODUCT_LEVEL_ATTRIBUTE_CONFIG" - + "\020\001\022\"\n\036CATALOG_LEVEL_ATTRIBUTE_CONFIG\020\002*i" - + "\n\014SolutionType\022\035\n\031SOLUTION_TYPE_UNSPECIF" - + "IED\020\000\022 \n\034SOLUTION_TYPE_RECOMMENDATION\020\001\022" - + "\030\n\024SOLUTION_TYPE_SEARCH\020\002*\241\001\n\036Recommenda" - + "tionsFilteringOption\0220\n,RECOMMENDATIONS_" - + "FILTERING_OPTION_UNSPECIFIED\020\000\022&\n\"RECOMM" - + "ENDATIONS_FILTERING_DISABLED\020\001\022%\n!RECOMM" - + "ENDATIONS_FILTERING_ENABLED\020\003*\213\001\n\025Search" - + "SolutionUseCase\022(\n$SEARCH_SOLUTION_USE_C" - + "ASE_UNSPECIFIED\020\000\022#\n\037SEARCH_SOLUTION_USE" - + "_CASE_SEARCH\020\001\022#\n\037SEARCH_SOLUTION_USE_CA" - + "SE_BROWSE\020\002B\317\001\n\037com.google.cloud.retail." - + "v2alphaB\013CommonProtoP\001Z7cloud.google.com" - + "/go/retail/apiv2alpha/retailpb;retailpb\242" - + "\002\006RETAIL\252\002\033Google.Cloud.Retail.V2Alpha\312\002" - + "\033Google\\Cloud\\Retail\\V2alpha\352\002\036Google::C" - + "loud::Retail::V2alphab\006proto3" + + "Condition.TimeRange\022\027\n\017page_categories\030\004" + + " \003(\t\032.\n\tQueryTerm\022\r\n\005value\030\001 \001(\t\022\022\n\nfull" + + "_match\030\002 \001(\010\032i\n\tTimeRange\022.\n\nstart_time\030" + + "\001 \001(\0132\032.google.protobuf.Timestamp\022,\n\010end" + + "_time\030\002 \001(\0132\032.google.protobuf.Timestamp\"" + + "\341\014\n\004Rule\022E\n\014boost_action\030\002 \001(\0132-.google." + + "cloud.retail.v2alpha.Rule.BoostActionH\000\022" + + "K\n\017redirect_action\030\003 \001(\01320.google.cloud." + + "retail.v2alpha.Rule.RedirectActionH\000\022X\n\026" + + "oneway_synonyms_action\030\006 \001(\01326.google.cl" + + "oud.retail.v2alpha.Rule.OnewaySynonymsAc" + + "tionH\000\022Y\n\027do_not_associate_action\030\007 \001(\0132" + + "6.google.cloud.retail.v2alpha.Rule.DoNot" + + "AssociateActionH\000\022Q\n\022replacement_action\030" + + "\010 \001(\01323.google.cloud.retail.v2alpha.Rule" + + ".ReplacementActionH\000\022G\n\rignore_action\030\t " + + "\001(\0132..google.cloud.retail.v2alpha.Rule.I" + + "gnoreActionH\000\022G\n\rfilter_action\030\n \001(\0132..g" + + "oogle.cloud.retail.v2alpha.Rule.FilterAc" + + "tionH\000\022X\n\026twoway_synonyms_action\030\013 \001(\01326" + + ".google.cloud.retail.v2alpha.Rule.Twoway" + + "SynonymsActionH\000\022]\n\031force_return_facet_a" + + "ction\030\014 \001(\01328.google.cloud.retail.v2alph" + + "a.Rule.ForceReturnFacetActionH\000\022R\n\023remov" + + "e_facet_action\030\r \001(\01323.google.cloud.reta" + + "il.v2alpha.Rule.RemoveFacetActionH\000\022>\n\tc" + + "ondition\030\001 \001(\0132&.google.cloud.retail.v2a" + + "lpha.ConditionB\003\340A\002\0325\n\013BoostAction\022\r\n\005bo" + + "ost\030\001 \001(\002\022\027\n\017products_filter\030\002 \001(\t\032\036\n\014Fi" + + "lterAction\022\016\n\006filter\030\001 \001(\t\032&\n\016RedirectAc" + + "tion\022\024\n\014redirect_uri\030\001 \001(\t\032(\n\024TwowaySyno" + + "nymsAction\022\020\n\010synonyms\030\001 \003(\t\032S\n\024OnewaySy" + + "nonymsAction\022\023\n\013query_terms\030\003 \003(\t\022\020\n\010syn" + + "onyms\030\004 \003(\t\022\024\n\014oneway_terms\030\002 \003(\t\032Z\n\024DoN" + + "otAssociateAction\022\023\n\013query_terms\030\002 \003(\t\022\036" + + "\n\026do_not_associate_terms\030\003 \003(\t\022\r\n\005terms\030" + + "\001 \003(\t\032P\n\021ReplacementAction\022\023\n\013query_term" + + "s\030\002 \003(\t\022\030\n\020replacement_term\030\003 \001(\t\022\014\n\004ter" + + "m\030\001 \001(\t\032$\n\014IgnoreAction\022\024\n\014ignore_terms\030" + + "\001 \003(\t\032\323\001\n\026ForceReturnFacetAction\022t\n\032face" + + "t_position_adjustments\030\001 \003(\0132P.google.cl" + + "oud.retail.v2alpha.Rule.ForceReturnFacet" + + "Action.FacetPositionAdjustment\032C\n\027FacetP" + + "ositionAdjustment\022\026\n\016attribute_name\030\001 \001(" + + "\t\022\020\n\010position\030\002 \001(\005\032,\n\021RemoveFacetAction" + + "\022\027\n\017attribute_names\030\001 \003(\tB\010\n\006action\"/\n\010A" + + "udience\022\017\n\007genders\030\001 \003(\t\022\022\n\nage_groups\030\002" + + " \003(\t\"3\n\tColorInfo\022\026\n\016color_families\030\001 \003(" + + "\t\022\016\n\006colors\030\002 \003(\t\"\206\001\n\017CustomAttribute\022\014\n" + + "\004text\030\001 \003(\t\022\017\n\007numbers\030\002 \003(\001\022\033\n\nsearchab" + + "le\030\003 \001(\010B\002\030\001H\000\210\001\001\022\032\n\tindexable\030\004 \001(\010B\002\030\001" + + "H\001\210\001\001B\r\n\013_searchableB\014\n\n_indexable\"2\n\017Fu" + + "lfillmentInfo\022\014\n\004type\030\001 \001(\t\022\021\n\tplace_ids" + + "\030\002 \003(\t\"8\n\005Image\022\020\n\003uri\030\001 \001(\tB\003\340A\002\022\016\n\006hei" + + "ght\030\002 \001(\005\022\r\n\005width\030\003 \001(\005\"x\n\010Interval\022\021\n\007" + + "minimum\030\001 \001(\001H\000\022\033\n\021exclusive_minimum\030\002 \001" + + "(\001H\000\022\021\n\007maximum\030\003 \001(\001H\001\022\033\n\021exclusive_max" + + "imum\030\004 \001(\001H\001B\005\n\003minB\005\n\003max\"\231\003\n\tPriceInfo" + + "\022\025\n\rcurrency_code\030\001 \001(\t\022\r\n\005price\030\002 \001(\002\022\026" + + "\n\016original_price\030\003 \001(\002\022\014\n\004cost\030\004 \001(\002\0228\n\024" + + "price_effective_time\030\005 \001(\0132\032.google.prot" + + "obuf.Timestamp\0225\n\021price_expire_time\030\006 \001(" + + "\0132\032.google.protobuf.Timestamp\022K\n\013price_r" + + "ange\030\007 \001(\01321.google.cloud.retail.v2alpha" + + ".PriceInfo.PriceRangeB\003\340A\003\032\201\001\n\nPriceRang" + + "e\0224\n\005price\030\001 \001(\0132%.google.cloud.retail.v" + + "2alpha.Interval\022=\n\016original_price\030\002 \001(\0132" + + "%.google.cloud.retail.v2alpha.Interval\"P" + + "\n\006Rating\022\024\n\014rating_count\030\001 \001(\005\022\026\n\016averag" + + "e_rating\030\002 \001(\002\022\030\n\020rating_histogram\030\003 \003(\005" + + "\"`\n\010UserInfo\022\017\n\007user_id\030\001 \001(\t\022\022\n\nip_addr" + + "ess\030\002 \001(\t\022\022\n\nuser_agent\030\003 \001(\t\022\033\n\023direct_" + + "user_request\030\004 \001(\010\"\260\002\n\016LocalInventory\022\020\n" + + "\010place_id\030\001 \001(\t\022:\n\nprice_info\030\002 \001(\0132&.go" + + "ogle.cloud.retail.v2alpha.PriceInfo\022O\n\na" + + "ttributes\030\003 \003(\0132;.google.cloud.retail.v2" + + "alpha.LocalInventory.AttributesEntry\022\036\n\021" + + "fulfillment_types\030\004 \003(\tB\003\340A\004\032_\n\017Attribut" + + "esEntry\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 \001(\0132,.go" + + "ogle.cloud.retail.v2alpha.CustomAttribut" + + "e:\0028\001*\206\001\n\024AttributeConfigLevel\022&\n\"ATTRIB" + + "UTE_CONFIG_LEVEL_UNSPECIFIED\020\000\022\"\n\036PRODUC" + + "T_LEVEL_ATTRIBUTE_CONFIG\020\001\022\"\n\036CATALOG_LE" + + "VEL_ATTRIBUTE_CONFIG\020\002*i\n\014SolutionType\022\035" + + "\n\031SOLUTION_TYPE_UNSPECIFIED\020\000\022 \n\034SOLUTIO" + + "N_TYPE_RECOMMENDATION\020\001\022\030\n\024SOLUTION_TYPE" + + "_SEARCH\020\002*\241\001\n\036RecommendationsFilteringOp" + + "tion\0220\n,RECOMMENDATIONS_FILTERING_OPTION" + + "_UNSPECIFIED\020\000\022&\n\"RECOMMENDATIONS_FILTER" + + "ING_DISABLED\020\001\022%\n!RECOMMENDATIONS_FILTER" + + "ING_ENABLED\020\003*\213\001\n\025SearchSolutionUseCase\022" + + "(\n$SEARCH_SOLUTION_USE_CASE_UNSPECIFIED\020" + + "\000\022#\n\037SEARCH_SOLUTION_USE_CASE_SEARCH\020\001\022#" + + "\n\037SEARCH_SOLUTION_USE_CASE_BROWSE\020\002B\317\001\n\037" + + "com.google.cloud.retail.v2alphaB\013CommonP" + + "rotoP\001Z7cloud.google.com/go/retail/apiv2" + + "alpha/retailpb;retailpb\242\002\006RETAIL\252\002\033Googl" + + "e.Cloud.Retail.V2Alpha\312\002\033Google\\Cloud\\Re" + + "tail\\V2alpha\352\002\036Google::Cloud::Retail::V2" + + "alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -242,7 +266,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2alpha_Condition_descriptor, new java.lang.String[] { - "QueryTerms", "ActiveTimeRange", + "QueryTerms", "ActiveTimeRange", "PageCategories", }); internal_static_google_cloud_retail_v2alpha_Condition_QueryTerm_descriptor = internal_static_google_cloud_retail_v2alpha_Condition_descriptor.getNestedTypes().get(0); @@ -274,6 +298,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "IgnoreAction", "FilterAction", "TwowaySynonymsAction", + "ForceReturnFacetAction", + "RemoveFacetAction", "Condition", "Action", }); @@ -341,6 +367,32 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "IgnoreTerms", }); + internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_descriptor = + internal_static_google_cloud_retail_v2alpha_Rule_descriptor.getNestedTypes().get(8); + internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_descriptor, + new java.lang.String[] { + "FacetPositionAdjustments", + }); + internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor = + internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_FacetPositionAdjustment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor, + new java.lang.String[] { + "AttributeName", "Position", + }); + internal_static_google_cloud_retail_v2alpha_Rule_RemoveFacetAction_descriptor = + internal_static_google_cloud_retail_v2alpha_Rule_descriptor.getNestedTypes().get(9); + internal_static_google_cloud_retail_v2alpha_Rule_RemoveFacetAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_Rule_RemoveFacetAction_descriptor, + new java.lang.String[] { + "AttributeNames", + }); internal_static_google_cloud_retail_v2alpha_Audience_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_retail_v2alpha_Audience_fieldAccessorTable = diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequest.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequest.java index 3c633b31de3a..32b8e169e64c 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequest.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequest.java @@ -551,10 +551,10 @@ public boolean getEnableAttributeSuggestions() { * * *
-   * The entity for customers that may run multiple different entities, domains,
-   * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+   * The entity for customers who run multiple entities, domains, sites, or
+   * regions, for example, `Google US`, `Google Ads`, `Waymo`,
    * `google.com`, `youtube.com`, etc.
-   * If this is set, it should be exactly matched with
+   * If this is set, it must be an exact match with
    * [UserEvent.entity][google.cloud.retail.v2alpha.UserEvent.entity] to get
    * per-entity autocomplete results.
    * 
@@ -579,10 +579,10 @@ public java.lang.String getEntity() { * * *
-   * The entity for customers that may run multiple different entities, domains,
-   * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+   * The entity for customers who run multiple entities, domains, sites, or
+   * regions, for example, `Google US`, `Google Ads`, `Waymo`,
    * `google.com`, `youtube.com`, etc.
-   * If this is set, it should be exactly matched with
+   * If this is set, it must be an exact match with
    * [UserEvent.entity][google.cloud.retail.v2alpha.UserEvent.entity] to get
    * per-entity autocomplete results.
    * 
@@ -2256,10 +2256,10 @@ public Builder clearEnableAttributeSuggestions() { * * *
-     * The entity for customers that may run multiple different entities, domains,
-     * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+     * The entity for customers who run multiple entities, domains, sites, or
+     * regions, for example, `Google US`, `Google Ads`, `Waymo`,
      * `google.com`, `youtube.com`, etc.
-     * If this is set, it should be exactly matched with
+     * If this is set, it must be an exact match with
      * [UserEvent.entity][google.cloud.retail.v2alpha.UserEvent.entity] to get
      * per-entity autocomplete results.
      * 
@@ -2283,10 +2283,10 @@ public java.lang.String getEntity() { * * *
-     * The entity for customers that may run multiple different entities, domains,
-     * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+     * The entity for customers who run multiple entities, domains, sites, or
+     * regions, for example, `Google US`, `Google Ads`, `Waymo`,
      * `google.com`, `youtube.com`, etc.
-     * If this is set, it should be exactly matched with
+     * If this is set, it must be an exact match with
      * [UserEvent.entity][google.cloud.retail.v2alpha.UserEvent.entity] to get
      * per-entity autocomplete results.
      * 
@@ -2310,10 +2310,10 @@ public com.google.protobuf.ByteString getEntityBytes() { * * *
-     * The entity for customers that may run multiple different entities, domains,
-     * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+     * The entity for customers who run multiple entities, domains, sites, or
+     * regions, for example, `Google US`, `Google Ads`, `Waymo`,
      * `google.com`, `youtube.com`, etc.
-     * If this is set, it should be exactly matched with
+     * If this is set, it must be an exact match with
      * [UserEvent.entity][google.cloud.retail.v2alpha.UserEvent.entity] to get
      * per-entity autocomplete results.
      * 
@@ -2336,10 +2336,10 @@ public Builder setEntity(java.lang.String value) { * * *
-     * The entity for customers that may run multiple different entities, domains,
-     * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+     * The entity for customers who run multiple entities, domains, sites, or
+     * regions, for example, `Google US`, `Google Ads`, `Waymo`,
      * `google.com`, `youtube.com`, etc.
-     * If this is set, it should be exactly matched with
+     * If this is set, it must be an exact match with
      * [UserEvent.entity][google.cloud.retail.v2alpha.UserEvent.entity] to get
      * per-entity autocomplete results.
      * 
@@ -2358,10 +2358,10 @@ public Builder clearEntity() { * * *
-     * The entity for customers that may run multiple different entities, domains,
-     * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+     * The entity for customers who run multiple entities, domains, sites, or
+     * regions, for example, `Google US`, `Google Ads`, `Waymo`,
      * `google.com`, `youtube.com`, etc.
-     * If this is set, it should be exactly matched with
+     * If this is set, it must be an exact match with
      * [UserEvent.entity][google.cloud.retail.v2alpha.UserEvent.entity] to get
      * per-entity autocomplete results.
      * 
diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequestOrBuilder.java index 4b6fb4554aa6..ea8956f43d61 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequestOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequestOrBuilder.java @@ -349,10 +349,10 @@ public interface CompleteQueryRequestOrBuilder * * *
-   * The entity for customers that may run multiple different entities, domains,
-   * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+   * The entity for customers who run multiple entities, domains, sites, or
+   * regions, for example, `Google US`, `Google Ads`, `Waymo`,
    * `google.com`, `youtube.com`, etc.
-   * If this is set, it should be exactly matched with
+   * If this is set, it must be an exact match with
    * [UserEvent.entity][google.cloud.retail.v2alpha.UserEvent.entity] to get
    * per-entity autocomplete results.
    * 
@@ -366,10 +366,10 @@ public interface CompleteQueryRequestOrBuilder * * *
-   * The entity for customers that may run multiple different entities, domains,
-   * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+   * The entity for customers who run multiple entities, domains, sites, or
+   * regions, for example, `Google US`, `Google Ads`, `Waymo`,
    * `google.com`, `youtube.com`, etc.
-   * If this is set, it should be exactly matched with
+   * If this is set, it must be an exact match with
    * [UserEvent.entity][google.cloud.retail.v2alpha.UserEvent.entity] to get
    * per-entity autocomplete results.
    * 
diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponse.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponse.java index 29eb87b5cc06..a25f6bfe6038 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponse.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponse.java @@ -214,8 +214,8 @@ com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault( * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -228,8 +228,8 @@ com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault( * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -242,8 +242,8 @@ com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault( * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -256,8 +256,8 @@ com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault( * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -271,8 +271,8 @@ com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault( * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -285,8 +285,9 @@ com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault( *
      * Total number of products associated with a search with this suggestion.
      *
-     * This is an experimental feature for limited customers. Please reach out
-     * to the support team if you would like to receive this information.
+     * This is an experimental feature for limited customers. If you want to
+     * receive this product count information, reach out to the Retail support
+     * team.
      * 
* * int32 total_product_count = 4; @@ -562,8 +563,8 @@ public com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrThrow( * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -579,8 +580,8 @@ public java.util.List getF * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -597,8 +598,8 @@ public java.util.List getF * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -614,8 +615,8 @@ public int getFacetsCount() { * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -631,8 +632,8 @@ public com.google.cloud.retail.v2alpha.SearchResponse.Facet getFacets(int index) * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -651,8 +652,9 @@ public com.google.cloud.retail.v2alpha.SearchResponse.FacetOrBuilder getFacetsOr *
      * Total number of products associated with a search with this suggestion.
      *
-     * This is an experimental feature for limited customers. Please reach out
-     * to the support team if you would like to receive this information.
+     * This is an experimental feature for limited customers. If you want to
+     * receive this product count information, reach out to the Retail support
+     * team.
      * 
* * int32 total_product_count = 4; @@ -1619,8 +1621,8 @@ private void ensureFacetsIsMutable() { * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1639,8 +1641,8 @@ public java.util.List getF * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1659,8 +1661,8 @@ public int getFacetsCount() { * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1679,8 +1681,8 @@ public com.google.cloud.retail.v2alpha.SearchResponse.Facet getFacets(int index) * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1706,8 +1708,8 @@ public Builder setFacets( * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1730,8 +1732,8 @@ public Builder setFacets( * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1756,8 +1758,8 @@ public Builder addFacets(com.google.cloud.retail.v2alpha.SearchResponse.Facet va * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1783,8 +1785,8 @@ public Builder addFacets( * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1807,8 +1809,8 @@ public Builder addFacets( * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1831,8 +1833,8 @@ public Builder addFacets( * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1856,8 +1858,8 @@ public Builder addAllFacets( * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1879,8 +1881,8 @@ public Builder clearFacets() { * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1902,8 +1904,8 @@ public Builder removeFacets(int index) { * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1919,8 +1921,8 @@ public com.google.cloud.retail.v2alpha.SearchResponse.Facet.Builder getFacetsBui * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1940,8 +1942,8 @@ public com.google.cloud.retail.v2alpha.SearchResponse.FacetOrBuilder getFacetsOr * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1961,8 +1963,8 @@ public com.google.cloud.retail.v2alpha.SearchResponse.FacetOrBuilder getFacetsOr * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1978,8 +1980,8 @@ public com.google.cloud.retail.v2alpha.SearchResponse.Facet.Builder addFacetsBui * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -1997,8 +1999,8 @@ public com.google.cloud.retail.v2alpha.SearchResponse.Facet.Builder addFacetsBui * Facet information for the suggestion term. Gives the number of items * resulting from a search with this suggestion term for each facet. * - * This is an experimental feature for limited customers. Please reach out - * to the support team if you would like to receive this information. + * This is an experimental feature for limited customers. If you want to + * receive this facet information, reach out to the Retail support team. * * * repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3; @@ -2032,8 +2034,9 @@ public com.google.cloud.retail.v2alpha.SearchResponse.Facet.Builder addFacetsBui *
        * Total number of products associated with a search with this suggestion.
        *
-       * This is an experimental feature for limited customers. Please reach out
-       * to the support team if you would like to receive this information.
+       * This is an experimental feature for limited customers. If you want to
+       * receive this product count information, reach out to the Retail support
+       * team.
        * 
* * int32 total_product_count = 4; @@ -2050,8 +2053,9 @@ public int getTotalProductCount() { *
        * Total number of products associated with a search with this suggestion.
        *
-       * This is an experimental feature for limited customers. Please reach out
-       * to the support team if you would like to receive this information.
+       * This is an experimental feature for limited customers. If you want to
+       * receive this product count information, reach out to the Retail support
+       * team.
        * 
* * int32 total_product_count = 4; @@ -2072,8 +2076,9 @@ public Builder setTotalProductCount(int value) { *
        * Total number of products associated with a search with this suggestion.
        *
-       * This is an experimental feature for limited customers. Please reach out
-       * to the support team if you would like to receive this information.
+       * This is an experimental feature for limited customers. If you want to
+       * receive this product count information, reach out to the Retail support
+       * team.
        * 
* * int32 total_product_count = 4; @@ -2155,6 +2160,7 @@ public com.google.protobuf.Parser getParserForType() { } } + @java.lang.Deprecated public interface RecentSearchResultOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult) @@ -2189,11 +2195,12 @@ public interface RecentSearchResultOrBuilder * * *
-   * Recent search of this user.
+   * Deprecated: Recent search of this user.
    * 
* * Protobuf type {@code google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult} */ + @java.lang.Deprecated public static final class RecentSearchResult extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult) @@ -2453,7 +2460,7 @@ protected Builder newBuilderForType( * * *
-     * Recent search of this user.
+     * Deprecated: Recent search of this user.
      * 
* * Protobuf type {@code google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult} @@ -3755,9 +3762,9 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -3779,10 +3786,11 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() {
    * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public java.util.List getRecentSearchResultsList() { return recentSearchResults_; @@ -3791,9 +3799,9 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -3815,10 +3823,11 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() {
    * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public java.util.List< ? extends com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResultOrBuilder> @@ -3829,9 +3838,9 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -3853,10 +3862,11 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() {
    * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public int getRecentSearchResultsCount() { return recentSearchResults_.size(); } @@ -3864,9 +3874,9 @@ public int getRecentSearchResultsCount() { * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -3888,10 +3898,11 @@ public int getRecentSearchResultsCount() {
    * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult getRecentSearchResults(int index) { return recentSearchResults_.get(index); @@ -3900,9 +3911,9 @@ public int getRecentSearchResultsCount() { * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -3924,10 +3935,11 @@ public int getRecentSearchResultsCount() {
    * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResultOrBuilder getRecentSearchResultsOrBuilder(int index) { return recentSearchResults_.get(index); @@ -5223,9 +5235,9 @@ private void ensureRecentSearchResultsIsMutable() { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5247,9 +5259,10 @@ private void ensureRecentSearchResultsIsMutable() {
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public java.util.List getRecentSearchResultsList() { if (recentSearchResultsBuilder_ == null) { @@ -5262,9 +5275,9 @@ private void ensureRecentSearchResultsIsMutable() { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5286,9 +5299,10 @@ private void ensureRecentSearchResultsIsMutable() {
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public int getRecentSearchResultsCount() { if (recentSearchResultsBuilder_ == null) { return recentSearchResults_.size(); @@ -5300,9 +5314,9 @@ public int getRecentSearchResultsCount() { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5324,9 +5338,10 @@ public int getRecentSearchResultsCount() {
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult getRecentSearchResults(int index) { if (recentSearchResultsBuilder_ == null) { @@ -5339,9 +5354,9 @@ public int getRecentSearchResultsCount() { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5363,9 +5378,10 @@ public int getRecentSearchResultsCount() {
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder setRecentSearchResults( int index, com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult value) { if (recentSearchResultsBuilder_ == null) { @@ -5384,9 +5400,9 @@ public Builder setRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5408,9 +5424,10 @@ public Builder setRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder setRecentSearchResults( int index, com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult.Builder @@ -5428,9 +5445,9 @@ public Builder setRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5452,9 +5469,10 @@ public Builder setRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder addRecentSearchResults( com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult value) { if (recentSearchResultsBuilder_ == null) { @@ -5473,9 +5491,9 @@ public Builder addRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5497,9 +5515,10 @@ public Builder addRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder addRecentSearchResults( int index, com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult value) { if (recentSearchResultsBuilder_ == null) { @@ -5518,9 +5537,9 @@ public Builder addRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5542,9 +5561,10 @@ public Builder addRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder addRecentSearchResults( com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult.Builder builderForValue) { @@ -5561,9 +5581,9 @@ public Builder addRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5585,9 +5605,10 @@ public Builder addRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder addRecentSearchResults( int index, com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult.Builder @@ -5605,9 +5626,9 @@ public Builder addRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5629,9 +5650,10 @@ public Builder addRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder addAllRecentSearchResults( java.lang.Iterable< ? extends com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult> @@ -5649,9 +5671,9 @@ public Builder addAllRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5673,9 +5695,10 @@ public Builder addAllRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder clearRecentSearchResults() { if (recentSearchResultsBuilder_ == null) { recentSearchResults_ = java.util.Collections.emptyList(); @@ -5690,9 +5713,9 @@ public Builder clearRecentSearchResults() { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5714,9 +5737,10 @@ public Builder clearRecentSearchResults() {
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder removeRecentSearchResults(int index) { if (recentSearchResultsBuilder_ == null) { ensureRecentSearchResultsIsMutable(); @@ -5731,9 +5755,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5755,9 +5779,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult.Builder getRecentSearchResultsBuilder(int index) { return getRecentSearchResultsFieldBuilder().getBuilder(index); @@ -5766,9 +5791,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5790,9 +5815,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResultOrBuilder getRecentSearchResultsOrBuilder(int index) { if (recentSearchResultsBuilder_ == null) { @@ -5805,9 +5831,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5829,9 +5855,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public java.util.List< ? extends com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResultOrBuilder> @@ -5846,9 +5873,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5870,9 +5897,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult.Builder addRecentSearchResultsBuilder() { return getRecentSearchResultsFieldBuilder() @@ -5884,9 +5912,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5908,9 +5936,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult.Builder addRecentSearchResultsBuilder(int index) { return getRecentSearchResultsFieldBuilder() @@ -5923,9 +5952,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -5947,9 +5976,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public java.util.List< com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult.Builder> getRecentSearchResultsBuilderList() { diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponseOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponseOrBuilder.java index 2d654cd2afdd..36c880a23744 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponseOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponseOrBuilder.java @@ -130,9 +130,9 @@ com.google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult getComple * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -154,18 +154,19 @@ com.google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult getComple
    * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated java.util.List getRecentSearchResultsList(); /** * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -187,18 +188,19 @@ com.google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult getComple
    * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult getRecentSearchResults( int index); /** * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -220,17 +222,18 @@ com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult getRece
    * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated int getRecentSearchResultsCount(); /** * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -252,9 +255,10 @@ com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult getRece
    * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated java.util.List< ? extends com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResultOrBuilder> @@ -263,9 +267,9 @@ com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult getRece * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
@@ -287,9 +291,10 @@ com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult getRece
    * 
* * - * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResultOrBuilder getRecentSearchResultsOrBuilder(int index); diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfig.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfig.java index 29173e38c9c4..f7896dab0880 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfig.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfig.java @@ -330,8 +330,8 @@ public com.google.cloud.retail.v2alpha.CompletionDataInputConfig getSuggestionsI * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * @@ -359,8 +359,8 @@ public java.lang.String getLastSuggestionsImportOperation() { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * @@ -1945,8 +1945,8 @@ public Builder clearSuggestionsInputConfig() { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * @@ -1973,8 +1973,8 @@ public java.lang.String getLastSuggestionsImportOperation() { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * @@ -2001,8 +2001,8 @@ public com.google.protobuf.ByteString getLastSuggestionsImportOperationBytes() { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * @@ -2028,8 +2028,8 @@ public Builder setLastSuggestionsImportOperation(java.lang.String value) { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * @@ -2051,8 +2051,8 @@ public Builder clearLastSuggestionsImportOperation() { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfigOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfigOrBuilder.java index 1e34911c5b91..d70ad122526c 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfigOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfigOrBuilder.java @@ -199,8 +199,8 @@ public interface CompletionConfigOrBuilder * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * @@ -217,8 +217,8 @@ public interface CompletionConfigOrBuilder * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceProto.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceProto.java index 43d4b8545530..6f441eab9a92 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceProto.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceProto.java @@ -80,51 +80,51 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\nvisitor_id\030\007 \001(\t\022\026\n\016language_codes\030\003 \003(" + "\t\022\023\n\013device_type\030\004 \001(\t\022\017\n\007dataset\030\006 \001(\t\022" + "\027\n\017max_suggestions\030\005 \001(\005\022$\n\034enable_attri" - + "bute_suggestions\030\t \001(\010\022\016\n\006entity\030\n \001(\t\"\203" + + "bute_suggestions\030\t \001(\010\022\016\n\006entity\030\n \001(\t\"\213" + "\007\n\025CompleteQueryResponse\022_\n\022completion_r" + "esults\030\001 \003(\0132C.google.cloud.retail.v2alp" + "ha.CompleteQueryResponse.CompletionResul" - + "t\022\031\n\021attribution_token\030\002 \001(\t\022d\n\025recent_s" + + "t\022\031\n\021attribution_token\030\002 \001(\t\022h\n\025recent_s" + "earch_results\030\003 \003(\0132E.google.cloud.retai" + "l.v2alpha.CompleteQueryResponse.RecentSe" - + "archResult\022c\n\021attribute_results\030\004 \003(\0132H." - + "google.cloud.retail.v2alpha.CompleteQuer" - + "yResponse.AttributeResultsEntry\032\320\002\n\020Comp" - + "letionResult\022\022\n\nsuggestion\030\001 \001(\t\022g\n\nattr" - + "ibutes\030\002 \003(\0132S.google.cloud.retail.v2alp" - + "ha.CompleteQueryResponse.CompletionResul" - + "t.AttributesEntry\022A\n\006facets\030\003 \003(\01321.goog" - + "le.cloud.retail.v2alpha.SearchResponse.F" - + "acet\022\033\n\023total_product_count\030\004 \001(\005\032_\n\017Att" - + "ributesEntry\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 \001(\013" - + "2,.google.cloud.retail.v2alpha.CustomAtt" - + "ribute:\0028\001\032+\n\022RecentSearchResult\022\025\n\rrece" - + "nt_search\030\001 \001(\t\032&\n\017AttributeResult\022\023\n\013su" - + "ggestions\030\001 \003(\t\032{\n\025AttributeResultsEntry" - + "\022\013\n\003key\030\001 \001(\t\022Q\n\005value\030\002 \001(\0132B.google.cl" - + "oud.retail.v2alpha.CompleteQueryResponse" - + ".AttributeResult:\0028\0012\325\004\n\021CompletionServi" - + "ce\022\302\001\n\rCompleteQuery\0221.google.cloud.reta" - + "il.v2alpha.CompleteQueryRequest\0322.google" - + ".cloud.retail.v2alpha.CompleteQueryRespo" - + "nse\"J\202\323\344\223\002D\022B/v2alpha/{catalog=projects/" - + "*/locations/*/catalogs/*}:completeQuery\022" - + "\257\002\n\024ImportCompletionData\0228.google.cloud." - + "retail.v2alpha.ImportCompletionDataReque" - + "st\032\035.google.longrunning.Operation\"\275\001\312Af\n" - + "8google.cloud.retail.v2alpha.ImportCompl" - + "etionDataResponse\022*google.cloud.retail.v" - + "2alpha.ImportMetadata\202\323\344\223\002N\"I/v2alpha/{p" - + "arent=projects/*/locations/*/catalogs/*}" - + "/completionData:import:\001*\032I\312A\025retail.goo" - + "gleapis.com\322A.https://www.googleapis.com" - + "/auth/cloud-platformB\332\001\n\037com.google.clou" - + "d.retail.v2alphaB\026CompletionServiceProto" - + "P\001Z7cloud.google.com/go/retail/apiv2alph" - + "a/retailpb;retailpb\242\002\006RETAIL\252\002\033Google.Cl" - + "oud.Retail.V2Alpha\312\002\033Google\\Cloud\\Retail" - + "\\V2alpha\352\002\036Google::Cloud::Retail::V2alph" - + "ab\006proto3" + + "archResultB\002\030\001\022c\n\021attribute_results\030\004 \003(" + + "\0132H.google.cloud.retail.v2alpha.Complete" + + "QueryResponse.AttributeResultsEntry\032\320\002\n\020" + + "CompletionResult\022\022\n\nsuggestion\030\001 \001(\t\022g\n\n" + + "attributes\030\002 \003(\0132S.google.cloud.retail.v" + + "2alpha.CompleteQueryResponse.CompletionR" + + "esult.AttributesEntry\022A\n\006facets\030\003 \003(\01321." + + "google.cloud.retail.v2alpha.SearchRespon" + + "se.Facet\022\033\n\023total_product_count\030\004 \001(\005\032_\n" + + "\017AttributesEntry\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002" + + " \001(\0132,.google.cloud.retail.v2alpha.Custo" + + "mAttribute:\0028\001\032/\n\022RecentSearchResult\022\025\n\r" + + "recent_search\030\001 \001(\t:\002\030\001\032&\n\017AttributeResu" + + "lt\022\023\n\013suggestions\030\001 \003(\t\032{\n\025AttributeResu" + + "ltsEntry\022\013\n\003key\030\001 \001(\t\022Q\n\005value\030\002 \001(\0132B.g" + + "oogle.cloud.retail.v2alpha.CompleteQuery" + + "Response.AttributeResult:\0028\0012\325\004\n\021Complet" + + "ionService\022\302\001\n\rCompleteQuery\0221.google.cl" + + "oud.retail.v2alpha.CompleteQueryRequest\032" + + "2.google.cloud.retail.v2alpha.CompleteQu" + + "eryResponse\"J\202\323\344\223\002D\022B/v2alpha/{catalog=p" + + "rojects/*/locations/*/catalogs/*}:comple" + + "teQuery\022\257\002\n\024ImportCompletionData\0228.googl" + + "e.cloud.retail.v2alpha.ImportCompletionD" + + "ataRequest\032\035.google.longrunning.Operatio" + + "n\"\275\001\312Af\n8google.cloud.retail.v2alpha.Imp" + + "ortCompletionDataResponse\022*google.cloud." + + "retail.v2alpha.ImportMetadata\202\323\344\223\002N\"I/v2" + + "alpha/{parent=projects/*/locations/*/cat" + + "alogs/*}/completionData:import:\001*\032I\312A\025re" + + "tail.googleapis.com\322A.https://www.google" + + "apis.com/auth/cloud-platformB\332\001\n\037com.goo" + + "gle.cloud.retail.v2alphaB\026CompletionServ" + + "iceProtoP\001Z7cloud.google.com/go/retail/a" + + "piv2alpha/retailpb;retailpb\242\002\006RETAIL\252\002\033G" + + "oogle.Cloud.Retail.V2Alpha\312\002\033Google\\Clou" + + "d\\Retail\\V2alpha\352\002\036Google::Cloud::Retail" + + "::V2alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Condition.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Condition.java index cc6477c799eb..00aff0b853c6 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Condition.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Condition.java @@ -46,6 +46,7 @@ private Condition(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Condition() { queryTerms_ = java.util.Collections.emptyList(); activeTimeRange_ = java.util.Collections.emptyList(); + pageCategories_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -2068,6 +2069,82 @@ public com.google.cloud.retail.v2alpha.Condition.TimeRangeOrBuilder getActiveTim return activeTimeRange_.get(index); } + public static final int PAGE_CATEGORIES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList pageCategories_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @return A list containing the pageCategories. + */ + public com.google.protobuf.ProtocolStringList getPageCategoriesList() { + return pageCategories_; + } + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @return The count of pageCategories. + */ + public int getPageCategoriesCount() { + return pageCategories_.size(); + } + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the element to return. + * @return The pageCategories at the given index. + */ + public java.lang.String getPageCategories(int index) { + return pageCategories_.get(index); + } + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the value to return. + * @return The bytes of the pageCategories at the given index. + */ + public com.google.protobuf.ByteString getPageCategoriesBytes(int index) { + return pageCategories_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2088,6 +2165,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < activeTimeRange_.size(); i++) { output.writeMessage(3, activeTimeRange_.get(i)); } + for (int i = 0; i < pageCategories_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageCategories_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -2103,6 +2183,14 @@ public int getSerializedSize() { for (int i = 0; i < activeTimeRange_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, activeTimeRange_.get(i)); } + { + int dataSize = 0; + for (int i = 0; i < pageCategories_.size(); i++) { + dataSize += computeStringSizeNoTag(pageCategories_.getRaw(i)); + } + size += dataSize; + size += 1 * getPageCategoriesList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2121,6 +2209,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQueryTermsList().equals(other.getQueryTermsList())) return false; if (!getActiveTimeRangeList().equals(other.getActiveTimeRangeList())) return false; + if (!getPageCategoriesList().equals(other.getPageCategoriesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2140,6 +2229,10 @@ public int hashCode() { hash = (37 * hash) + ACTIVE_TIME_RANGE_FIELD_NUMBER; hash = (53 * hash) + getActiveTimeRangeList().hashCode(); } + if (getPageCategoriesCount() > 0) { + hash = (37 * hash) + PAGE_CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + getPageCategoriesList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2298,6 +2391,7 @@ public Builder clear() { activeTimeRangeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); + pageCategories_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @@ -2356,6 +2450,10 @@ private void buildPartialRepeatedFields(com.google.cloud.retail.v2alpha.Conditio private void buildPartial0(com.google.cloud.retail.v2alpha.Condition result) { int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + pageCategories_.makeImmutable(); + result.pageCategories_ = pageCategories_; + } } @java.lang.Override @@ -2457,6 +2555,16 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Condition other) { } } } + if (!other.pageCategories_.isEmpty()) { + if (pageCategories_.isEmpty()) { + pageCategories_ = other.pageCategories_; + bitField0_ |= 0x00000004; + } else { + ensurePageCategoriesIsMutable(); + pageCategories_.addAll(other.pageCategories_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2511,6 +2619,13 @@ public Builder mergeFrom( } break; } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePageCategoriesIsMutable(); + pageCategories_.add(s); + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3322,6 +3437,207 @@ public com.google.cloud.retail.v2alpha.Condition.TimeRange.Builder addActiveTime return activeTimeRangeBuilder_; } + private com.google.protobuf.LazyStringArrayList pageCategories_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePageCategoriesIsMutable() { + if (!pageCategories_.isModifiable()) { + pageCategories_ = new com.google.protobuf.LazyStringArrayList(pageCategories_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @return A list containing the pageCategories. + */ + public com.google.protobuf.ProtocolStringList getPageCategoriesList() { + pageCategories_.makeImmutable(); + return pageCategories_; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @return The count of pageCategories. + */ + public int getPageCategoriesCount() { + return pageCategories_.size(); + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the element to return. + * @return The pageCategories at the given index. + */ + public java.lang.String getPageCategories(int index) { + return pageCategories_.get(index); + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the value to return. + * @return The bytes of the pageCategories at the given index. + */ + public com.google.protobuf.ByteString getPageCategoriesBytes(int index) { + return pageCategories_.getByteString(index); + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param index The index to set the value at. + * @param value The pageCategories to set. + * @return This builder for chaining. + */ + public Builder setPageCategories(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageCategoriesIsMutable(); + pageCategories_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param value The pageCategories to add. + * @return This builder for chaining. + */ + public Builder addPageCategories(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageCategoriesIsMutable(); + pageCategories_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param values The pageCategories to add. + * @return This builder for chaining. + */ + public Builder addAllPageCategories(java.lang.Iterable values) { + ensurePageCategoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pageCategories_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageCategories() { + pageCategories_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param value The bytes of the pageCategories to add. + * @return This builder for chaining. + */ + public Builder addPageCategoriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePageCategoriesIsMutable(); + pageCategories_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ConditionOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ConditionOrBuilder.java index d08e71b536c1..0bf08a9da22b 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ConditionOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ConditionOrBuilder.java @@ -148,4 +148,67 @@ public interface ConditionOrBuilder */ com.google.cloud.retail.v2alpha.Condition.TimeRangeOrBuilder getActiveTimeRangeOrBuilder( int index); + + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @return A list containing the pageCategories. + */ + java.util.List getPageCategoriesList(); + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @return The count of pageCategories. + */ + int getPageCategoriesCount(); + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the element to return. + * @return The pageCategories at the given index. + */ + java.lang.String getPageCategories(int index); + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the value to return. + * @return The bytes of the pageCategories at the given index. + */ + com.google.protobuf.ByteString getPageCategoriesBytes(int index); } diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateMerchantCenterAccountLinkRequest.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateMerchantCenterAccountLinkRequest.java index e57f1452410d..b4dbbba8c3c2 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateMerchantCenterAccountLinkRequest.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateMerchantCenterAccountLinkRequest.java @@ -78,7 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. The branch resource where this MerchantCenterAccountLink will be
    * created. Format:
-   * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}}
+   * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
    * 
* * @@ -105,7 +105,7 @@ public java.lang.String getParent() { *
    * Required. The branch resource where this MerchantCenterAccountLink will be
    * created. Format:
-   * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}}
+   * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
    * 
* * @@ -616,7 +616,7 @@ public Builder mergeFrom( *
      * Required. The branch resource where this MerchantCenterAccountLink will be
      * created. Format:
-     * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}}
+     * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
      * 
* * @@ -642,7 +642,7 @@ public java.lang.String getParent() { *
      * Required. The branch resource where this MerchantCenterAccountLink will be
      * created. Format:
-     * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}}
+     * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
      * 
* * @@ -668,7 +668,7 @@ public com.google.protobuf.ByteString getParentBytes() { *
      * Required. The branch resource where this MerchantCenterAccountLink will be
      * created. Format:
-     * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}}
+     * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
      * 
* * @@ -693,7 +693,7 @@ public Builder setParent(java.lang.String value) { *
      * Required. The branch resource where this MerchantCenterAccountLink will be
      * created. Format:
-     * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}}
+     * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
      * 
* * @@ -714,7 +714,7 @@ public Builder clearParent() { *
      * Required. The branch resource where this MerchantCenterAccountLink will be
      * created. Format:
-     * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}}
+     * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
      * 
* * diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateMerchantCenterAccountLinkRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateMerchantCenterAccountLinkRequestOrBuilder.java index 6b4837ccb029..41d49e22ed96 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateMerchantCenterAccountLinkRequestOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateMerchantCenterAccountLinkRequestOrBuilder.java @@ -30,7 +30,7 @@ public interface CreateMerchantCenterAccountLinkRequestOrBuilder *
    * Required. The branch resource where this MerchantCenterAccountLink will be
    * created. Format:
-   * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}}
+   * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
    * 
* * @@ -46,7 +46,7 @@ public interface CreateMerchantCenterAccountLinkRequestOrBuilder *
    * Required. The branch resource where this MerchantCenterAccountLink will be
    * created. Format:
-   * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}}
+   * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
    * 
* * diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttribute.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttribute.java index b0416a5b7563..bfa20d88c3f7 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttribute.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttribute.java @@ -253,7 +253,7 @@ public double getNumbers(int index) { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=426 + * google/cloud/retail/v2alpha/common.proto;l=511 * @return Whether the searchable field is set. */ @java.lang.Override @@ -284,7 +284,7 @@ public boolean hasSearchable() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=426 + * google/cloud/retail/v2alpha/common.proto;l=511 * @return The searchable. */ @java.lang.Override @@ -323,7 +323,7 @@ public boolean getSearchable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=447 + * google/cloud/retail/v2alpha/common.proto;l=532 * @return Whether the indexable field is set. */ @java.lang.Override @@ -359,7 +359,7 @@ public boolean hasIndexable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=447 + * google/cloud/retail/v2alpha/common.proto;l=532 * @return The indexable. */ @java.lang.Override @@ -1283,7 +1283,7 @@ public Builder clearNumbers() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=426 + * google/cloud/retail/v2alpha/common.proto;l=511 * @return Whether the searchable field is set. */ @java.lang.Override @@ -1314,7 +1314,7 @@ public boolean hasSearchable() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=426 + * google/cloud/retail/v2alpha/common.proto;l=511 * @return The searchable. */ @java.lang.Override @@ -1345,7 +1345,7 @@ public boolean getSearchable() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=426 + * google/cloud/retail/v2alpha/common.proto;l=511 * @param value The searchable to set. * @return This builder for chaining. */ @@ -1380,7 +1380,7 @@ public Builder setSearchable(boolean value) { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=426 + * google/cloud/retail/v2alpha/common.proto;l=511 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1420,7 +1420,7 @@ public Builder clearSearchable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=447 + * google/cloud/retail/v2alpha/common.proto;l=532 * @return Whether the indexable field is set. */ @java.lang.Override @@ -1456,7 +1456,7 @@ public boolean hasIndexable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=447 + * google/cloud/retail/v2alpha/common.proto;l=532 * @return The indexable. */ @java.lang.Override @@ -1492,7 +1492,7 @@ public boolean getIndexable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=447 + * google/cloud/retail/v2alpha/common.proto;l=532 * @param value The indexable to set. * @return This builder for chaining. */ @@ -1532,7 +1532,7 @@ public Builder setIndexable(boolean value) { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=447 + * google/cloud/retail/v2alpha/common.proto;l=532 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttributeOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttributeOrBuilder.java index df068b98821d..05aa0dc4bc83 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttributeOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttributeOrBuilder.java @@ -183,7 +183,7 @@ public interface CustomAttributeOrBuilder * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=426 + * google/cloud/retail/v2alpha/common.proto;l=511 * @return Whether the searchable field is set. */ @java.lang.Deprecated @@ -211,7 +211,7 @@ public interface CustomAttributeOrBuilder * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=426 + * google/cloud/retail/v2alpha/common.proto;l=511 * @return The searchable. */ @java.lang.Deprecated @@ -245,7 +245,7 @@ public interface CustomAttributeOrBuilder * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=447 + * google/cloud/retail/v2alpha/common.proto;l=532 * @return Whether the indexable field is set. */ @java.lang.Deprecated @@ -278,7 +278,7 @@ public interface CustomAttributeOrBuilder * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2alpha/common.proto;l=447 + * google/cloud/retail/v2alpha/common.proto;l=532 * @return The indexable. */ @java.lang.Deprecated diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteMerchantCenterAccountLinkRequest.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteMerchantCenterAccountLinkRequest.java index bee3ce4d259c..3d7dc3b166e1 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteMerchantCenterAccountLinkRequest.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteMerchantCenterAccountLinkRequest.java @@ -76,7 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. Full resource name. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}`
    * 
* * @@ -102,7 +102,7 @@ public java.lang.String getName() { * *
    * Required. Full resource name. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}`
    * 
* * @@ -484,7 +484,7 @@ public Builder mergeFrom( * *
      * Required. Full resource name. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}`
      * 
* * @@ -509,7 +509,7 @@ public java.lang.String getName() { * *
      * Required. Full resource name. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}`
      * 
* * @@ -534,7 +534,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. Full resource name. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}`
      * 
* * @@ -558,7 +558,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. Full resource name. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}`
      * 
* * @@ -578,7 +578,7 @@ public Builder clearName() { * *
      * Required. Full resource name. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}`
      * 
* * diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteMerchantCenterAccountLinkRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteMerchantCenterAccountLinkRequestOrBuilder.java index c8753b8ab255..baf6a5e7c1de 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteMerchantCenterAccountLinkRequestOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteMerchantCenterAccountLinkRequestOrBuilder.java @@ -29,7 +29,7 @@ public interface DeleteMerchantCenterAccountLinkRequestOrBuilder * *
    * Required. Full resource name. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}`
    * 
* * @@ -44,7 +44,7 @@ public interface DeleteMerchantCenterAccountLinkRequestOrBuilder * *
    * Required. Full resource name. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}`
    * 
* * diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionMetadata.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionMetadata.java new file mode 100644 index 000000000000..7289f4b6bfe3 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionMetadata.java @@ -0,0 +1,435 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * Metadata related to the EnrollSolution method.
+ * This will be returned by the google.longrunning.Operation.metadata field.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.EnrollSolutionMetadata} + */ +public final class EnrollSolutionMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.EnrollSolutionMetadata) + EnrollSolutionMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnrollSolutionMetadata.newBuilder() to construct. + private EnrollSolutionMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnrollSolutionMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnrollSolutionMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_EnrollSolutionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_EnrollSolutionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.EnrollSolutionMetadata.class, + com.google.cloud.retail.v2alpha.EnrollSolutionMetadata.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.retail.v2alpha.EnrollSolutionMetadata)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.EnrollSolutionMetadata other = + (com.google.cloud.retail.v2alpha.EnrollSolutionMetadata) 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.retail.v2alpha.EnrollSolutionMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.EnrollSolutionMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata related to the EnrollSolution method.
+   * This will be returned by the google.longrunning.Operation.metadata field.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.EnrollSolutionMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.EnrollSolutionMetadata) + com.google.cloud.retail.v2alpha.EnrollSolutionMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_EnrollSolutionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_EnrollSolutionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.EnrollSolutionMetadata.class, + com.google.cloud.retail.v2alpha.EnrollSolutionMetadata.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.EnrollSolutionMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_EnrollSolutionMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.EnrollSolutionMetadata getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.EnrollSolutionMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.EnrollSolutionMetadata build() { + com.google.cloud.retail.v2alpha.EnrollSolutionMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.EnrollSolutionMetadata buildPartial() { + com.google.cloud.retail.v2alpha.EnrollSolutionMetadata result = + new com.google.cloud.retail.v2alpha.EnrollSolutionMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.EnrollSolutionMetadata) { + return mergeFrom((com.google.cloud.retail.v2alpha.EnrollSolutionMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.EnrollSolutionMetadata other) { + if (other == com.google.cloud.retail.v2alpha.EnrollSolutionMetadata.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.EnrollSolutionMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.EnrollSolutionMetadata) + private static final com.google.cloud.retail.v2alpha.EnrollSolutionMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.EnrollSolutionMetadata(); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnrollSolutionMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.EnrollSolutionMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionMetadataOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionMetadataOrBuilder.java new file mode 100644 index 000000000000..65a96ec391db --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionMetadataOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface EnrollSolutionMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.EnrollSolutionMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionRequest.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionRequest.java new file mode 100644 index 000000000000..f10e91b8d58f --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionRequest.java @@ -0,0 +1,811 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * Request for EnrollSolution method.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.EnrollSolutionRequest} + */ +public final class EnrollSolutionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.EnrollSolutionRequest) + EnrollSolutionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnrollSolutionRequest.newBuilder() to construct. + private EnrollSolutionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnrollSolutionRequest() { + project_ = ""; + solution_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnrollSolutionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_EnrollSolutionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_EnrollSolutionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.EnrollSolutionRequest.class, + com.google.cloud.retail.v2alpha.EnrollSolutionRequest.Builder.class); + } + + public static final int PROJECT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object project_ = ""; + /** + * + * + *
+   * Required. Full resource name of parent. Format:
+   * `projects/{project_number_or_id}`
+   * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Full resource name of parent. Format:
+   * `projects/{project_number_or_id}`
+   * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOLUTION_FIELD_NUMBER = 2; + private int solution_ = 0; + /** + * + * + *
+   * Required. Solution to enroll.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.SolutionType solution = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for solution. + */ + @java.lang.Override + public int getSolutionValue() { + return solution_; + } + /** + * + * + *
+   * Required. Solution to enroll.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.SolutionType solution = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The solution. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.SolutionType getSolution() { + com.google.cloud.retail.v2alpha.SolutionType result = + com.google.cloud.retail.v2alpha.SolutionType.forNumber(solution_); + return result == null ? com.google.cloud.retail.v2alpha.SolutionType.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.GeneratedMessageV3.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_); + } + if (solution_ + != com.google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, solution_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_); + } + if (solution_ + != com.google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, solution_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2alpha.EnrollSolutionRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.EnrollSolutionRequest other = + (com.google.cloud.retail.v2alpha.EnrollSolutionRequest) obj; + + if (!getProject().equals(other.getProject())) return false; + if (solution_ != other.solution_) 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) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + hash = (37 * hash) + SOLUTION_FIELD_NUMBER; + hash = (53 * hash) + solution_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.EnrollSolutionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for EnrollSolution method.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.EnrollSolutionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.EnrollSolutionRequest) + com.google.cloud.retail.v2alpha.EnrollSolutionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_EnrollSolutionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_EnrollSolutionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.EnrollSolutionRequest.class, + com.google.cloud.retail.v2alpha.EnrollSolutionRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.EnrollSolutionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + project_ = ""; + solution_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_EnrollSolutionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.EnrollSolutionRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.EnrollSolutionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.EnrollSolutionRequest build() { + com.google.cloud.retail.v2alpha.EnrollSolutionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.EnrollSolutionRequest buildPartial() { + com.google.cloud.retail.v2alpha.EnrollSolutionRequest result = + new com.google.cloud.retail.v2alpha.EnrollSolutionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.EnrollSolutionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.project_ = project_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.solution_ = solution_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.EnrollSolutionRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.EnrollSolutionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.EnrollSolutionRequest other) { + if (other == com.google.cloud.retail.v2alpha.EnrollSolutionRequest.getDefaultInstance()) + return this; + if (!other.getProject().isEmpty()) { + project_ = other.project_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.solution_ != 0) { + setSolutionValue(other.getSolutionValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + project_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + solution_ = 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 java.lang.Object project_ = ""; + /** + * + * + *
+     * Required. Full resource name of parent. Format:
+     * `projects/{project_number_or_id}`
+     * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of parent. Format:
+     * `projects/{project_number_or_id}`
+     * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for project. + */ + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of parent. Format:
+     * `projects/{project_number_or_id}`
+     * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + project_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of parent. Format:
+     * `projects/{project_number_or_id}`
+     * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearProject() { + project_ = getDefaultInstance().getProject(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of parent. Format:
+     * `projects/{project_number_or_id}`
+     * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + project_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int solution_ = 0; + /** + * + * + *
+     * Required. Solution to enroll.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.SolutionType solution = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for solution. + */ + @java.lang.Override + public int getSolutionValue() { + return solution_; + } + /** + * + * + *
+     * Required. Solution to enroll.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.SolutionType solution = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for solution to set. + * @return This builder for chaining. + */ + public Builder setSolutionValue(int value) { + solution_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Solution to enroll.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.SolutionType solution = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The solution. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.SolutionType getSolution() { + com.google.cloud.retail.v2alpha.SolutionType result = + com.google.cloud.retail.v2alpha.SolutionType.forNumber(solution_); + return result == null ? com.google.cloud.retail.v2alpha.SolutionType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Required. Solution to enroll.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.SolutionType solution = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The solution to set. + * @return This builder for chaining. + */ + public Builder setSolution(com.google.cloud.retail.v2alpha.SolutionType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + solution_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Solution to enroll.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.SolutionType solution = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearSolution() { + bitField0_ = (bitField0_ & ~0x00000002); + solution_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.EnrollSolutionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.EnrollSolutionRequest) + private static final com.google.cloud.retail.v2alpha.EnrollSolutionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.EnrollSolutionRequest(); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnrollSolutionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.EnrollSolutionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionRequestOrBuilder.java new file mode 100644 index 000000000000..0198612c4e01 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionRequestOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface EnrollSolutionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.EnrollSolutionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Full resource name of parent. Format:
+   * `projects/{project_number_or_id}`
+   * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The project. + */ + java.lang.String getProject(); + /** + * + * + *
+   * Required. Full resource name of parent. Format:
+   * `projects/{project_number_or_id}`
+   * 
+ * + * + * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for project. + */ + com.google.protobuf.ByteString getProjectBytes(); + + /** + * + * + *
+   * Required. Solution to enroll.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.SolutionType solution = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for solution. + */ + int getSolutionValue(); + /** + * + * + *
+   * Required. Solution to enroll.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.SolutionType solution = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The solution. + */ + com.google.cloud.retail.v2alpha.SolutionType getSolution(); +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionResponse.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionResponse.java new file mode 100644 index 000000000000..bc89b8583e2c --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionResponse.java @@ -0,0 +1,594 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * Response for EnrollSolution method.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.EnrollSolutionResponse} + */ +public final class EnrollSolutionResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.EnrollSolutionResponse) + EnrollSolutionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnrollSolutionResponse.newBuilder() to construct. + private EnrollSolutionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnrollSolutionResponse() { + enrolledSolution_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnrollSolutionResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_EnrollSolutionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_EnrollSolutionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.EnrollSolutionResponse.class, + com.google.cloud.retail.v2alpha.EnrollSolutionResponse.Builder.class); + } + + public static final int ENROLLED_SOLUTION_FIELD_NUMBER = 1; + private int enrolledSolution_ = 0; + /** + * + * + *
+   * Retail API solution that the project has enrolled.
+   * 
+ * + * .google.cloud.retail.v2alpha.SolutionType enrolled_solution = 1; + * + * @return The enum numeric value on the wire for enrolledSolution. + */ + @java.lang.Override + public int getEnrolledSolutionValue() { + return enrolledSolution_; + } + /** + * + * + *
+   * Retail API solution that the project has enrolled.
+   * 
+ * + * .google.cloud.retail.v2alpha.SolutionType enrolled_solution = 1; + * + * @return The enrolledSolution. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.SolutionType getEnrolledSolution() { + com.google.cloud.retail.v2alpha.SolutionType result = + com.google.cloud.retail.v2alpha.SolutionType.forNumber(enrolledSolution_); + return result == null ? com.google.cloud.retail.v2alpha.SolutionType.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 (enrolledSolution_ + != com.google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, enrolledSolution_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enrolledSolution_ + != com.google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, enrolledSolution_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2alpha.EnrollSolutionResponse)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.EnrollSolutionResponse other = + (com.google.cloud.retail.v2alpha.EnrollSolutionResponse) obj; + + if (enrolledSolution_ != other.enrolledSolution_) 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) + ENROLLED_SOLUTION_FIELD_NUMBER; + hash = (53 * hash) + enrolledSolution_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.EnrollSolutionResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for EnrollSolution method.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.EnrollSolutionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.EnrollSolutionResponse) + com.google.cloud.retail.v2alpha.EnrollSolutionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_EnrollSolutionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_EnrollSolutionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.EnrollSolutionResponse.class, + com.google.cloud.retail.v2alpha.EnrollSolutionResponse.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.EnrollSolutionResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enrolledSolution_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_EnrollSolutionResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.EnrollSolutionResponse getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.EnrollSolutionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.EnrollSolutionResponse build() { + com.google.cloud.retail.v2alpha.EnrollSolutionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.EnrollSolutionResponse buildPartial() { + com.google.cloud.retail.v2alpha.EnrollSolutionResponse result = + new com.google.cloud.retail.v2alpha.EnrollSolutionResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.EnrollSolutionResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enrolledSolution_ = enrolledSolution_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.EnrollSolutionResponse) { + return mergeFrom((com.google.cloud.retail.v2alpha.EnrollSolutionResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.EnrollSolutionResponse other) { + if (other == com.google.cloud.retail.v2alpha.EnrollSolutionResponse.getDefaultInstance()) + return this; + if (other.enrolledSolution_ != 0) { + setEnrolledSolutionValue(other.getEnrolledSolutionValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + enrolledSolution_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int enrolledSolution_ = 0; + /** + * + * + *
+     * Retail API solution that the project has enrolled.
+     * 
+ * + * .google.cloud.retail.v2alpha.SolutionType enrolled_solution = 1; + * + * @return The enum numeric value on the wire for enrolledSolution. + */ + @java.lang.Override + public int getEnrolledSolutionValue() { + return enrolledSolution_; + } + /** + * + * + *
+     * Retail API solution that the project has enrolled.
+     * 
+ * + * .google.cloud.retail.v2alpha.SolutionType enrolled_solution = 1; + * + * @param value The enum numeric value on the wire for enrolledSolution to set. + * @return This builder for chaining. + */ + public Builder setEnrolledSolutionValue(int value) { + enrolledSolution_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Retail API solution that the project has enrolled.
+     * 
+ * + * .google.cloud.retail.v2alpha.SolutionType enrolled_solution = 1; + * + * @return The enrolledSolution. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.SolutionType getEnrolledSolution() { + com.google.cloud.retail.v2alpha.SolutionType result = + com.google.cloud.retail.v2alpha.SolutionType.forNumber(enrolledSolution_); + return result == null ? com.google.cloud.retail.v2alpha.SolutionType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Retail API solution that the project has enrolled.
+     * 
+ * + * .google.cloud.retail.v2alpha.SolutionType enrolled_solution = 1; + * + * @param value The enrolledSolution to set. + * @return This builder for chaining. + */ + public Builder setEnrolledSolution(com.google.cloud.retail.v2alpha.SolutionType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + enrolledSolution_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Retail API solution that the project has enrolled.
+     * 
+ * + * .google.cloud.retail.v2alpha.SolutionType enrolled_solution = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnrolledSolution() { + bitField0_ = (bitField0_ & ~0x00000001); + enrolledSolution_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.EnrollSolutionResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.EnrollSolutionResponse) + private static final com.google.cloud.retail.v2alpha.EnrollSolutionResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.EnrollSolutionResponse(); + } + + public static com.google.cloud.retail.v2alpha.EnrollSolutionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnrollSolutionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.EnrollSolutionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionResponseOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionResponseOrBuilder.java new file mode 100644 index 000000000000..2c74a0378e97 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/EnrollSolutionResponseOrBuilder.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface EnrollSolutionResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.EnrollSolutionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Retail API solution that the project has enrolled.
+   * 
+ * + * .google.cloud.retail.v2alpha.SolutionType enrolled_solution = 1; + * + * @return The enum numeric value on the wire for enrolledSolution. + */ + int getEnrolledSolutionValue(); + /** + * + * + *
+   * Retail API solution that the project has enrolled.
+   * 
+ * + * .google.cloud.retail.v2alpha.SolutionType enrolled_solution = 1; + * + * @return The enrolledSolution. + */ + com.google.cloud.retail.v2alpha.SolutionType getEnrolledSolution(); +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExperimentInfo.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExperimentInfo.java index 2f3bcefdc636..60c9e5cbfb4d 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExperimentInfo.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExperimentInfo.java @@ -23,7 +23,8 @@ * * *
- * Metadata for active A/B testing [Experiments][].
+ * Metadata for active A/B testing
+ * [Experiment][google.cloud.retail.v2alpha.Experiment].
  * 
* * Protobuf type {@code google.cloud.retail.v2alpha.ExperimentInfo} @@ -104,8 +105,8 @@ public interface ServingConfigExperimentOrBuilder * *
      * The fully qualified resource name of the serving config
-     * [VariantArm.serving_config_id][] responsible for generating the search
-     * response. For example:
+     * [Experiment.VariantArm.serving_config_id][google.cloud.retail.v2alpha.Experiment.VariantArm.serving_config_id]
+     * responsible for generating the search response. For example:
      * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
      * 
* @@ -119,8 +120,8 @@ public interface ServingConfigExperimentOrBuilder * *
      * The fully qualified resource name of the serving config
-     * [VariantArm.serving_config_id][] responsible for generating the search
-     * response. For example:
+     * [Experiment.VariantArm.serving_config_id][google.cloud.retail.v2alpha.Experiment.VariantArm.serving_config_id]
+     * responsible for generating the search response. For example:
      * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
      * 
* @@ -241,8 +242,8 @@ public com.google.protobuf.ByteString getOriginalServingConfigBytes() { * *
      * The fully qualified resource name of the serving config
-     * [VariantArm.serving_config_id][] responsible for generating the search
-     * response. For example:
+     * [Experiment.VariantArm.serving_config_id][google.cloud.retail.v2alpha.Experiment.VariantArm.serving_config_id]
+     * responsible for generating the search response. For example:
      * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
      * 
* @@ -267,8 +268,8 @@ public java.lang.String getExperimentServingConfig() { * *
      * The fully qualified resource name of the serving config
-     * [VariantArm.serving_config_id][] responsible for generating the search
-     * response. For example:
+     * [Experiment.VariantArm.serving_config_id][google.cloud.retail.v2alpha.Experiment.VariantArm.serving_config_id]
+     * responsible for generating the search response. For example:
      * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
      * 
* @@ -800,8 +801,8 @@ public Builder setOriginalServingConfigBytes(com.google.protobuf.ByteString valu * *
        * The fully qualified resource name of the serving config
-       * [VariantArm.serving_config_id][] responsible for generating the search
-       * response. For example:
+       * [Experiment.VariantArm.serving_config_id][google.cloud.retail.v2alpha.Experiment.VariantArm.serving_config_id]
+       * responsible for generating the search response. For example:
        * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        * 
* @@ -826,8 +827,8 @@ public java.lang.String getExperimentServingConfig() { * *
        * The fully qualified resource name of the serving config
-       * [VariantArm.serving_config_id][] responsible for generating the search
-       * response. For example:
+       * [Experiment.VariantArm.serving_config_id][google.cloud.retail.v2alpha.Experiment.VariantArm.serving_config_id]
+       * responsible for generating the search response. For example:
        * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        * 
* @@ -852,8 +853,8 @@ public com.google.protobuf.ByteString getExperimentServingConfigBytes() { * *
        * The fully qualified resource name of the serving config
-       * [VariantArm.serving_config_id][] responsible for generating the search
-       * response. For example:
+       * [Experiment.VariantArm.serving_config_id][google.cloud.retail.v2alpha.Experiment.VariantArm.serving_config_id]
+       * responsible for generating the search response. For example:
        * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        * 
* @@ -877,8 +878,8 @@ public Builder setExperimentServingConfig(java.lang.String value) { * *
        * The fully qualified resource name of the serving config
-       * [VariantArm.serving_config_id][] responsible for generating the search
-       * response. For example:
+       * [Experiment.VariantArm.serving_config_id][google.cloud.retail.v2alpha.Experiment.VariantArm.serving_config_id]
+       * responsible for generating the search response. For example:
        * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        * 
* @@ -898,8 +899,8 @@ public Builder clearExperimentServingConfig() { * *
        * The fully qualified resource name of the serving config
-       * [VariantArm.serving_config_id][] responsible for generating the search
-       * response. For example:
+       * [Experiment.VariantArm.serving_config_id][google.cloud.retail.v2alpha.Experiment.VariantArm.serving_config_id]
+       * responsible for generating the search response. For example:
        * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        * 
* @@ -1347,7 +1348,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Metadata for active A/B testing [Experiments][].
+   * Metadata for active A/B testing
+   * [Experiment][google.cloud.retail.v2alpha.Experiment].
    * 
* * Protobuf type {@code google.cloud.retail.v2alpha.ExperimentInfo} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAlertConfigRequest.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAlertConfigRequest.java new file mode 100644 index 000000000000..6bba6b28974f --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAlertConfigRequest.java @@ -0,0 +1,651 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * Request for
+ * [ProjectService.GetAlertConfig][google.cloud.retail.v2alpha.ProjectService.GetAlertConfig]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.GetAlertConfigRequest} + */ +public final class GetAlertConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.GetAlertConfigRequest) + GetAlertConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAlertConfigRequest.newBuilder() to construct. + private GetAlertConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAlertConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAlertConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_GetAlertConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_GetAlertConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.GetAlertConfigRequest.class, + com.google.cloud.retail.v2alpha.GetAlertConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Full AlertConfig resource name. Format:
+   * projects/{project_number}/alertConfig
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Full AlertConfig resource name. Format:
+   * projects/{project_number}/alertConfig
+   * 
+ * + * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.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.retail.v2alpha.GetAlertConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.GetAlertConfigRequest other = + (com.google.cloud.retail.v2alpha.GetAlertConfigRequest) 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.retail.v2alpha.GetAlertConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.GetAlertConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.GetAlertConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.GetAlertConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.GetAlertConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.GetAlertConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.GetAlertConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.GetAlertConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.GetAlertConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.GetAlertConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.GetAlertConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.GetAlertConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.GetAlertConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for
+   * [ProjectService.GetAlertConfig][google.cloud.retail.v2alpha.ProjectService.GetAlertConfig]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.GetAlertConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.GetAlertConfigRequest) + com.google.cloud.retail.v2alpha.GetAlertConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_GetAlertConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_GetAlertConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.GetAlertConfigRequest.class, + com.google.cloud.retail.v2alpha.GetAlertConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.GetAlertConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_GetAlertConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.GetAlertConfigRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.GetAlertConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.GetAlertConfigRequest build() { + com.google.cloud.retail.v2alpha.GetAlertConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.GetAlertConfigRequest buildPartial() { + com.google.cloud.retail.v2alpha.GetAlertConfigRequest result = + new com.google.cloud.retail.v2alpha.GetAlertConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.GetAlertConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.GetAlertConfigRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.GetAlertConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.GetAlertConfigRequest other) { + if (other == com.google.cloud.retail.v2alpha.GetAlertConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Full AlertConfig resource name. Format:
+     * projects/{project_number}/alertConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Full AlertConfig resource name. Format:
+     * projects/{project_number}/alertConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Full AlertConfig resource name. Format:
+     * projects/{project_number}/alertConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full AlertConfig resource name. Format:
+     * projects/{project_number}/alertConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full AlertConfig resource name. Format:
+     * projects/{project_number}/alertConfig
+     * 
+ * + * + * 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.GetAlertConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.GetAlertConfigRequest) + private static final com.google.cloud.retail.v2alpha.GetAlertConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.GetAlertConfigRequest(); + } + + public static com.google.cloud.retail.v2alpha.GetAlertConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAlertConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.GetAlertConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAlertConfigRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAlertConfigRequestOrBuilder.java new file mode 100644 index 000000000000..b711cc51937c --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAlertConfigRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface GetAlertConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.GetAlertConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Full AlertConfig resource name. Format:
+   * projects/{project_number}/alertConfig
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Full AlertConfig resource name. Format:
+   * projects/{project_number}/alertConfig
+   * 
+ * + * + * 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-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ActionParameter.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetBranchRequest.java similarity index 54% rename from java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ActionParameter.java rename to java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetBranchRequest.java index 968e650f9098..bc73e8acc40f 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ActionParameter.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetBranchRequest.java @@ -14,56 +14,58 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dialogflow/cx/v3beta1/example.proto +// source: google/cloud/retail/v2alpha/branch_service.proto // Protobuf Java Version: 3.25.3 -package com.google.cloud.dialogflow.cx.v3beta1; +package com.google.cloud.retail.v2alpha; /** * * *
- * Parameter associated with action.
+ * Request for
+ * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+ * method.
  * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ActionParameter} + * Protobuf type {@code google.cloud.retail.v2alpha.GetBranchRequest} */ -public final class ActionParameter extends com.google.protobuf.GeneratedMessageV3 +public final class GetBranchRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ActionParameter) - ActionParameterOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.GetBranchRequest) + GetBranchRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use ActionParameter.newBuilder() to construct. - private ActionParameter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use GetBranchRequest.newBuilder() to construct. + private GetBranchRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ActionParameter() { + private GetBranchRequest() { name_ = ""; + view_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ActionParameter(); + return new GetBranchRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_descriptor; + return com.google.cloud.retail.v2alpha.BranchServiceProto + .internal_static_google_cloud_retail_v2alpha_GetBranchRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_fieldAccessorTable + return com.google.cloud.retail.v2alpha.BranchServiceProto + .internal_static_google_cloud_retail_v2alpha_GetBranchRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.class, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder.class); + com.google.cloud.retail.v2alpha.GetBranchRequest.class, + com.google.cloud.retail.v2alpha.GetBranchRequest.Builder.class); } - private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -72,10 +74,17 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Name of the parameter.
+   * Required. The name of the branch to retrieve.
+   * Format:
+   * `projects/*/locations/global/catalogs/default_catalog/branches/some_branch_id`.
+   *
+   * "default_branch" can be used as a special branch_id, it returns the
+   * default branch that has been set for the catalog.
    * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -95,10 +104,17 @@ public java.lang.String getName() { * * *
-   * Required. Name of the parameter.
+   * Required. The name of the branch to retrieve.
+   * Format:
+   * `projects/*/locations/global/catalogs/default_catalog/branches/some_branch_id`.
+   *
+   * "default_branch" can be used as a special branch_id, it returns the
+   * default branch that has been set for the catalog.
    * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -115,50 +131,47 @@ public com.google.protobuf.ByteString getNameBytes() { } } - public static final int VALUE_FIELD_NUMBER = 2; - private com.google.protobuf.Value value_; + public static final int VIEW_FIELD_NUMBER = 2; + private int view_ = 0; /** * * *
-   * Required. Value of the parameter.
+   * The view to apply to the returned
+   * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+   * [Branch.BranchView.BASIC] if unspecified.
+   * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+   * to find what fields are excluded from BASIC view.
    * 
* - * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.retail.v2alpha.BranchView view = 2; * - * @return Whether the value field is set. + * @return The enum numeric value on the wire for view. */ @java.lang.Override - public boolean hasValue() { - return ((bitField0_ & 0x00000001) != 0); + public int getViewValue() { + return view_; } /** * * *
-   * Required. Value of the parameter.
+   * The view to apply to the returned
+   * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+   * [Branch.BranchView.BASIC] if unspecified.
+   * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+   * to find what fields are excluded from BASIC view.
    * 
* - * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The value. - */ - @java.lang.Override - public com.google.protobuf.Value getValue() { - return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; - } - /** - * - * - *
-   * Required. Value of the parameter.
-   * 
+ * .google.cloud.retail.v2alpha.BranchView view = 2; * - * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The view. */ @java.lang.Override - public com.google.protobuf.ValueOrBuilder getValueOrBuilder() { - return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; + public com.google.cloud.retail.v2alpha.BranchView getView() { + com.google.cloud.retail.v2alpha.BranchView result = + com.google.cloud.retail.v2alpha.BranchView.forNumber(view_); + return result == null ? com.google.cloud.retail.v2alpha.BranchView.UNRECOGNIZED : result; } private byte memoizedIsInitialized = -1; @@ -178,8 +191,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getValue()); + if (view_ != com.google.cloud.retail.v2alpha.BranchView.BRANCH_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(2, view_); } getUnknownFields().writeTo(output); } @@ -193,8 +206,8 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getValue()); + if (view_ != com.google.cloud.retail.v2alpha.BranchView.BRANCH_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -206,17 +219,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ActionParameter)) { + if (!(obj instanceof com.google.cloud.retail.v2alpha.GetBranchRequest)) { return super.equals(obj); } - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter other = - (com.google.cloud.dialogflow.cx.v3beta1.ActionParameter) obj; + com.google.cloud.retail.v2alpha.GetBranchRequest other = + (com.google.cloud.retail.v2alpha.GetBranchRequest) obj; if (!getName().equals(other.getName())) return false; - if (hasValue() != other.hasValue()) return false; - if (hasValue()) { - if (!getValue().equals(other.getValue())) return false; - } + if (view_ != other.view_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -230,80 +240,78 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - if (hasValue()) { - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - } + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.retail.v2alpha.GetBranchRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + public static com.google.cloud.retail.v2alpha.GetBranchRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + public static com.google.cloud.retail.v2alpha.GetBranchRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + public static com.google.cloud.retail.v2alpha.GetBranchRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom(byte[] data) + public static com.google.cloud.retail.v2alpha.GetBranchRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + public static com.google.cloud.retail.v2alpha.GetBranchRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + public static com.google.cloud.retail.v2alpha.GetBranchRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + public static com.google.cloud.retail.v2alpha.GetBranchRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseDelimitedFrom( + public static com.google.cloud.retail.v2alpha.GetBranchRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseDelimitedFrom( + public static com.google.cloud.retail.v2alpha.GetBranchRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + public static com.google.cloud.retail.v2alpha.GetBranchRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + public static com.google.cloud.retail.v2alpha.GetBranchRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -320,8 +328,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter prototype) { + public static Builder newBuilder(com.google.cloud.retail.v2alpha.GetBranchRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -339,44 +346,37 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Parameter associated with action.
+   * Request for
+   * [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
+   * method.
    * 
* - * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ActionParameter} + * Protobuf type {@code google.cloud.retail.v2alpha.GetBranchRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ActionParameter) - com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.GetBranchRequest) + com.google.cloud.retail.v2alpha.GetBranchRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_descriptor; + return com.google.cloud.retail.v2alpha.BranchServiceProto + .internal_static_google_cloud_retail_v2alpha_GetBranchRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_fieldAccessorTable + return com.google.cloud.retail.v2alpha.BranchServiceProto + .internal_static_google_cloud_retail_v2alpha_GetBranchRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.class, - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder.class); + com.google.cloud.retail.v2alpha.GetBranchRequest.class, + com.google.cloud.retail.v2alpha.GetBranchRequest.Builder.class); } - // Construct using com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + // Construct using com.google.cloud.retail.v2alpha.GetBranchRequest.newBuilder() + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getValueFieldBuilder(); - } } @java.lang.Override @@ -384,28 +384,24 @@ public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; - value_ = null; - if (valueBuilder_ != null) { - valueBuilder_.dispose(); - valueBuilder_ = null; - } + view_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto - .internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_descriptor; + return com.google.cloud.retail.v2alpha.BranchServiceProto + .internal_static_google_cloud_retail_v2alpha_GetBranchRequest_descriptor; } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getDefaultInstanceForType() { - return com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance(); + public com.google.cloud.retail.v2alpha.GetBranchRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.GetBranchRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter build() { - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter result = buildPartial(); + public com.google.cloud.retail.v2alpha.GetBranchRequest build() { + com.google.cloud.retail.v2alpha.GetBranchRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -413,9 +409,9 @@ public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter build() { } @java.lang.Override - public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter buildPartial() { - com.google.cloud.dialogflow.cx.v3beta1.ActionParameter result = - new com.google.cloud.dialogflow.cx.v3beta1.ActionParameter(this); + public com.google.cloud.retail.v2alpha.GetBranchRequest buildPartial() { + com.google.cloud.retail.v2alpha.GetBranchRequest result = + new com.google.cloud.retail.v2alpha.GetBranchRequest(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -423,17 +419,14 @@ public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter buildPartial() { return result; } - private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter result) { + private void buildPartial0(com.google.cloud.retail.v2alpha.GetBranchRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { - result.value_ = valueBuilder_ == null ? value_ : valueBuilder_.build(); - to_bitField0_ |= 0x00000001; + result.view_ = view_; } - result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -471,24 +464,24 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ActionParameter) { - return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ActionParameter) other); + if (other instanceof com.google.cloud.retail.v2alpha.GetBranchRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.GetBranchRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter other) { - if (other == com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.retail.v2alpha.GetBranchRequest other) { + if (other == com.google.cloud.retail.v2alpha.GetBranchRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } - if (other.hasValue()) { - mergeValue(other.getValue()); + if (other.view_ != 0) { + setViewValue(other.getViewValue()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -522,12 +515,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 - case 18: + case 16: { - input.readMessage(getValueFieldBuilder().getBuilder(), extensionRegistry); + view_ = input.readEnum(); bitField0_ |= 0x00000002; break; - } // case 18 + } // case 16 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -552,10 +545,17 @@ public Builder mergeFrom( * * *
-     * Required. Name of the parameter.
+     * Required. The name of the branch to retrieve.
+     * Format:
+     * `projects/*/locations/global/catalogs/default_catalog/branches/some_branch_id`.
+     *
+     * "default_branch" can be used as a special branch_id, it returns the
+     * default branch that has been set for the catalog.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -574,10 +574,17 @@ public java.lang.String getName() { * * *
-     * Required. Name of the parameter.
+     * Required. The name of the branch to retrieve.
+     * Format:
+     * `projects/*/locations/global/catalogs/default_catalog/branches/some_branch_id`.
+     *
+     * "default_branch" can be used as a special branch_id, it returns the
+     * default branch that has been set for the catalog.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -596,10 +603,17 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. Name of the parameter.
+     * Required. The name of the branch to retrieve.
+     * Format:
+     * `projects/*/locations/global/catalogs/default_catalog/branches/some_branch_id`.
+     *
+     * "default_branch" can be used as a special branch_id, it returns the
+     * default branch that has been set for the catalog.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -617,10 +631,17 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. Name of the parameter.
+     * Required. The name of the branch to retrieve.
+     * Format:
+     * `projects/*/locations/global/catalogs/default_catalog/branches/some_branch_id`.
+     *
+     * "default_branch" can be used as a special branch_id, it returns the
+     * default branch that has been set for the catalog.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -634,10 +655,17 @@ public Builder clearName() { * * *
-     * Required. Name of the parameter.
+     * Required. The name of the branch to retrieve.
+     * Format:
+     * `projects/*/locations/global/catalogs/default_catalog/branches/some_branch_id`.
+     *
+     * "default_branch" can be used as a special branch_id, it returns the
+     * default branch that has been set for the catalog.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * 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. @@ -653,62 +681,44 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.Value value_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - valueBuilder_; + private int view_ = 0; /** * * *
-     * Required. Value of the parameter.
+     * The view to apply to the returned
+     * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+     * [Branch.BranchView.BASIC] if unspecified.
+     * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+     * to find what fields are excluded from BASIC view.
      * 
* - * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.retail.v2alpha.BranchView view = 2; * - * @return Whether the value field is set. + * @return The enum numeric value on the wire for view. */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) != 0); + @java.lang.Override + public int getViewValue() { + return view_; } /** * * *
-     * Required. Value of the parameter.
+     * The view to apply to the returned
+     * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+     * [Branch.BranchView.BASIC] if unspecified.
+     * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+     * to find what fields are excluded from BASIC view.
      * 
* - * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The value. - */ - public com.google.protobuf.Value getValue() { - if (valueBuilder_ == null) { - return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; - } else { - return valueBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Value of the parameter.
-     * 
+ * .google.cloud.retail.v2alpha.BranchView view = 2; * - * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. */ - public Builder setValue(com.google.protobuf.Value value) { - if (valueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - } else { - valueBuilder_.setMessage(value); - } + public Builder setViewValue(int value) { + view_ = value; bitField0_ |= 0x00000002; onChanged(); return this; @@ -717,120 +727,68 @@ public Builder setValue(com.google.protobuf.Value value) { * * *
-     * Required. Value of the parameter.
+     * The view to apply to the returned
+     * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+     * [Branch.BranchView.BASIC] if unspecified.
+     * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+     * to find what fields are excluded from BASIC view.
      * 
* - * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setValue(com.google.protobuf.Value.Builder builderForValue) { - if (valueBuilder_ == null) { - value_ = builderForValue.build(); - } else { - valueBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * + * .google.cloud.retail.v2alpha.BranchView view = 2; * - *
-     * Required. Value of the parameter.
-     * 
- * - * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The view. */ - public Builder mergeValue(com.google.protobuf.Value value) { - if (valueBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && value_ != null - && value_ != com.google.protobuf.Value.getDefaultInstance()) { - getValueBuilder().mergeFrom(value); - } else { - value_ = value; - } - } else { - valueBuilder_.mergeFrom(value); - } - if (value_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; + @java.lang.Override + public com.google.cloud.retail.v2alpha.BranchView getView() { + com.google.cloud.retail.v2alpha.BranchView result = + com.google.cloud.retail.v2alpha.BranchView.forNumber(view_); + return result == null ? com.google.cloud.retail.v2alpha.BranchView.UNRECOGNIZED : result; } /** * * *
-     * Required. Value of the parameter.
+     * The view to apply to the returned
+     * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+     * [Branch.BranchView.BASIC] if unspecified.
+     * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+     * to find what fields are excluded from BASIC view.
      * 
* - * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); - value_ = null; - if (valueBuilder_ != null) { - valueBuilder_.dispose(); - valueBuilder_ = null; - } - onChanged(); - return this; - } - /** - * + * .google.cloud.retail.v2alpha.BranchView view = 2; * - *
-     * Required. Value of the parameter.
-     * 
- * - * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The view to set. + * @return This builder for chaining. */ - public com.google.protobuf.Value.Builder getValueBuilder() { + public Builder setView(com.google.cloud.retail.v2alpha.BranchView value) { + if (value == null) { + throw new NullPointerException(); + } bitField0_ |= 0x00000002; + view_ = value.getNumber(); onChanged(); - return getValueFieldBuilder().getBuilder(); + return this; } /** * * *
-     * Required. Value of the parameter.
+     * The view to apply to the returned
+     * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+     * [Branch.BranchView.BASIC] if unspecified.
+     * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+     * to find what fields are excluded from BASIC view.
      * 
* - * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.ValueOrBuilder getValueOrBuilder() { - if (valueBuilder_ != null) { - return valueBuilder_.getMessageOrBuilder(); - } else { - return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; - } - } - /** - * - * - *
-     * Required. Value of the parameter.
-     * 
+ * .google.cloud.retail.v2alpha.BranchView view = 2; * - * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - getValueFieldBuilder() { - if (valueBuilder_ == null) { - valueBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>(getValue(), getParentForChildren(), isClean()); - value_ = null; - } - return valueBuilder_; + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000002); + view_ = 0; + onChanged(); + return this; } @java.lang.Override @@ -844,24 +802,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ActionParameter) + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.GetBranchRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ActionParameter) - private static final com.google.cloud.dialogflow.cx.v3beta1.ActionParameter DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.GetBranchRequest) + private static final com.google.cloud.retail.v2alpha.GetBranchRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ActionParameter(); + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.GetBranchRequest(); } - public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getDefaultInstance() { + public static com.google.cloud.retail.v2alpha.GetBranchRequest 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 ActionParameter parsePartialFrom( + public GetBranchRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -880,17 +838,17 @@ public ActionParameter 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.dialogflow.cx.v3beta1.ActionParameter getDefaultInstanceForType() { + public com.google.cloud.retail.v2alpha.GetBranchRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetBranchRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetBranchRequestOrBuilder.java new file mode 100644 index 000000000000..05f6d51db20f --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetBranchRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/branch_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface GetBranchRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.GetBranchRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the branch to retrieve.
+   * Format:
+   * `projects/*/locations/global/catalogs/default_catalog/branches/some_branch_id`.
+   *
+   * "default_branch" can be used as a special branch_id, it returns the
+   * default branch that has been set for the catalog.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the branch to retrieve.
+   * Format:
+   * `projects/*/locations/global/catalogs/default_catalog/branches/some_branch_id`.
+   *
+   * "default_branch" can be used as a special branch_id, it returns the
+   * default branch that has been set for the catalog.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The view to apply to the returned
+   * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+   * [Branch.BranchView.BASIC] if unspecified.
+   * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+   * to find what fields are excluded from BASIC view.
+   * 
+ * + * .google.cloud.retail.v2alpha.BranchView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * The view to apply to the returned
+   * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+   * [Branch.BranchView.BASIC] if unspecified.
+   * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+   * to find what fields are excluded from BASIC view.
+   * 
+ * + * .google.cloud.retail.v2alpha.BranchView view = 2; + * + * @return The view. + */ + com.google.cloud.retail.v2alpha.BranchView getView(); +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetLoggingConfigRequest.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetLoggingConfigRequest.java new file mode 100644 index 000000000000..b7911fe28070 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetLoggingConfigRequest.java @@ -0,0 +1,651 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * Request for
+ * [ProjectService.GetLoggingConfig][google.cloud.retail.v2alpha.ProjectService.GetLoggingConfig]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.GetLoggingConfigRequest} + */ +public final class GetLoggingConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.GetLoggingConfigRequest) + GetLoggingConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetLoggingConfigRequest.newBuilder() to construct. + private GetLoggingConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetLoggingConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetLoggingConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_GetLoggingConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_GetLoggingConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.GetLoggingConfigRequest.class, + com.google.cloud.retail.v2alpha.GetLoggingConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Full LoggingConfig resource name. Format:
+   * projects/{project_number}/loggingConfig
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Full LoggingConfig resource name. Format:
+   * projects/{project_number}/loggingConfig
+   * 
+ * + * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.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.retail.v2alpha.GetLoggingConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.GetLoggingConfigRequest other = + (com.google.cloud.retail.v2alpha.GetLoggingConfigRequest) 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.retail.v2alpha.GetLoggingConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.GetLoggingConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.GetLoggingConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.GetLoggingConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.GetLoggingConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.GetLoggingConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.GetLoggingConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.GetLoggingConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.GetLoggingConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.GetLoggingConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.GetLoggingConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.GetLoggingConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.GetLoggingConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for
+   * [ProjectService.GetLoggingConfig][google.cloud.retail.v2alpha.ProjectService.GetLoggingConfig]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.GetLoggingConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.GetLoggingConfigRequest) + com.google.cloud.retail.v2alpha.GetLoggingConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_GetLoggingConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_GetLoggingConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.GetLoggingConfigRequest.class, + com.google.cloud.retail.v2alpha.GetLoggingConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.GetLoggingConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_GetLoggingConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.GetLoggingConfigRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.GetLoggingConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.GetLoggingConfigRequest build() { + com.google.cloud.retail.v2alpha.GetLoggingConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.GetLoggingConfigRequest buildPartial() { + com.google.cloud.retail.v2alpha.GetLoggingConfigRequest result = + new com.google.cloud.retail.v2alpha.GetLoggingConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.GetLoggingConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.GetLoggingConfigRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.GetLoggingConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.GetLoggingConfigRequest other) { + if (other == com.google.cloud.retail.v2alpha.GetLoggingConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Full LoggingConfig resource name. Format:
+     * projects/{project_number}/loggingConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Full LoggingConfig resource name. Format:
+     * projects/{project_number}/loggingConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Full LoggingConfig resource name. Format:
+     * projects/{project_number}/loggingConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full LoggingConfig resource name. Format:
+     * projects/{project_number}/loggingConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full LoggingConfig resource name. Format:
+     * projects/{project_number}/loggingConfig
+     * 
+ * + * + * 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.GetLoggingConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.GetLoggingConfigRequest) + private static final com.google.cloud.retail.v2alpha.GetLoggingConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.GetLoggingConfigRequest(); + } + + public static com.google.cloud.retail.v2alpha.GetLoggingConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetLoggingConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.GetLoggingConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetLoggingConfigRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetLoggingConfigRequestOrBuilder.java new file mode 100644 index 000000000000..71e2e299128a --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetLoggingConfigRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface GetLoggingConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.GetLoggingConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Full LoggingConfig resource name. Format:
+   * projects/{project_number}/loggingConfig
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Full LoggingConfig resource name. Format:
+   * projects/{project_number}/loggingConfig
+   * 
+ * + * + * 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-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetProjectRequest.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetProjectRequest.java new file mode 100644 index 000000000000..63896366dee4 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetProjectRequest.java @@ -0,0 +1,646 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * Request for GetProject method.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.GetProjectRequest} + */ +public final class GetProjectRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.GetProjectRequest) + GetProjectRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetProjectRequest.newBuilder() to construct. + private GetProjectRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetProjectRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetProjectRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_GetProjectRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_GetProjectRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.GetProjectRequest.class, + com.google.cloud.retail.v2alpha.GetProjectRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Full resource name of the project. Format:
+   * `projects/{project_number_or_id}/retailProject`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Full resource name of the project. Format:
+   * `projects/{project_number_or_id}/retailProject`
+   * 
+ * + * + * 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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.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.retail.v2alpha.GetProjectRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.GetProjectRequest other = + (com.google.cloud.retail.v2alpha.GetProjectRequest) 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.retail.v2alpha.GetProjectRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.GetProjectRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.GetProjectRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.GetProjectRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.GetProjectRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.GetProjectRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.GetProjectRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.GetProjectRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.GetProjectRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.GetProjectRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.GetProjectRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.GetProjectRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.GetProjectRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for GetProject method.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.GetProjectRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.GetProjectRequest) + com.google.cloud.retail.v2alpha.GetProjectRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_GetProjectRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_GetProjectRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.GetProjectRequest.class, + com.google.cloud.retail.v2alpha.GetProjectRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.GetProjectRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_GetProjectRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.GetProjectRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.GetProjectRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.GetProjectRequest build() { + com.google.cloud.retail.v2alpha.GetProjectRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.GetProjectRequest buildPartial() { + com.google.cloud.retail.v2alpha.GetProjectRequest result = + new com.google.cloud.retail.v2alpha.GetProjectRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.GetProjectRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.GetProjectRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.GetProjectRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.GetProjectRequest other) { + if (other == com.google.cloud.retail.v2alpha.GetProjectRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Full resource name of the project. Format:
+     * `projects/{project_number_or_id}/retailProject`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of the project. Format:
+     * `projects/{project_number_or_id}/retailProject`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of the project. Format:
+     * `projects/{project_number_or_id}/retailProject`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of the project. Format:
+     * `projects/{project_number_or_id}/retailProject`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of the project. Format:
+     * `projects/{project_number_or_id}/retailProject`
+     * 
+ * + * + * 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.GetProjectRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.GetProjectRequest) + private static final com.google.cloud.retail.v2alpha.GetProjectRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.GetProjectRequest(); + } + + public static com.google.cloud.retail.v2alpha.GetProjectRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProjectRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.GetProjectRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetProjectRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetProjectRequestOrBuilder.java new file mode 100644 index 000000000000..adced94821ea --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetProjectRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface GetProjectRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.GetProjectRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Full resource name of the project. Format:
+   * `projects/{project_number_or_id}/retailProject`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Full resource name of the project. Format:
+   * `projects/{project_number_or_id}/retailProject`
+   * 
+ * + * + * 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-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadata.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadata.java index cacc40d3ecb5..76e5b0be0a4a 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadata.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadata.java @@ -211,7 +211,7 @@ public long getFailureCount() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=339 + * google/cloud/retail/v2alpha/import_config.proto;l=345 * @return The requestId. */ @java.lang.Override @@ -237,7 +237,7 @@ public java.lang.String getRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=339 + * google/cloud/retail/v2alpha/import_config.proto;l=345 * @return The bytes for requestId. */ @java.lang.Override @@ -1395,7 +1395,7 @@ public Builder clearFailureCount() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=339 + * google/cloud/retail/v2alpha/import_config.proto;l=345 * @return The requestId. */ @java.lang.Deprecated @@ -1420,7 +1420,7 @@ public java.lang.String getRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=339 + * google/cloud/retail/v2alpha/import_config.proto;l=345 * @return The bytes for requestId. */ @java.lang.Deprecated @@ -1445,7 +1445,7 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=339 + * google/cloud/retail/v2alpha/import_config.proto;l=345 * @param value The requestId to set. * @return This builder for chaining. */ @@ -1469,7 +1469,7 @@ public Builder setRequestId(java.lang.String value) { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=339 + * google/cloud/retail/v2alpha/import_config.proto;l=345 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1489,7 +1489,7 @@ public Builder clearRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=339 + * google/cloud/retail/v2alpha/import_config.proto;l=345 * @param value The bytes for requestId to set. * @return This builder for chaining. */ diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadataOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadataOrBuilder.java index c9b04b13b4c8..9f961aba26ac 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadataOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadataOrBuilder.java @@ -133,7 +133,7 @@ public interface ImportMetadataOrBuilder * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=339 + * google/cloud/retail/v2alpha/import_config.proto;l=345 * @return The requestId. */ @java.lang.Deprecated @@ -148,7 +148,7 @@ public interface ImportMetadataOrBuilder * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=339 + * google/cloud/retail/v2alpha/import_config.proto;l=345 * @return The bytes for requestId. */ @java.lang.Deprecated diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequest.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequest.java index c0e8583f100a..cbe93e1e43f0 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequest.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequest.java @@ -465,7 +465,8 @@ public com.google.cloud.retail.v2alpha.ImportErrorsConfigOrBuilder getErrorsConf * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -481,7 +482,8 @@ public boolean hasUpdateMask() { * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -497,7 +499,8 @@ public com.google.protobuf.FieldMask getUpdateMask() { * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -570,9 +573,14 @@ public int getReconciliationModeValue() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -603,9 +611,14 @@ public java.lang.String getNotificationPubsubTopic() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -1862,7 +1875,8 @@ public com.google.cloud.retail.v2alpha.ImportErrorsConfigOrBuilder getErrorsConf * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1877,7 +1891,8 @@ public boolean hasUpdateMask() { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1898,7 +1913,8 @@ public com.google.protobuf.FieldMask getUpdateMask() { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1921,7 +1937,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1941,7 +1958,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1969,7 +1987,8 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1989,7 +2008,8 @@ public Builder clearUpdateMask() { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -2004,7 +2024,8 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -2023,7 +2044,8 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -2173,9 +2195,14 @@ public Builder clearReconciliationMode() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -2205,9 +2232,14 @@ public java.lang.String getNotificationPubsubTopic() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -2237,9 +2269,14 @@ public com.google.protobuf.ByteString getNotificationPubsubTopicBytes() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -2268,9 +2305,14 @@ public Builder setNotificationPubsubTopic(java.lang.String value) { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -2295,9 +2337,14 @@ public Builder clearNotificationPubsubTopic() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequestOrBuilder.java index 3fdaaa8f77da..97b4db4a6d53 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequestOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequestOrBuilder.java @@ -173,7 +173,8 @@ public interface ImportProductsRequestOrBuilder * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -186,7 +187,8 @@ public interface ImportProductsRequestOrBuilder * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -199,7 +201,8 @@ public interface ImportProductsRequestOrBuilder * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -251,9 +254,14 @@ public interface ImportProductsRequestOrBuilder * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -273,9 +281,14 @@ public interface ImportProductsRequestOrBuilder * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListBranchesRequest.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListBranchesRequest.java new file mode 100644 index 000000000000..17d306edc5f9 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListBranchesRequest.java @@ -0,0 +1,819 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/branch_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * Request for
+ * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.ListBranchesRequest} + */ +public final class ListBranchesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.ListBranchesRequest) + ListBranchesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListBranchesRequest.newBuilder() to construct. + private ListBranchesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListBranchesRequest() { + parent_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListBranchesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.BranchServiceProto + .internal_static_google_cloud_retail_v2alpha_ListBranchesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.BranchServiceProto + .internal_static_google_cloud_retail_v2alpha_ListBranchesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.ListBranchesRequest.class, + com.google.cloud.retail.v2alpha.ListBranchesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent catalog resource name.
+   * 
+ * + * + * 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 catalog resource name.
+   * 
+ * + * + * 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 VIEW_FIELD_NUMBER = 2; + private int view_ = 0; + /** + * + * + *
+   * The view to apply to the returned
+   * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+   * [Branch.BranchView.BASIC] if unspecified.
+   * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+   * to find what fields are excluded from BASIC view.
+   * 
+ * + * .google.cloud.retail.v2alpha.BranchView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * The view to apply to the returned
+   * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+   * [Branch.BranchView.BASIC] if unspecified.
+   * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+   * to find what fields are excluded from BASIC view.
+   * 
+ * + * .google.cloud.retail.v2alpha.BranchView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.BranchView getView() { + com.google.cloud.retail.v2alpha.BranchView result = + com.google.cloud.retail.v2alpha.BranchView.forNumber(view_); + return result == null ? com.google.cloud.retail.v2alpha.BranchView.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.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (view_ != com.google.cloud.retail.v2alpha.BranchView.BRANCH_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(2, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (view_ != com.google.cloud.retail.v2alpha.BranchView.BRANCH_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.ListBranchesRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.ListBranchesRequest other = + (com.google.cloud.retail.v2alpha.ListBranchesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (view_ != other.view_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.ListBranchesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.ListBranchesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for
+   * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.ListBranchesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.ListBranchesRequest) + com.google.cloud.retail.v2alpha.ListBranchesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.BranchServiceProto + .internal_static_google_cloud_retail_v2alpha_ListBranchesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.BranchServiceProto + .internal_static_google_cloud_retail_v2alpha_ListBranchesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.ListBranchesRequest.class, + com.google.cloud.retail.v2alpha.ListBranchesRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.ListBranchesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.BranchServiceProto + .internal_static_google_cloud_retail_v2alpha_ListBranchesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListBranchesRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.ListBranchesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListBranchesRequest build() { + com.google.cloud.retail.v2alpha.ListBranchesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListBranchesRequest buildPartial() { + com.google.cloud.retail.v2alpha.ListBranchesRequest result = + new com.google.cloud.retail.v2alpha.ListBranchesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.ListBranchesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.ListBranchesRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.ListBranchesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListBranchesRequest other) { + if (other == com.google.cloud.retail.v2alpha.ListBranchesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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: + { + view_ = 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 java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent catalog resource name.
+     * 
+ * + * + * 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 catalog resource name.
+     * 
+ * + * + * 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 catalog resource name.
+     * 
+ * + * + * 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 catalog resource name.
+     * 
+ * + * + * 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 catalog resource name.
+     * 
+ * + * + * 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 view_ = 0; + /** + * + * + *
+     * The view to apply to the returned
+     * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+     * [Branch.BranchView.BASIC] if unspecified.
+     * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+     * to find what fields are excluded from BASIC view.
+     * 
+ * + * .google.cloud.retail.v2alpha.BranchView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * The view to apply to the returned
+     * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+     * [Branch.BranchView.BASIC] if unspecified.
+     * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+     * to find what fields are excluded from BASIC view.
+     * 
+ * + * .google.cloud.retail.v2alpha.BranchView view = 2; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The view to apply to the returned
+     * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+     * [Branch.BranchView.BASIC] if unspecified.
+     * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+     * to find what fields are excluded from BASIC view.
+     * 
+ * + * .google.cloud.retail.v2alpha.BranchView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.BranchView getView() { + com.google.cloud.retail.v2alpha.BranchView result = + com.google.cloud.retail.v2alpha.BranchView.forNumber(view_); + return result == null ? com.google.cloud.retail.v2alpha.BranchView.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The view to apply to the returned
+     * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+     * [Branch.BranchView.BASIC] if unspecified.
+     * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+     * to find what fields are excluded from BASIC view.
+     * 
+ * + * .google.cloud.retail.v2alpha.BranchView view = 2; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.retail.v2alpha.BranchView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The view to apply to the returned
+     * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+     * [Branch.BranchView.BASIC] if unspecified.
+     * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+     * to find what fields are excluded from BASIC view.
+     * 
+ * + * .google.cloud.retail.v2alpha.BranchView view = 2; + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000002); + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.ListBranchesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.ListBranchesRequest) + private static final com.google.cloud.retail.v2alpha.ListBranchesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.ListBranchesRequest(); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBranchesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.ListBranchesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListBranchesRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListBranchesRequestOrBuilder.java new file mode 100644 index 000000000000..d8a74ee19755 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListBranchesRequestOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/branch_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface ListBranchesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.ListBranchesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent catalog resource name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent catalog resource name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The view to apply to the returned
+   * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+   * [Branch.BranchView.BASIC] if unspecified.
+   * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+   * to find what fields are excluded from BASIC view.
+   * 
+ * + * .google.cloud.retail.v2alpha.BranchView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * The view to apply to the returned
+   * [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to
+   * [Branch.BranchView.BASIC] if unspecified.
+   * See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch]
+   * to find what fields are excluded from BASIC view.
+   * 
+ * + * .google.cloud.retail.v2alpha.BranchView view = 2; + * + * @return The view. + */ + com.google.cloud.retail.v2alpha.BranchView getView(); +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListBranchesResponse.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListBranchesResponse.java new file mode 100644 index 000000000000..40d24cf8b563 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListBranchesResponse.java @@ -0,0 +1,939 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/branch_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * Response for
+ * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.ListBranchesResponse} + */ +public final class ListBranchesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.ListBranchesResponse) + ListBranchesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListBranchesResponse.newBuilder() to construct. + private ListBranchesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListBranchesResponse() { + branches_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListBranchesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.BranchServiceProto + .internal_static_google_cloud_retail_v2alpha_ListBranchesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.BranchServiceProto + .internal_static_google_cloud_retail_v2alpha_ListBranchesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.ListBranchesResponse.class, + com.google.cloud.retail.v2alpha.ListBranchesResponse.Builder.class); + } + + public static final int BRANCHES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List branches_; + /** + * + * + *
+   * The Branches.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + @java.lang.Override + public java.util.List getBranchesList() { + return branches_; + } + /** + * + * + *
+   * The Branches.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + @java.lang.Override + public java.util.List + getBranchesOrBuilderList() { + return branches_; + } + /** + * + * + *
+   * The Branches.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + @java.lang.Override + public int getBranchesCount() { + return branches_.size(); + } + /** + * + * + *
+   * The Branches.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Branch getBranches(int index) { + return branches_.get(index); + } + /** + * + * + *
+   * The Branches.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.BranchOrBuilder getBranchesOrBuilder(int index) { + return branches_.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 < branches_.size(); i++) { + output.writeMessage(1, branches_.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 < branches_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, branches_.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.retail.v2alpha.ListBranchesResponse)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.ListBranchesResponse other = + (com.google.cloud.retail.v2alpha.ListBranchesResponse) obj; + + if (!getBranchesList().equals(other.getBranchesList())) 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 (getBranchesCount() > 0) { + hash = (37 * hash) + BRANCHES_FIELD_NUMBER; + hash = (53 * hash) + getBranchesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.ListBranchesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.ListBranchesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for
+   * [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.ListBranchesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.ListBranchesResponse) + com.google.cloud.retail.v2alpha.ListBranchesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.BranchServiceProto + .internal_static_google_cloud_retail_v2alpha_ListBranchesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.BranchServiceProto + .internal_static_google_cloud_retail_v2alpha_ListBranchesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.ListBranchesResponse.class, + com.google.cloud.retail.v2alpha.ListBranchesResponse.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.ListBranchesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (branchesBuilder_ == null) { + branches_ = java.util.Collections.emptyList(); + } else { + branches_ = null; + branchesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.BranchServiceProto + .internal_static_google_cloud_retail_v2alpha_ListBranchesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListBranchesResponse getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.ListBranchesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListBranchesResponse build() { + com.google.cloud.retail.v2alpha.ListBranchesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListBranchesResponse buildPartial() { + com.google.cloud.retail.v2alpha.ListBranchesResponse result = + new com.google.cloud.retail.v2alpha.ListBranchesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.retail.v2alpha.ListBranchesResponse result) { + if (branchesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + branches_ = java.util.Collections.unmodifiableList(branches_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.branches_ = branches_; + } else { + result.branches_ = branchesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.ListBranchesResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.ListBranchesResponse) { + return mergeFrom((com.google.cloud.retail.v2alpha.ListBranchesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListBranchesResponse other) { + if (other == com.google.cloud.retail.v2alpha.ListBranchesResponse.getDefaultInstance()) + return this; + if (branchesBuilder_ == null) { + if (!other.branches_.isEmpty()) { + if (branches_.isEmpty()) { + branches_ = other.branches_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBranchesIsMutable(); + branches_.addAll(other.branches_); + } + onChanged(); + } + } else { + if (!other.branches_.isEmpty()) { + if (branchesBuilder_.isEmpty()) { + branchesBuilder_.dispose(); + branchesBuilder_ = null; + branches_ = other.branches_; + bitField0_ = (bitField0_ & ~0x00000001); + branchesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBranchesFieldBuilder() + : null; + } else { + branchesBuilder_.addAllMessages(other.branches_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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.retail.v2alpha.Branch m = + input.readMessage( + com.google.cloud.retail.v2alpha.Branch.parser(), extensionRegistry); + if (branchesBuilder_ == null) { + ensureBranchesIsMutable(); + branches_.add(m); + } else { + branchesBuilder_.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 branches_ = + java.util.Collections.emptyList(); + + private void ensureBranchesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + branches_ = new java.util.ArrayList(branches_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Branch, + com.google.cloud.retail.v2alpha.Branch.Builder, + com.google.cloud.retail.v2alpha.BranchOrBuilder> + branchesBuilder_; + + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public java.util.List getBranchesList() { + if (branchesBuilder_ == null) { + return java.util.Collections.unmodifiableList(branches_); + } else { + return branchesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public int getBranchesCount() { + if (branchesBuilder_ == null) { + return branches_.size(); + } else { + return branchesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public com.google.cloud.retail.v2alpha.Branch getBranches(int index) { + if (branchesBuilder_ == null) { + return branches_.get(index); + } else { + return branchesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public Builder setBranches(int index, com.google.cloud.retail.v2alpha.Branch value) { + if (branchesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBranchesIsMutable(); + branches_.set(index, value); + onChanged(); + } else { + branchesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public Builder setBranches( + int index, com.google.cloud.retail.v2alpha.Branch.Builder builderForValue) { + if (branchesBuilder_ == null) { + ensureBranchesIsMutable(); + branches_.set(index, builderForValue.build()); + onChanged(); + } else { + branchesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public Builder addBranches(com.google.cloud.retail.v2alpha.Branch value) { + if (branchesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBranchesIsMutable(); + branches_.add(value); + onChanged(); + } else { + branchesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public Builder addBranches(int index, com.google.cloud.retail.v2alpha.Branch value) { + if (branchesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBranchesIsMutable(); + branches_.add(index, value); + onChanged(); + } else { + branchesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public Builder addBranches(com.google.cloud.retail.v2alpha.Branch.Builder builderForValue) { + if (branchesBuilder_ == null) { + ensureBranchesIsMutable(); + branches_.add(builderForValue.build()); + onChanged(); + } else { + branchesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public Builder addBranches( + int index, com.google.cloud.retail.v2alpha.Branch.Builder builderForValue) { + if (branchesBuilder_ == null) { + ensureBranchesIsMutable(); + branches_.add(index, builderForValue.build()); + onChanged(); + } else { + branchesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public Builder addAllBranches( + java.lang.Iterable values) { + if (branchesBuilder_ == null) { + ensureBranchesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, branches_); + onChanged(); + } else { + branchesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public Builder clearBranches() { + if (branchesBuilder_ == null) { + branches_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + branchesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public Builder removeBranches(int index) { + if (branchesBuilder_ == null) { + ensureBranchesIsMutable(); + branches_.remove(index); + onChanged(); + } else { + branchesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public com.google.cloud.retail.v2alpha.Branch.Builder getBranchesBuilder(int index) { + return getBranchesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public com.google.cloud.retail.v2alpha.BranchOrBuilder getBranchesOrBuilder(int index) { + if (branchesBuilder_ == null) { + return branches_.get(index); + } else { + return branchesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public java.util.List + getBranchesOrBuilderList() { + if (branchesBuilder_ != null) { + return branchesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(branches_); + } + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public com.google.cloud.retail.v2alpha.Branch.Builder addBranchesBuilder() { + return getBranchesFieldBuilder() + .addBuilder(com.google.cloud.retail.v2alpha.Branch.getDefaultInstance()); + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public com.google.cloud.retail.v2alpha.Branch.Builder addBranchesBuilder(int index) { + return getBranchesFieldBuilder() + .addBuilder(index, com.google.cloud.retail.v2alpha.Branch.getDefaultInstance()); + } + /** + * + * + *
+     * The Branches.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + public java.util.List getBranchesBuilderList() { + return getBranchesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Branch, + com.google.cloud.retail.v2alpha.Branch.Builder, + com.google.cloud.retail.v2alpha.BranchOrBuilder> + getBranchesFieldBuilder() { + if (branchesBuilder_ == null) { + branchesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Branch, + com.google.cloud.retail.v2alpha.Branch.Builder, + com.google.cloud.retail.v2alpha.BranchOrBuilder>( + branches_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + branches_ = null; + } + return branchesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.ListBranchesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.ListBranchesResponse) + private static final com.google.cloud.retail.v2alpha.ListBranchesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.ListBranchesResponse(); + } + + public static com.google.cloud.retail.v2alpha.ListBranchesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBranchesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.ListBranchesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListBranchesResponseOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListBranchesResponseOrBuilder.java new file mode 100644 index 000000000000..91cf00b03da7 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListBranchesResponseOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/branch_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface ListBranchesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.ListBranchesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Branches.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + java.util.List getBranchesList(); + /** + * + * + *
+   * The Branches.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + com.google.cloud.retail.v2alpha.Branch getBranches(int index); + /** + * + * + *
+   * The Branches.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + int getBranchesCount(); + /** + * + * + *
+   * The Branches.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + java.util.List + getBranchesOrBuilderList(); + /** + * + * + *
+   * The Branches.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.Branch branches = 1; + */ + com.google.cloud.retail.v2alpha.BranchOrBuilder getBranchesOrBuilder(int index); +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListEnrolledSolutionsRequest.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListEnrolledSolutionsRequest.java new file mode 100644 index 000000000000..98a6f513dbea --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListEnrolledSolutionsRequest.java @@ -0,0 +1,651 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * Request for ListEnrolledSolutions method.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest} + */ +public final class ListEnrolledSolutionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest) + ListEnrolledSolutionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEnrolledSolutionsRequest.newBuilder() to construct. + private ListEnrolledSolutionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEnrolledSolutionsRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEnrolledSolutionsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest.class, + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Full resource name of parent. Format:
+   * `projects/{project_number_or_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Full resource name of parent. Format:
+   * `projects/{project_number_or_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest other = + (com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.ListEnrolledSolutionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for ListEnrolledSolutions method.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest) + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest.class, + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest build() { + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest buildPartial() { + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest result = + new com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest other) { + if (other + == com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Full resource name of parent. Format:
+     * `projects/{project_number_or_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of parent. Format:
+     * `projects/{project_number_or_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of parent. Format:
+     * `projects/{project_number_or_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of parent. Format:
+     * `projects/{project_number_or_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of parent. Format:
+     * `projects/{project_number_or_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest) + private static final com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest(); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEnrolledSolutionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.ListEnrolledSolutionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListEnrolledSolutionsRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListEnrolledSolutionsRequestOrBuilder.java new file mode 100644 index 000000000000..388141f1df26 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListEnrolledSolutionsRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface ListEnrolledSolutionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Full resource name of parent. Format:
+   * `projects/{project_number_or_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Full resource name of parent. Format:
+   * `projects/{project_number_or_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListEnrolledSolutionsResponse.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListEnrolledSolutionsResponse.java new file mode 100644 index 000000000000..bb7f56bf023c --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListEnrolledSolutionsResponse.java @@ -0,0 +1,839 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * Response for ListEnrolledSolutions method.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse} + */ +public final class ListEnrolledSolutionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse) + ListEnrolledSolutionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEnrolledSolutionsResponse.newBuilder() to construct. + private ListEnrolledSolutionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEnrolledSolutionsResponse() { + enrolledSolutions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEnrolledSolutionsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse.class, + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse.Builder.class); + } + + public static final int ENROLLED_SOLUTIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List enrolledSolutions_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.retail.v2alpha.SolutionType> + enrolledSolutions_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.retail.v2alpha.SolutionType>() { + public com.google.cloud.retail.v2alpha.SolutionType convert(java.lang.Integer from) { + com.google.cloud.retail.v2alpha.SolutionType result = + com.google.cloud.retail.v2alpha.SolutionType.forNumber(from); + return result == null + ? com.google.cloud.retail.v2alpha.SolutionType.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Retail API solutions that the project has enrolled.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @return A list containing the enrolledSolutions. + */ + @java.lang.Override + public java.util.List getEnrolledSolutionsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.retail.v2alpha.SolutionType>( + enrolledSolutions_, enrolledSolutions_converter_); + } + /** + * + * + *
+   * Retail API solutions that the project has enrolled.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @return The count of enrolledSolutions. + */ + @java.lang.Override + public int getEnrolledSolutionsCount() { + return enrolledSolutions_.size(); + } + /** + * + * + *
+   * Retail API solutions that the project has enrolled.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @param index The index of the element to return. + * @return The enrolledSolutions at the given index. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.SolutionType getEnrolledSolutions(int index) { + return enrolledSolutions_converter_.convert(enrolledSolutions_.get(index)); + } + /** + * + * + *
+   * Retail API solutions that the project has enrolled.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @return A list containing the enum numeric values on the wire for enrolledSolutions. + */ + @java.lang.Override + public java.util.List getEnrolledSolutionsValueList() { + return enrolledSolutions_; + } + /** + * + * + *
+   * Retail API solutions that the project has enrolled.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enrolledSolutions at the given index. + */ + @java.lang.Override + public int getEnrolledSolutionsValue(int index) { + return enrolledSolutions_.get(index); + } + + private int enrolledSolutionsMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (getEnrolledSolutionsList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(enrolledSolutionsMemoizedSerializedSize); + } + for (int i = 0; i < enrolledSolutions_.size(); i++) { + output.writeEnumNoTag(enrolledSolutions_.get(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 < enrolledSolutions_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(enrolledSolutions_.get(i)); + } + size += dataSize; + if (!getEnrolledSolutionsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + enrolledSolutionsMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse other = + (com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse) obj; + + if (!enrolledSolutions_.equals(other.enrolledSolutions_)) 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 (getEnrolledSolutionsCount() > 0) { + hash = (37 * hash) + ENROLLED_SOLUTIONS_FIELD_NUMBER; + hash = (53 * hash) + enrolledSolutions_.hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.ListEnrolledSolutionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for ListEnrolledSolutions method.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse) + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse.class, + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enrolledSolutions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse build() { + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse buildPartial() { + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse result = + new com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse result) { + if (((bitField0_ & 0x00000001) != 0)) { + enrolledSolutions_ = java.util.Collections.unmodifiableList(enrolledSolutions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.enrolledSolutions_ = enrolledSolutions_; + } + + private void buildPartial0( + com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse) { + return mergeFrom((com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse other) { + if (other + == com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse.getDefaultInstance()) + return this; + if (!other.enrolledSolutions_.isEmpty()) { + if (enrolledSolutions_.isEmpty()) { + enrolledSolutions_ = other.enrolledSolutions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEnrolledSolutionsIsMutable(); + enrolledSolutions_.addAll(other.enrolledSolutions_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int tmpRaw = input.readEnum(); + ensureEnrolledSolutionsIsMutable(); + enrolledSolutions_.add(tmpRaw); + break; + } // case 8 + case 10: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureEnrolledSolutionsIsMutable(); + enrolledSolutions_.add(tmpRaw); + } + input.popLimit(oldLimit); + 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 enrolledSolutions_ = + java.util.Collections.emptyList(); + + private void ensureEnrolledSolutionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + enrolledSolutions_ = new java.util.ArrayList(enrolledSolutions_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Retail API solutions that the project has enrolled.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @return A list containing the enrolledSolutions. + */ + public java.util.List getEnrolledSolutionsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.retail.v2alpha.SolutionType>( + enrolledSolutions_, enrolledSolutions_converter_); + } + /** + * + * + *
+     * Retail API solutions that the project has enrolled.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @return The count of enrolledSolutions. + */ + public int getEnrolledSolutionsCount() { + return enrolledSolutions_.size(); + } + /** + * + * + *
+     * Retail API solutions that the project has enrolled.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @param index The index of the element to return. + * @return The enrolledSolutions at the given index. + */ + public com.google.cloud.retail.v2alpha.SolutionType getEnrolledSolutions(int index) { + return enrolledSolutions_converter_.convert(enrolledSolutions_.get(index)); + } + /** + * + * + *
+     * Retail API solutions that the project has enrolled.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @param index The index to set the value at. + * @param value The enrolledSolutions to set. + * @return This builder for chaining. + */ + public Builder setEnrolledSolutions( + int index, com.google.cloud.retail.v2alpha.SolutionType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnrolledSolutionsIsMutable(); + enrolledSolutions_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Retail API solutions that the project has enrolled.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @param value The enrolledSolutions to add. + * @return This builder for chaining. + */ + public Builder addEnrolledSolutions(com.google.cloud.retail.v2alpha.SolutionType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnrolledSolutionsIsMutable(); + enrolledSolutions_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Retail API solutions that the project has enrolled.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @param values The enrolledSolutions to add. + * @return This builder for chaining. + */ + public Builder addAllEnrolledSolutions( + java.lang.Iterable values) { + ensureEnrolledSolutionsIsMutable(); + for (com.google.cloud.retail.v2alpha.SolutionType value : values) { + enrolledSolutions_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Retail API solutions that the project has enrolled.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnrolledSolutions() { + enrolledSolutions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Retail API solutions that the project has enrolled.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @return A list containing the enum numeric values on the wire for enrolledSolutions. + */ + public java.util.List getEnrolledSolutionsValueList() { + return java.util.Collections.unmodifiableList(enrolledSolutions_); + } + /** + * + * + *
+     * Retail API solutions that the project has enrolled.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enrolledSolutions at the given index. + */ + public int getEnrolledSolutionsValue(int index) { + return enrolledSolutions_.get(index); + } + /** + * + * + *
+     * Retail API solutions that the project has enrolled.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for enrolledSolutions to set. + * @return This builder for chaining. + */ + public Builder setEnrolledSolutionsValue(int index, int value) { + ensureEnrolledSolutionsIsMutable(); + enrolledSolutions_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Retail API solutions that the project has enrolled.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @param value The enum numeric value on the wire for enrolledSolutions to add. + * @return This builder for chaining. + */ + public Builder addEnrolledSolutionsValue(int value) { + ensureEnrolledSolutionsIsMutable(); + enrolledSolutions_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Retail API solutions that the project has enrolled.
+     * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @param values The enum numeric values on the wire for enrolledSolutions to add. + * @return This builder for chaining. + */ + public Builder addAllEnrolledSolutionsValue(java.lang.Iterable values) { + ensureEnrolledSolutionsIsMutable(); + for (int value : values) { + enrolledSolutions_.add(value); + } + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse) + private static final com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse(); + } + + public static com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEnrolledSolutionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.ListEnrolledSolutionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListEnrolledSolutionsResponseOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListEnrolledSolutionsResponseOrBuilder.java new file mode 100644 index 000000000000..5700163a013c --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListEnrolledSolutionsResponseOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface ListEnrolledSolutionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Retail API solutions that the project has enrolled.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @return A list containing the enrolledSolutions. + */ + java.util.List getEnrolledSolutionsList(); + /** + * + * + *
+   * Retail API solutions that the project has enrolled.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @return The count of enrolledSolutions. + */ + int getEnrolledSolutionsCount(); + /** + * + * + *
+   * Retail API solutions that the project has enrolled.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @param index The index of the element to return. + * @return The enrolledSolutions at the given index. + */ + com.google.cloud.retail.v2alpha.SolutionType getEnrolledSolutions(int index); + /** + * + * + *
+   * Retail API solutions that the project has enrolled.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @return A list containing the enum numeric values on the wire for enrolledSolutions. + */ + java.util.List getEnrolledSolutionsValueList(); + /** + * + * + *
+   * Retail API solutions that the project has enrolled.
+   * 
+ * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 1; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enrolledSolutions at the given index. + */ + int getEnrolledSolutionsValue(int index); +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListMerchantCenterAccountLinksRequest.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListMerchantCenterAccountLinksRequest.java index 43dad5c0144a..0a6bbee0e201 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListMerchantCenterAccountLinksRequest.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListMerchantCenterAccountLinksRequest.java @@ -77,7 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. The parent Catalog of the resource.
    * It must match this format:
-   * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}
+   * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
    * 
* * @@ -104,7 +104,7 @@ public java.lang.String getParent() { *
    * Required. The parent Catalog of the resource.
    * It must match this format:
-   * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}
+   * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
    * 
* * @@ -486,7 +486,7 @@ public Builder mergeFrom( *
      * Required. The parent Catalog of the resource.
      * It must match this format:
-     * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}
+     * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
      * 
* * @@ -512,7 +512,7 @@ public java.lang.String getParent() { *
      * Required. The parent Catalog of the resource.
      * It must match this format:
-     * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}
+     * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
      * 
* * @@ -538,7 +538,7 @@ public com.google.protobuf.ByteString getParentBytes() { *
      * Required. The parent Catalog of the resource.
      * It must match this format:
-     * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}
+     * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
      * 
* * @@ -563,7 +563,7 @@ public Builder setParent(java.lang.String value) { *
      * Required. The parent Catalog of the resource.
      * It must match this format:
-     * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}
+     * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
      * 
* * @@ -584,7 +584,7 @@ public Builder clearParent() { *
      * Required. The parent Catalog of the resource.
      * It must match this format:
-     * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}
+     * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
      * 
* * diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListMerchantCenterAccountLinksRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListMerchantCenterAccountLinksRequestOrBuilder.java index d11b7e12272f..92a989f16ca6 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListMerchantCenterAccountLinksRequestOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListMerchantCenterAccountLinksRequestOrBuilder.java @@ -30,7 +30,7 @@ public interface ListMerchantCenterAccountLinksRequestOrBuilder *
    * Required. The parent Catalog of the resource.
    * It must match this format:
-   * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}
+   * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
    * 
* * @@ -46,7 +46,7 @@ public interface ListMerchantCenterAccountLinksRequestOrBuilder *
    * Required. The parent Catalog of the resource.
    * It must match this format:
-   * projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}
+   * `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`
    * 
* * diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/LoggingConfig.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/LoggingConfig.java new file mode 100644 index 000000000000..3a529ceb826f --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/LoggingConfig.java @@ -0,0 +1,3897 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * Project level logging config to control what level of log will be generated
+ * and written to Cloud Logging.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.LoggingConfig} + */ +public final class LoggingConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.LoggingConfig) + LoggingConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use LoggingConfig.newBuilder() to construct. + private LoggingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LoggingConfig() { + name_ = ""; + serviceLogGenerationRules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LoggingConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_LoggingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_LoggingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.LoggingConfig.class, + com.google.cloud.retail.v2alpha.LoggingConfig.Builder.class); + } + + /** + * + * + *
+   * The setting to control log generation.
+   * 
+ * + * Protobuf enum {@code google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel} + */ + public enum LoggingLevel implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. Defaults to `LOG_FOR_WARNINGS_AND_ABOVE` if unset.
+     * 
+ * + * LOGGING_LEVEL_UNSPECIFIED = 0; + */ + LOGGING_LEVEL_UNSPECIFIED(0), + /** + * + * + *
+     * No log will be generated and sent to Cloud Logging.
+     * 
+ * + * LOGGING_DISABLED = 1; + */ + LOGGING_DISABLED(1), + /** + * + * + *
+     * Log for operations resulted in fatal error.
+     * 
+ * + * LOG_ERRORS_AND_ABOVE = 2; + */ + LOG_ERRORS_AND_ABOVE(2), + /** + * + * + *
+     * In addition to `LOG_ERRORS_AND_ABOVE`, also log for operations that have
+     * soft errors, quality suggestions.
+     * 
+ * + * LOG_WARNINGS_AND_ABOVE = 3; + */ + LOG_WARNINGS_AND_ABOVE(3), + /** + * + * + *
+     * Log all operations, including successful ones.
+     * 
+ * + * LOG_ALL = 4; + */ + LOG_ALL(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. Defaults to `LOG_FOR_WARNINGS_AND_ABOVE` if unset.
+     * 
+ * + * LOGGING_LEVEL_UNSPECIFIED = 0; + */ + public static final int LOGGING_LEVEL_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * No log will be generated and sent to Cloud Logging.
+     * 
+ * + * LOGGING_DISABLED = 1; + */ + public static final int LOGGING_DISABLED_VALUE = 1; + /** + * + * + *
+     * Log for operations resulted in fatal error.
+     * 
+ * + * LOG_ERRORS_AND_ABOVE = 2; + */ + public static final int LOG_ERRORS_AND_ABOVE_VALUE = 2; + /** + * + * + *
+     * In addition to `LOG_ERRORS_AND_ABOVE`, also log for operations that have
+     * soft errors, quality suggestions.
+     * 
+ * + * LOG_WARNINGS_AND_ABOVE = 3; + */ + public static final int LOG_WARNINGS_AND_ABOVE_VALUE = 3; + /** + * + * + *
+     * Log all operations, including successful ones.
+     * 
+ * + * LOG_ALL = 4; + */ + public static final int LOG_ALL_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 LoggingLevel 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 LoggingLevel forNumber(int value) { + switch (value) { + case 0: + return LOGGING_LEVEL_UNSPECIFIED; + case 1: + return LOGGING_DISABLED; + case 2: + return LOG_ERRORS_AND_ABOVE; + case 3: + return LOG_WARNINGS_AND_ABOVE; + case 4: + return LOG_ALL; + 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 LoggingLevel findValueByNumber(int number) { + return LoggingLevel.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.LoggingConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final LoggingLevel[] VALUES = values(); + + public static LoggingLevel 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 LoggingLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel) + } + + public interface LogGenerationRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The logging level.
+     *
+     * By default it is set to `LOG_WARNINGS_AND_ABOVE`.
+     * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel logging_level = 1; + * + * @return The enum numeric value on the wire for loggingLevel. + */ + int getLoggingLevelValue(); + /** + * + * + *
+     * The logging level.
+     *
+     * By default it is set to `LOG_WARNINGS_AND_ABOVE`.
+     * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel logging_level = 1; + * + * @return The loggingLevel. + */ + com.google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel getLoggingLevel(); + + /** + * + * + *
+     * The log sample rate for INFO level log entries. You can use this to
+     * reduce the number of entries generated for INFO level logs.
+     *
+     * DO NOT set this field if the
+     * [logging_level][google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.logging_level]
+     * is not
+     * [LoggingLevel.LOG_ALL][google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOG_ALL].
+     * Otherwise, an INVALID_ARGUMENT error is returned.
+     *
+     * Sample rate for INFO logs defaults to 1 when unset (generate and send all
+     * INFO logs to Cloud Logging). Its value must be greater than 0 and less
+     * than or equal to 1.
+     * 
+ * + * optional float info_log_sample_rate = 2; + * + * @return Whether the infoLogSampleRate field is set. + */ + boolean hasInfoLogSampleRate(); + /** + * + * + *
+     * The log sample rate for INFO level log entries. You can use this to
+     * reduce the number of entries generated for INFO level logs.
+     *
+     * DO NOT set this field if the
+     * [logging_level][google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.logging_level]
+     * is not
+     * [LoggingLevel.LOG_ALL][google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOG_ALL].
+     * Otherwise, an INVALID_ARGUMENT error is returned.
+     *
+     * Sample rate for INFO logs defaults to 1 when unset (generate and send all
+     * INFO logs to Cloud Logging). Its value must be greater than 0 and less
+     * than or equal to 1.
+     * 
+ * + * optional float info_log_sample_rate = 2; + * + * @return The infoLogSampleRate. + */ + float getInfoLogSampleRate(); + } + /** + * + * + *
+   * The logging configurations for services supporting log generation.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule} + */ + public static final class LogGenerationRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule) + LogGenerationRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use LogGenerationRule.newBuilder() to construct. + private LogGenerationRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LogGenerationRule() { + loggingLevel_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LogGenerationRule(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_LoggingConfig_LogGenerationRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_LoggingConfig_LogGenerationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.class, + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.Builder.class); + } + + private int bitField0_; + public static final int LOGGING_LEVEL_FIELD_NUMBER = 1; + private int loggingLevel_ = 0; + /** + * + * + *
+     * The logging level.
+     *
+     * By default it is set to `LOG_WARNINGS_AND_ABOVE`.
+     * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel logging_level = 1; + * + * @return The enum numeric value on the wire for loggingLevel. + */ + @java.lang.Override + public int getLoggingLevelValue() { + return loggingLevel_; + } + /** + * + * + *
+     * The logging level.
+     *
+     * By default it is set to `LOG_WARNINGS_AND_ABOVE`.
+     * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel logging_level = 1; + * + * @return The loggingLevel. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel getLoggingLevel() { + com.google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel result = + com.google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.forNumber(loggingLevel_); + return result == null + ? com.google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.UNRECOGNIZED + : result; + } + + public static final int INFO_LOG_SAMPLE_RATE_FIELD_NUMBER = 2; + private float infoLogSampleRate_ = 0F; + /** + * + * + *
+     * The log sample rate for INFO level log entries. You can use this to
+     * reduce the number of entries generated for INFO level logs.
+     *
+     * DO NOT set this field if the
+     * [logging_level][google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.logging_level]
+     * is not
+     * [LoggingLevel.LOG_ALL][google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOG_ALL].
+     * Otherwise, an INVALID_ARGUMENT error is returned.
+     *
+     * Sample rate for INFO logs defaults to 1 when unset (generate and send all
+     * INFO logs to Cloud Logging). Its value must be greater than 0 and less
+     * than or equal to 1.
+     * 
+ * + * optional float info_log_sample_rate = 2; + * + * @return Whether the infoLogSampleRate field is set. + */ + @java.lang.Override + public boolean hasInfoLogSampleRate() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The log sample rate for INFO level log entries. You can use this to
+     * reduce the number of entries generated for INFO level logs.
+     *
+     * DO NOT set this field if the
+     * [logging_level][google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.logging_level]
+     * is not
+     * [LoggingLevel.LOG_ALL][google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOG_ALL].
+     * Otherwise, an INVALID_ARGUMENT error is returned.
+     *
+     * Sample rate for INFO logs defaults to 1 when unset (generate and send all
+     * INFO logs to Cloud Logging). Its value must be greater than 0 and less
+     * than or equal to 1.
+     * 
+ * + * optional float info_log_sample_rate = 2; + * + * @return The infoLogSampleRate. + */ + @java.lang.Override + public float getInfoLogSampleRate() { + return infoLogSampleRate_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (loggingLevel_ + != com.google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOGGING_LEVEL_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, loggingLevel_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeFloat(2, infoLogSampleRate_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (loggingLevel_ + != com.google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOGGING_LEVEL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, loggingLevel_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, infoLogSampleRate_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2alpha.LoggingConfig.LogGenerationRule)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule other = + (com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule) obj; + + if (loggingLevel_ != other.loggingLevel_) return false; + if (hasInfoLogSampleRate() != other.hasInfoLogSampleRate()) return false; + if (hasInfoLogSampleRate()) { + if (java.lang.Float.floatToIntBits(getInfoLogSampleRate()) + != java.lang.Float.floatToIntBits(other.getInfoLogSampleRate())) 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) + LOGGING_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + loggingLevel_; + if (hasInfoLogSampleRate()) { + hash = (37 * hash) + INFO_LOG_SAMPLE_RATE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getInfoLogSampleRate()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.LoggingConfig.LogGenerationRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The logging configurations for services supporting log generation.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule) + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_LoggingConfig_LogGenerationRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_LoggingConfig_LogGenerationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.class, + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.Builder.class); + } + + // Construct using + // com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + loggingLevel_ = 0; + infoLogSampleRate_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_LoggingConfig_LogGenerationRule_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule build() { + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule buildPartial() { + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule result = + new com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.loggingLevel_ = loggingLevel_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.infoLogSampleRate_ = infoLogSampleRate_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule) { + return mergeFrom((com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule other) { + if (other + == com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.getDefaultInstance()) + return this; + if (other.loggingLevel_ != 0) { + setLoggingLevelValue(other.getLoggingLevelValue()); + } + if (other.hasInfoLogSampleRate()) { + setInfoLogSampleRate(other.getInfoLogSampleRate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + loggingLevel_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 21: + { + infoLogSampleRate_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int loggingLevel_ = 0; + /** + * + * + *
+       * The logging level.
+       *
+       * By default it is set to `LOG_WARNINGS_AND_ABOVE`.
+       * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel logging_level = 1; + * + * @return The enum numeric value on the wire for loggingLevel. + */ + @java.lang.Override + public int getLoggingLevelValue() { + return loggingLevel_; + } + /** + * + * + *
+       * The logging level.
+       *
+       * By default it is set to `LOG_WARNINGS_AND_ABOVE`.
+       * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel logging_level = 1; + * + * @param value The enum numeric value on the wire for loggingLevel to set. + * @return This builder for chaining. + */ + public Builder setLoggingLevelValue(int value) { + loggingLevel_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The logging level.
+       *
+       * By default it is set to `LOG_WARNINGS_AND_ABOVE`.
+       * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel logging_level = 1; + * + * @return The loggingLevel. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel getLoggingLevel() { + com.google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel result = + com.google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.forNumber(loggingLevel_); + return result == null + ? com.google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The logging level.
+       *
+       * By default it is set to `LOG_WARNINGS_AND_ABOVE`.
+       * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel logging_level = 1; + * + * @param value The loggingLevel to set. + * @return This builder for chaining. + */ + public Builder setLoggingLevel( + com.google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + loggingLevel_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The logging level.
+       *
+       * By default it is set to `LOG_WARNINGS_AND_ABOVE`.
+       * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel logging_level = 1; + * + * @return This builder for chaining. + */ + public Builder clearLoggingLevel() { + bitField0_ = (bitField0_ & ~0x00000001); + loggingLevel_ = 0; + onChanged(); + return this; + } + + private float infoLogSampleRate_; + /** + * + * + *
+       * The log sample rate for INFO level log entries. You can use this to
+       * reduce the number of entries generated for INFO level logs.
+       *
+       * DO NOT set this field if the
+       * [logging_level][google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.logging_level]
+       * is not
+       * [LoggingLevel.LOG_ALL][google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOG_ALL].
+       * Otherwise, an INVALID_ARGUMENT error is returned.
+       *
+       * Sample rate for INFO logs defaults to 1 when unset (generate and send all
+       * INFO logs to Cloud Logging). Its value must be greater than 0 and less
+       * than or equal to 1.
+       * 
+ * + * optional float info_log_sample_rate = 2; + * + * @return Whether the infoLogSampleRate field is set. + */ + @java.lang.Override + public boolean hasInfoLogSampleRate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * The log sample rate for INFO level log entries. You can use this to
+       * reduce the number of entries generated for INFO level logs.
+       *
+       * DO NOT set this field if the
+       * [logging_level][google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.logging_level]
+       * is not
+       * [LoggingLevel.LOG_ALL][google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOG_ALL].
+       * Otherwise, an INVALID_ARGUMENT error is returned.
+       *
+       * Sample rate for INFO logs defaults to 1 when unset (generate and send all
+       * INFO logs to Cloud Logging). Its value must be greater than 0 and less
+       * than or equal to 1.
+       * 
+ * + * optional float info_log_sample_rate = 2; + * + * @return The infoLogSampleRate. + */ + @java.lang.Override + public float getInfoLogSampleRate() { + return infoLogSampleRate_; + } + /** + * + * + *
+       * The log sample rate for INFO level log entries. You can use this to
+       * reduce the number of entries generated for INFO level logs.
+       *
+       * DO NOT set this field if the
+       * [logging_level][google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.logging_level]
+       * is not
+       * [LoggingLevel.LOG_ALL][google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOG_ALL].
+       * Otherwise, an INVALID_ARGUMENT error is returned.
+       *
+       * Sample rate for INFO logs defaults to 1 when unset (generate and send all
+       * INFO logs to Cloud Logging). Its value must be greater than 0 and less
+       * than or equal to 1.
+       * 
+ * + * optional float info_log_sample_rate = 2; + * + * @param value The infoLogSampleRate to set. + * @return This builder for chaining. + */ + public Builder setInfoLogSampleRate(float value) { + + infoLogSampleRate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The log sample rate for INFO level log entries. You can use this to
+       * reduce the number of entries generated for INFO level logs.
+       *
+       * DO NOT set this field if the
+       * [logging_level][google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.logging_level]
+       * is not
+       * [LoggingLevel.LOG_ALL][google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOG_ALL].
+       * Otherwise, an INVALID_ARGUMENT error is returned.
+       *
+       * Sample rate for INFO logs defaults to 1 when unset (generate and send all
+       * INFO logs to Cloud Logging). Its value must be greater than 0 and less
+       * than or equal to 1.
+       * 
+ * + * optional float info_log_sample_rate = 2; + * + * @return This builder for chaining. + */ + public Builder clearInfoLogSampleRate() { + bitField0_ = (bitField0_ & ~0x00000002); + infoLogSampleRate_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule) + private static final com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule(); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LogGenerationRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.LoggingConfig.LogGenerationRule + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceLogGenerationRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Supported service names:
+     * "CatalogService",
+     * "CompletionService",
+     * "ControlService",
+     * "MerchantCenterStreaming",
+     * "ModelService",
+     * "PredictionService",
+     * "ProductService",
+     * "ServingConfigService",
+     * "UserEventService",
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+     * Required. Supported service names:
+     * "CatalogService",
+     * "CompletionService",
+     * "ControlService",
+     * "MerchantCenterStreaming",
+     * "ModelService",
+     * "PredictionService",
+     * "ProductService",
+     * "ServingConfigService",
+     * "UserEventService",
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + /** + * + * + *
+     * The log generation rule that applies to this service.
+     * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule log_generation_rule = 3; + * + * + * @return Whether the logGenerationRule field is set. + */ + boolean hasLogGenerationRule(); + /** + * + * + *
+     * The log generation rule that applies to this service.
+     * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule log_generation_rule = 3; + * + * + * @return The logGenerationRule. + */ + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule getLogGenerationRule(); + /** + * + * + *
+     * The log generation rule that applies to this service.
+     * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule log_generation_rule = 3; + * + */ + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRuleOrBuilder + getLogGenerationRuleOrBuilder(); + } + /** + * + * + *
+   * The granular logging configurations for supported services.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule} + */ + public static final class ServiceLogGenerationRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule) + ServiceLogGenerationRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use ServiceLogGenerationRule.newBuilder() to construct. + private ServiceLogGenerationRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceLogGenerationRule() { + serviceName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ServiceLogGenerationRule(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_LoggingConfig_ServiceLogGenerationRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_LoggingConfig_ServiceLogGenerationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule.class, + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule.Builder.class); + } + + private int bitField0_; + public static final int SERVICE_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * Required. Supported service names:
+     * "CatalogService",
+     * "CompletionService",
+     * "ControlService",
+     * "MerchantCenterStreaming",
+     * "ModelService",
+     * "PredictionService",
+     * "ProductService",
+     * "ServingConfigService",
+     * "UserEventService",
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Supported service names:
+     * "CatalogService",
+     * "CompletionService",
+     * "ControlService",
+     * "MerchantCenterStreaming",
+     * "ModelService",
+     * "PredictionService",
+     * "ProductService",
+     * "ServingConfigService",
+     * "UserEventService",
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOG_GENERATION_RULE_FIELD_NUMBER = 3; + private com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule logGenerationRule_; + /** + * + * + *
+     * The log generation rule that applies to this service.
+     * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule log_generation_rule = 3; + * + * + * @return Whether the logGenerationRule field is set. + */ + @java.lang.Override + public boolean hasLogGenerationRule() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The log generation rule that applies to this service.
+     * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule log_generation_rule = 3; + * + * + * @return The logGenerationRule. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule getLogGenerationRule() { + return logGenerationRule_ == null + ? com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.getDefaultInstance() + : logGenerationRule_; + } + /** + * + * + *
+     * The log generation rule that applies to this service.
+     * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule log_generation_rule = 3; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRuleOrBuilder + getLogGenerationRuleOrBuilder() { + return logGenerationRule_ == null + ? com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.getDefaultInstance() + : logGenerationRule_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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.GeneratedMessageV3.isStringEmpty(serviceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getLogGenerationRule()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLogGenerationRule()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule other = + (com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (hasLogGenerationRule() != other.hasLogGenerationRule()) return false; + if (hasLogGenerationRule()) { + if (!getLogGenerationRule().equals(other.getLogGenerationRule())) 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) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + if (hasLogGenerationRule()) { + hash = (37 * hash) + LOG_GENERATION_RULE_FIELD_NUMBER; + hash = (53 * hash) + getLogGenerationRule().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The granular logging configurations for supported services.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule) + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_LoggingConfig_ServiceLogGenerationRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_LoggingConfig_ServiceLogGenerationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule.class, + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule.Builder + .class); + } + + // Construct using + // com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLogGenerationRuleFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + serviceName_ = ""; + logGenerationRule_ = null; + if (logGenerationRuleBuilder_ != null) { + logGenerationRuleBuilder_.dispose(); + logGenerationRuleBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_LoggingConfig_ServiceLogGenerationRule_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule build() { + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule buildPartial() { + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule result = + new com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serviceName_ = serviceName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.logGenerationRule_ = + logGenerationRuleBuilder_ == null + ? logGenerationRule_ + : logGenerationRuleBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule) { + return mergeFrom( + (com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule other) { + if (other + == com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule + .getDefaultInstance()) return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasLogGenerationRule()) { + mergeLogGenerationRule(other.getLogGenerationRule()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + serviceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + input.readMessage( + getLogGenerationRuleFieldBuilder().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 java.lang.Object serviceName_ = ""; + /** + * + * + *
+       * Required. Supported service names:
+       * "CatalogService",
+       * "CompletionService",
+       * "ControlService",
+       * "MerchantCenterStreaming",
+       * "ModelService",
+       * "PredictionService",
+       * "ProductService",
+       * "ServingConfigService",
+       * "UserEventService",
+       * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Supported service names:
+       * "CatalogService",
+       * "CompletionService",
+       * "ControlService",
+       * "MerchantCenterStreaming",
+       * "ModelService",
+       * "PredictionService",
+       * "ProductService",
+       * "ServingConfigService",
+       * "UserEventService",
+       * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Supported service names:
+       * "CatalogService",
+       * "CompletionService",
+       * "ControlService",
+       * "MerchantCenterStreaming",
+       * "ModelService",
+       * "PredictionService",
+       * "ProductService",
+       * "ServingConfigService",
+       * "UserEventService",
+       * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Supported service names:
+       * "CatalogService",
+       * "CompletionService",
+       * "ControlService",
+       * "MerchantCenterStreaming",
+       * "ModelService",
+       * "PredictionService",
+       * "ProductService",
+       * "ServingConfigService",
+       * "UserEventService",
+       * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + serviceName_ = getDefaultInstance().getServiceName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Supported service names:
+       * "CatalogService",
+       * "CompletionService",
+       * "ControlService",
+       * "MerchantCenterStreaming",
+       * "ModelService",
+       * "PredictionService",
+       * "ProductService",
+       * "ServingConfigService",
+       * "UserEventService",
+       * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule logGenerationRule_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule, + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.Builder, + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRuleOrBuilder> + logGenerationRuleBuilder_; + /** + * + * + *
+       * The log generation rule that applies to this service.
+       * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule log_generation_rule = 3; + * + * + * @return Whether the logGenerationRule field is set. + */ + public boolean hasLogGenerationRule() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * The log generation rule that applies to this service.
+       * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule log_generation_rule = 3; + * + * + * @return The logGenerationRule. + */ + public com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule + getLogGenerationRule() { + if (logGenerationRuleBuilder_ == null) { + return logGenerationRule_ == null + ? com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.getDefaultInstance() + : logGenerationRule_; + } else { + return logGenerationRuleBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The log generation rule that applies to this service.
+       * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule log_generation_rule = 3; + * + */ + public Builder setLogGenerationRule( + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule value) { + if (logGenerationRuleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + logGenerationRule_ = value; + } else { + logGenerationRuleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The log generation rule that applies to this service.
+       * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule log_generation_rule = 3; + * + */ + public Builder setLogGenerationRule( + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.Builder builderForValue) { + if (logGenerationRuleBuilder_ == null) { + logGenerationRule_ = builderForValue.build(); + } else { + logGenerationRuleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The log generation rule that applies to this service.
+       * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule log_generation_rule = 3; + * + */ + public Builder mergeLogGenerationRule( + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule value) { + if (logGenerationRuleBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && logGenerationRule_ != null + && logGenerationRule_ + != com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule + .getDefaultInstance()) { + getLogGenerationRuleBuilder().mergeFrom(value); + } else { + logGenerationRule_ = value; + } + } else { + logGenerationRuleBuilder_.mergeFrom(value); + } + if (logGenerationRule_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The log generation rule that applies to this service.
+       * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule log_generation_rule = 3; + * + */ + public Builder clearLogGenerationRule() { + bitField0_ = (bitField0_ & ~0x00000002); + logGenerationRule_ = null; + if (logGenerationRuleBuilder_ != null) { + logGenerationRuleBuilder_.dispose(); + logGenerationRuleBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The log generation rule that applies to this service.
+       * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule log_generation_rule = 3; + * + */ + public com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.Builder + getLogGenerationRuleBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getLogGenerationRuleFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The log generation rule that applies to this service.
+       * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule log_generation_rule = 3; + * + */ + public com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRuleOrBuilder + getLogGenerationRuleOrBuilder() { + if (logGenerationRuleBuilder_ != null) { + return logGenerationRuleBuilder_.getMessageOrBuilder(); + } else { + return logGenerationRule_ == null + ? com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.getDefaultInstance() + : logGenerationRule_; + } + } + /** + * + * + *
+       * The log generation rule that applies to this service.
+       * 
+ * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule log_generation_rule = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule, + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.Builder, + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRuleOrBuilder> + getLogGenerationRuleFieldBuilder() { + if (logGenerationRuleBuilder_ == null) { + logGenerationRuleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule, + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.Builder, + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRuleOrBuilder>( + getLogGenerationRule(), getParentForChildren(), isClean()); + logGenerationRule_ = null; + } + return logGenerationRuleBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule) + private static final com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule(); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServiceLogGenerationRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Immutable. The name of the LoggingConfig singleton resource.
+   * Format: projects/*/loggingConfig
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Immutable. The name of the LoggingConfig singleton resource.
+   * Format: projects/*/loggingConfig
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_LOG_GENERATION_RULE_FIELD_NUMBER = 2; + private com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule defaultLogGenerationRule_; + /** + * + * + *
+   * The log generation rule that applies by default to all services
+   * supporting log generation. It can be overridden by
+   * [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule]
+   * for service level control.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule default_log_generation_rule = 2; + * + * + * @return Whether the defaultLogGenerationRule field is set. + */ + @java.lang.Override + public boolean hasDefaultLogGenerationRule() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The log generation rule that applies by default to all services
+   * supporting log generation. It can be overridden by
+   * [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule]
+   * for service level control.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule default_log_generation_rule = 2; + * + * + * @return The defaultLogGenerationRule. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule + getDefaultLogGenerationRule() { + return defaultLogGenerationRule_ == null + ? com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.getDefaultInstance() + : defaultLogGenerationRule_; + } + /** + * + * + *
+   * The log generation rule that applies by default to all services
+   * supporting log generation. It can be overridden by
+   * [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule]
+   * for service level control.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule default_log_generation_rule = 2; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRuleOrBuilder + getDefaultLogGenerationRuleOrBuilder() { + return defaultLogGenerationRule_ == null + ? com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.getDefaultInstance() + : defaultLogGenerationRule_; + } + + public static final int SERVICE_LOG_GENERATION_RULES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List + serviceLogGenerationRules_; + /** + * + * + *
+   * Controls logging configurations more granularly for each supported
+   * service.
+   *
+   * This overrides the
+   * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * for the services specified. For those not mentioned, they will fallback to
+   * the default log generation rule.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + @java.lang.Override + public java.util.List + getServiceLogGenerationRulesList() { + return serviceLogGenerationRules_; + } + /** + * + * + *
+   * Controls logging configurations more granularly for each supported
+   * service.
+   *
+   * This overrides the
+   * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * for the services specified. For those not mentioned, they will fallback to
+   * the default log generation rule.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRuleOrBuilder> + getServiceLogGenerationRulesOrBuilderList() { + return serviceLogGenerationRules_; + } + /** + * + * + *
+   * Controls logging configurations more granularly for each supported
+   * service.
+   *
+   * This overrides the
+   * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * for the services specified. For those not mentioned, they will fallback to
+   * the default log generation rule.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + @java.lang.Override + public int getServiceLogGenerationRulesCount() { + return serviceLogGenerationRules_.size(); + } + /** + * + * + *
+   * Controls logging configurations more granularly for each supported
+   * service.
+   *
+   * This overrides the
+   * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * for the services specified. For those not mentioned, they will fallback to
+   * the default log generation rule.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule + getServiceLogGenerationRules(int index) { + return serviceLogGenerationRules_.get(index); + } + /** + * + * + *
+   * Controls logging configurations more granularly for each supported
+   * service.
+   *
+   * This overrides the
+   * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * for the services specified. For those not mentioned, they will fallback to
+   * the default log generation rule.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRuleOrBuilder + getServiceLogGenerationRulesOrBuilder(int index) { + return serviceLogGenerationRules_.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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getDefaultLogGenerationRule()); + } + for (int i = 0; i < serviceLogGenerationRules_.size(); i++) { + output.writeMessage(4, serviceLogGenerationRules_.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getDefaultLogGenerationRule()); + } + for (int i = 0; i < serviceLogGenerationRules_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, serviceLogGenerationRules_.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.retail.v2alpha.LoggingConfig)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.LoggingConfig other = + (com.google.cloud.retail.v2alpha.LoggingConfig) obj; + + if (!getName().equals(other.getName())) return false; + if (hasDefaultLogGenerationRule() != other.hasDefaultLogGenerationRule()) return false; + if (hasDefaultLogGenerationRule()) { + if (!getDefaultLogGenerationRule().equals(other.getDefaultLogGenerationRule())) return false; + } + if (!getServiceLogGenerationRulesList().equals(other.getServiceLogGenerationRulesList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasDefaultLogGenerationRule()) { + hash = (37 * hash) + DEFAULT_LOG_GENERATION_RULE_FIELD_NUMBER; + hash = (53 * hash) + getDefaultLogGenerationRule().hashCode(); + } + if (getServiceLogGenerationRulesCount() > 0) { + hash = (37 * hash) + SERVICE_LOG_GENERATION_RULES_FIELD_NUMBER; + hash = (53 * hash) + getServiceLogGenerationRulesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.LoggingConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Project level logging config to control what level of log will be generated
+   * and written to Cloud Logging.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.LoggingConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.LoggingConfig) + com.google.cloud.retail.v2alpha.LoggingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_LoggingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_LoggingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.LoggingConfig.class, + com.google.cloud.retail.v2alpha.LoggingConfig.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.LoggingConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDefaultLogGenerationRuleFieldBuilder(); + getServiceLogGenerationRulesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + defaultLogGenerationRule_ = null; + if (defaultLogGenerationRuleBuilder_ != null) { + defaultLogGenerationRuleBuilder_.dispose(); + defaultLogGenerationRuleBuilder_ = null; + } + if (serviceLogGenerationRulesBuilder_ == null) { + serviceLogGenerationRules_ = java.util.Collections.emptyList(); + } else { + serviceLogGenerationRules_ = null; + serviceLogGenerationRulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_LoggingConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.LoggingConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig build() { + com.google.cloud.retail.v2alpha.LoggingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig buildPartial() { + com.google.cloud.retail.v2alpha.LoggingConfig result = + new com.google.cloud.retail.v2alpha.LoggingConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.retail.v2alpha.LoggingConfig result) { + if (serviceLogGenerationRulesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + serviceLogGenerationRules_ = + java.util.Collections.unmodifiableList(serviceLogGenerationRules_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.serviceLogGenerationRules_ = serviceLogGenerationRules_; + } else { + result.serviceLogGenerationRules_ = serviceLogGenerationRulesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.LoggingConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.defaultLogGenerationRule_ = + defaultLogGenerationRuleBuilder_ == null + ? defaultLogGenerationRule_ + : defaultLogGenerationRuleBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.LoggingConfig) { + return mergeFrom((com.google.cloud.retail.v2alpha.LoggingConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.LoggingConfig other) { + if (other == com.google.cloud.retail.v2alpha.LoggingConfig.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDefaultLogGenerationRule()) { + mergeDefaultLogGenerationRule(other.getDefaultLogGenerationRule()); + } + if (serviceLogGenerationRulesBuilder_ == null) { + if (!other.serviceLogGenerationRules_.isEmpty()) { + if (serviceLogGenerationRules_.isEmpty()) { + serviceLogGenerationRules_ = other.serviceLogGenerationRules_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureServiceLogGenerationRulesIsMutable(); + serviceLogGenerationRules_.addAll(other.serviceLogGenerationRules_); + } + onChanged(); + } + } else { + if (!other.serviceLogGenerationRules_.isEmpty()) { + if (serviceLogGenerationRulesBuilder_.isEmpty()) { + serviceLogGenerationRulesBuilder_.dispose(); + serviceLogGenerationRulesBuilder_ = null; + serviceLogGenerationRules_ = other.serviceLogGenerationRules_; + bitField0_ = (bitField0_ & ~0x00000004); + serviceLogGenerationRulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getServiceLogGenerationRulesFieldBuilder() + : null; + } else { + serviceLogGenerationRulesBuilder_.addAllMessages(other.serviceLogGenerationRules_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getDefaultLogGenerationRuleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule m = + input.readMessage( + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule + .parser(), + extensionRegistry); + if (serviceLogGenerationRulesBuilder_ == null) { + ensureServiceLogGenerationRulesIsMutable(); + serviceLogGenerationRules_.add(m); + } else { + serviceLogGenerationRulesBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Immutable. The name of the LoggingConfig singleton resource.
+     * Format: projects/*/loggingConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Immutable. The name of the LoggingConfig singleton resource.
+     * Format: projects/*/loggingConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Immutable. The name of the LoggingConfig singleton resource.
+     * Format: projects/*/loggingConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The name of the LoggingConfig singleton resource.
+     * Format: projects/*/loggingConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The name of the LoggingConfig singleton resource.
+     * Format: projects/*/loggingConfig
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule + defaultLogGenerationRule_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule, + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.Builder, + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRuleOrBuilder> + defaultLogGenerationRuleBuilder_; + /** + * + * + *
+     * The log generation rule that applies by default to all services
+     * supporting log generation. It can be overridden by
+     * [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule]
+     * for service level control.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule default_log_generation_rule = 2; + * + * + * @return Whether the defaultLogGenerationRule field is set. + */ + public boolean hasDefaultLogGenerationRule() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The log generation rule that applies by default to all services
+     * supporting log generation. It can be overridden by
+     * [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule]
+     * for service level control.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule default_log_generation_rule = 2; + * + * + * @return The defaultLogGenerationRule. + */ + public com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule + getDefaultLogGenerationRule() { + if (defaultLogGenerationRuleBuilder_ == null) { + return defaultLogGenerationRule_ == null + ? com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.getDefaultInstance() + : defaultLogGenerationRule_; + } else { + return defaultLogGenerationRuleBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The log generation rule that applies by default to all services
+     * supporting log generation. It can be overridden by
+     * [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule]
+     * for service level control.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule default_log_generation_rule = 2; + * + */ + public Builder setDefaultLogGenerationRule( + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule value) { + if (defaultLogGenerationRuleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + defaultLogGenerationRule_ = value; + } else { + defaultLogGenerationRuleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The log generation rule that applies by default to all services
+     * supporting log generation. It can be overridden by
+     * [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule]
+     * for service level control.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule default_log_generation_rule = 2; + * + */ + public Builder setDefaultLogGenerationRule( + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.Builder builderForValue) { + if (defaultLogGenerationRuleBuilder_ == null) { + defaultLogGenerationRule_ = builderForValue.build(); + } else { + defaultLogGenerationRuleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The log generation rule that applies by default to all services
+     * supporting log generation. It can be overridden by
+     * [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule]
+     * for service level control.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule default_log_generation_rule = 2; + * + */ + public Builder mergeDefaultLogGenerationRule( + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule value) { + if (defaultLogGenerationRuleBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && defaultLogGenerationRule_ != null + && defaultLogGenerationRule_ + != com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule + .getDefaultInstance()) { + getDefaultLogGenerationRuleBuilder().mergeFrom(value); + } else { + defaultLogGenerationRule_ = value; + } + } else { + defaultLogGenerationRuleBuilder_.mergeFrom(value); + } + if (defaultLogGenerationRule_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The log generation rule that applies by default to all services
+     * supporting log generation. It can be overridden by
+     * [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule]
+     * for service level control.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule default_log_generation_rule = 2; + * + */ + public Builder clearDefaultLogGenerationRule() { + bitField0_ = (bitField0_ & ~0x00000002); + defaultLogGenerationRule_ = null; + if (defaultLogGenerationRuleBuilder_ != null) { + defaultLogGenerationRuleBuilder_.dispose(); + defaultLogGenerationRuleBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The log generation rule that applies by default to all services
+     * supporting log generation. It can be overridden by
+     * [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule]
+     * for service level control.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule default_log_generation_rule = 2; + * + */ + public com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.Builder + getDefaultLogGenerationRuleBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDefaultLogGenerationRuleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The log generation rule that applies by default to all services
+     * supporting log generation. It can be overridden by
+     * [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule]
+     * for service level control.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule default_log_generation_rule = 2; + * + */ + public com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRuleOrBuilder + getDefaultLogGenerationRuleOrBuilder() { + if (defaultLogGenerationRuleBuilder_ != null) { + return defaultLogGenerationRuleBuilder_.getMessageOrBuilder(); + } else { + return defaultLogGenerationRule_ == null + ? com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.getDefaultInstance() + : defaultLogGenerationRule_; + } + } + /** + * + * + *
+     * The log generation rule that applies by default to all services
+     * supporting log generation. It can be overridden by
+     * [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule]
+     * for service level control.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule default_log_generation_rule = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule, + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.Builder, + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRuleOrBuilder> + getDefaultLogGenerationRuleFieldBuilder() { + if (defaultLogGenerationRuleBuilder_ == null) { + defaultLogGenerationRuleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule, + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.Builder, + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRuleOrBuilder>( + getDefaultLogGenerationRule(), getParentForChildren(), isClean()); + defaultLogGenerationRule_ = null; + } + return defaultLogGenerationRuleBuilder_; + } + + private java.util.List + serviceLogGenerationRules_ = java.util.Collections.emptyList(); + + private void ensureServiceLogGenerationRulesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + serviceLogGenerationRules_ = + new java.util.ArrayList< + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule>( + serviceLogGenerationRules_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule, + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule.Builder, + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRuleOrBuilder> + serviceLogGenerationRulesBuilder_; + + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public java.util.List + getServiceLogGenerationRulesList() { + if (serviceLogGenerationRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceLogGenerationRules_); + } else { + return serviceLogGenerationRulesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public int getServiceLogGenerationRulesCount() { + if (serviceLogGenerationRulesBuilder_ == null) { + return serviceLogGenerationRules_.size(); + } else { + return serviceLogGenerationRulesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule + getServiceLogGenerationRules(int index) { + if (serviceLogGenerationRulesBuilder_ == null) { + return serviceLogGenerationRules_.get(index); + } else { + return serviceLogGenerationRulesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public Builder setServiceLogGenerationRules( + int index, com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule value) { + if (serviceLogGenerationRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceLogGenerationRulesIsMutable(); + serviceLogGenerationRules_.set(index, value); + onChanged(); + } else { + serviceLogGenerationRulesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public Builder setServiceLogGenerationRules( + int index, + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule.Builder + builderForValue) { + if (serviceLogGenerationRulesBuilder_ == null) { + ensureServiceLogGenerationRulesIsMutable(); + serviceLogGenerationRules_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceLogGenerationRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public Builder addServiceLogGenerationRules( + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule value) { + if (serviceLogGenerationRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceLogGenerationRulesIsMutable(); + serviceLogGenerationRules_.add(value); + onChanged(); + } else { + serviceLogGenerationRulesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public Builder addServiceLogGenerationRules( + int index, com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule value) { + if (serviceLogGenerationRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceLogGenerationRulesIsMutable(); + serviceLogGenerationRules_.add(index, value); + onChanged(); + } else { + serviceLogGenerationRulesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public Builder addServiceLogGenerationRules( + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule.Builder + builderForValue) { + if (serviceLogGenerationRulesBuilder_ == null) { + ensureServiceLogGenerationRulesIsMutable(); + serviceLogGenerationRules_.add(builderForValue.build()); + onChanged(); + } else { + serviceLogGenerationRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public Builder addServiceLogGenerationRules( + int index, + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule.Builder + builderForValue) { + if (serviceLogGenerationRulesBuilder_ == null) { + ensureServiceLogGenerationRulesIsMutable(); + serviceLogGenerationRules_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceLogGenerationRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public Builder addAllServiceLogGenerationRules( + java.lang.Iterable< + ? extends com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule> + values) { + if (serviceLogGenerationRulesBuilder_ == null) { + ensureServiceLogGenerationRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceLogGenerationRules_); + onChanged(); + } else { + serviceLogGenerationRulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public Builder clearServiceLogGenerationRules() { + if (serviceLogGenerationRulesBuilder_ == null) { + serviceLogGenerationRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + serviceLogGenerationRulesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public Builder removeServiceLogGenerationRules(int index) { + if (serviceLogGenerationRulesBuilder_ == null) { + ensureServiceLogGenerationRulesIsMutable(); + serviceLogGenerationRules_.remove(index); + onChanged(); + } else { + serviceLogGenerationRulesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule.Builder + getServiceLogGenerationRulesBuilder(int index) { + return getServiceLogGenerationRulesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRuleOrBuilder + getServiceLogGenerationRulesOrBuilder(int index) { + if (serviceLogGenerationRulesBuilder_ == null) { + return serviceLogGenerationRules_.get(index); + } else { + return serviceLogGenerationRulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRuleOrBuilder> + getServiceLogGenerationRulesOrBuilderList() { + if (serviceLogGenerationRulesBuilder_ != null) { + return serviceLogGenerationRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceLogGenerationRules_); + } + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule.Builder + addServiceLogGenerationRulesBuilder() { + return getServiceLogGenerationRulesFieldBuilder() + .addBuilder( + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule + .getDefaultInstance()); + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule.Builder + addServiceLogGenerationRulesBuilder(int index) { + return getServiceLogGenerationRulesFieldBuilder() + .addBuilder( + index, + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule + .getDefaultInstance()); + } + /** + * + * + *
+     * Controls logging configurations more granularly for each supported
+     * service.
+     *
+     * This overrides the
+     * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * for the services specified. For those not mentioned, they will fallback to
+     * the default log generation rule.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + public java.util.List< + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule.Builder> + getServiceLogGenerationRulesBuilderList() { + return getServiceLogGenerationRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule, + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule.Builder, + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRuleOrBuilder> + getServiceLogGenerationRulesFieldBuilder() { + if (serviceLogGenerationRulesBuilder_ == null) { + serviceLogGenerationRulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule, + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule.Builder, + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRuleOrBuilder>( + serviceLogGenerationRules_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + serviceLogGenerationRules_ = null; + } + return serviceLogGenerationRulesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.LoggingConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.LoggingConfig) + private static final com.google.cloud.retail.v2alpha.LoggingConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.LoggingConfig(); + } + + public static com.google.cloud.retail.v2alpha.LoggingConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LoggingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.LoggingConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/LoggingConfigName.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/LoggingConfigName.java new file mode 100644 index 000000000000..4c9b68e91279 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/LoggingConfigName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +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 LoggingConfigName implements ResourceName { + private static final PathTemplate PROJECT = + PathTemplate.createWithoutUrlEncoding("projects/{project}/loggingConfig"); + private volatile Map fieldValuesMap; + private final String project; + + @Deprecated + protected LoggingConfigName() { + project = null; + } + + private LoggingConfigName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LoggingConfigName of(String project) { + return newBuilder().setProject(project).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + public static LoggingConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT.validatedMatch( + formattedString, "LoggingConfigName.parse: formattedString not in valid format"); + return of(matchMap.get("project")); + } + + 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 (LoggingConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT.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); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT.instantiate("project", project); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LoggingConfigName that = ((LoggingConfigName) o); + return Objects.equals(this.project, that.project); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** Builder for projects/{project}/loggingConfig. */ + public static class Builder { + private String project; + + protected Builder() {} + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder(LoggingConfigName loggingConfigName) { + this.project = loggingConfigName.project; + } + + public LoggingConfigName build() { + return new LoggingConfigName(this); + } + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/LoggingConfigOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/LoggingConfigOrBuilder.java new file mode 100644 index 000000000000..afeb8bc1f0e3 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/LoggingConfigOrBuilder.java @@ -0,0 +1,204 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface LoggingConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.LoggingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Immutable. The name of the LoggingConfig singleton resource.
+   * Format: projects/*/loggingConfig
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Immutable. The name of the LoggingConfig singleton resource.
+   * Format: projects/*/loggingConfig
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The log generation rule that applies by default to all services
+   * supporting log generation. It can be overridden by
+   * [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule]
+   * for service level control.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule default_log_generation_rule = 2; + * + * + * @return Whether the defaultLogGenerationRule field is set. + */ + boolean hasDefaultLogGenerationRule(); + /** + * + * + *
+   * The log generation rule that applies by default to all services
+   * supporting log generation. It can be overridden by
+   * [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule]
+   * for service level control.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule default_log_generation_rule = 2; + * + * + * @return The defaultLogGenerationRule. + */ + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule getDefaultLogGenerationRule(); + /** + * + * + *
+   * The log generation rule that applies by default to all services
+   * supporting log generation. It can be overridden by
+   * [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule]
+   * for service level control.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule default_log_generation_rule = 2; + * + */ + com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRuleOrBuilder + getDefaultLogGenerationRuleOrBuilder(); + + /** + * + * + *
+   * Controls logging configurations more granularly for each supported
+   * service.
+   *
+   * This overrides the
+   * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * for the services specified. For those not mentioned, they will fallback to
+   * the default log generation rule.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + java.util.List + getServiceLogGenerationRulesList(); + /** + * + * + *
+   * Controls logging configurations more granularly for each supported
+   * service.
+   *
+   * This overrides the
+   * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * for the services specified. For those not mentioned, they will fallback to
+   * the default log generation rule.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule + getServiceLogGenerationRules(int index); + /** + * + * + *
+   * Controls logging configurations more granularly for each supported
+   * service.
+   *
+   * This overrides the
+   * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * for the services specified. For those not mentioned, they will fallback to
+   * the default log generation rule.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + int getServiceLogGenerationRulesCount(); + /** + * + * + *
+   * Controls logging configurations more granularly for each supported
+   * service.
+   *
+   * This overrides the
+   * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * for the services specified. For those not mentioned, they will fallback to
+   * the default log generation rule.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + java.util.List< + ? extends com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRuleOrBuilder> + getServiceLogGenerationRulesOrBuilderList(); + /** + * + * + *
+   * Controls logging configurations more granularly for each supported
+   * service.
+   *
+   * This overrides the
+   * [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * for the services specified. For those not mentioned, they will fallback to
+   * the default log generation rule.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule service_log_generation_rules = 4; + * + */ + com.google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRuleOrBuilder + getServiceLogGenerationRulesOrBuilder(int index); +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLink.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLink.java index ecfd4fb3e4b0..679362ac7bc6 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLink.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLink.java @@ -24,8 +24,8 @@ * *
  * Represents a link between a Merchant Center account and a branch.
- * Once a link is established, products from the linked merchant center account
- * will be streamed to the linked branch.
+ * After a link is established, products from the linked Merchant Center account
+ * are streamed to the linked branch.
  * 
* * Protobuf type {@code google.cloud.retail.v2alpha.MerchantCenterAccountLink} @@ -49,6 +49,7 @@ private MerchantCenterAccountLink() { feedFilters_ = java.util.Collections.emptyList(); state_ = 0; projectId_ = ""; + source_ = ""; } @java.lang.Override @@ -1201,12 +1202,12 @@ public long getMerchantCenterAccountId() { * * *
-   * Required. The branch id (e.g. 0/1/2) within the catalog that products from
+   * Required. The branch ID (e.g. 0/1/2) within the catalog that products from
    * merchant_center_account_id are streamed to. When updating this field, an
    * empty value will use the currently configured default branch. However,
    * changing the default branch later on won't change the linked branch here.
    *
-   * A single branch id can only have one linked merchant center account id.
+   * A single branch ID can only have one linked Merchant Center account ID.
    * 
* * string branch_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1229,12 +1230,12 @@ public java.lang.String getBranchId() { * * *
-   * Required. The branch id (e.g. 0/1/2) within the catalog that products from
+   * Required. The branch ID (e.g. 0/1/2) within the catalog that products from
    * merchant_center_account_id are streamed to. When updating this field, an
    * empty value will use the currently configured default branch. However,
    * changing the default branch later on won't change the linked branch here.
    *
-   * A single branch id can only have one linked merchant center account id.
+   * A single branch ID can only have one linked Merchant Center account ID.
    * 
* * string branch_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1529,7 +1530,7 @@ public com.google.cloud.retail.v2alpha.MerchantCenterAccountLink.State getState( * * *
-   * Output only. GCP project ID.
+   * Output only. Google Cloud project ID.
    * 
* * string project_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1552,7 +1553,7 @@ public java.lang.String getProjectId() { * * *
-   * Output only. GCP project ID.
+   * Output only. Google Cloud project ID.
    * 
* * string project_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1572,6 +1573,59 @@ public com.google.protobuf.ByteString getProjectIdBytes() { } } + public static final int SOURCE_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object source_ = ""; + /** + * + * + *
+   * Optional. An optional arbitrary string that could be used as a tag for
+   * tracking link source.
+   * 
+ * + * string source = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional arbitrary string that could be used as a tag for
+   * tracking link source.
+   * 
+ * + * string source = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1615,6 +1669,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, projectId_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, source_); + } getUnknownFields().writeTo(output); } @@ -1653,6 +1710,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, projectId_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, source_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1678,6 +1738,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFeedFiltersList().equals(other.getFeedFiltersList())) return false; if (state_ != other.state_) return false; if (!getProjectId().equals(other.getProjectId())) return false; + if (!getSource().equals(other.getSource())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1709,6 +1770,8 @@ public int hashCode() { hash = (53 * hash) + state_; hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1815,8 +1878,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * Represents a link between a Merchant Center account and a branch.
-   * Once a link is established, products from the linked merchant center account
-   * will be streamed to the linked branch.
+   * After a link is established, products from the linked Merchant Center account
+   * are streamed to the linked branch.
    * 
* * Protobuf type {@code google.cloud.retail.v2alpha.MerchantCenterAccountLink} @@ -1866,6 +1929,7 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000040); state_ = 0; projectId_ = ""; + source_ = ""; return this; } @@ -1940,6 +2004,9 @@ private void buildPartial0(com.google.cloud.retail.v2alpha.MerchantCenterAccount if (((from_bitField0_ & 0x00000100) != 0)) { result.projectId_ = projectId_; } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.source_ = source_; + } } @java.lang.Override @@ -2051,6 +2118,11 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.MerchantCenterAccountLi bitField0_ |= 0x00000100; onChanged(); } + if (!other.getSource().isEmpty()) { + source_ = other.source_; + bitField0_ |= 0x00000200; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2141,6 +2213,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000100; break; } // case 74 + case 82: + { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2496,12 +2574,12 @@ public Builder clearMerchantCenterAccountId() { * * *
-     * Required. The branch id (e.g. 0/1/2) within the catalog that products from
+     * Required. The branch ID (e.g. 0/1/2) within the catalog that products from
      * merchant_center_account_id are streamed to. When updating this field, an
      * empty value will use the currently configured default branch. However,
      * changing the default branch later on won't change the linked branch here.
      *
-     * A single branch id can only have one linked merchant center account id.
+     * A single branch ID can only have one linked Merchant Center account ID.
      * 
* * string branch_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -2523,12 +2601,12 @@ public java.lang.String getBranchId() { * * *
-     * Required. The branch id (e.g. 0/1/2) within the catalog that products from
+     * Required. The branch ID (e.g. 0/1/2) within the catalog that products from
      * merchant_center_account_id are streamed to. When updating this field, an
      * empty value will use the currently configured default branch. However,
      * changing the default branch later on won't change the linked branch here.
      *
-     * A single branch id can only have one linked merchant center account id.
+     * A single branch ID can only have one linked Merchant Center account ID.
      * 
* * string branch_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -2550,12 +2628,12 @@ public com.google.protobuf.ByteString getBranchIdBytes() { * * *
-     * Required. The branch id (e.g. 0/1/2) within the catalog that products from
+     * Required. The branch ID (e.g. 0/1/2) within the catalog that products from
      * merchant_center_account_id are streamed to. When updating this field, an
      * empty value will use the currently configured default branch. However,
      * changing the default branch later on won't change the linked branch here.
      *
-     * A single branch id can only have one linked merchant center account id.
+     * A single branch ID can only have one linked Merchant Center account ID.
      * 
* * string branch_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -2576,12 +2654,12 @@ public Builder setBranchId(java.lang.String value) { * * *
-     * Required. The branch id (e.g. 0/1/2) within the catalog that products from
+     * Required. The branch ID (e.g. 0/1/2) within the catalog that products from
      * merchant_center_account_id are streamed to. When updating this field, an
      * empty value will use the currently configured default branch. However,
      * changing the default branch later on won't change the linked branch here.
      *
-     * A single branch id can only have one linked merchant center account id.
+     * A single branch ID can only have one linked Merchant Center account ID.
      * 
* * string branch_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -2598,12 +2676,12 @@ public Builder clearBranchId() { * * *
-     * Required. The branch id (e.g. 0/1/2) within the catalog that products from
+     * Required. The branch ID (e.g. 0/1/2) within the catalog that products from
      * merchant_center_account_id are streamed to. When updating this field, an
      * empty value will use the currently configured default branch. However,
      * changing the default branch later on won't change the linked branch here.
      *
-     * A single branch id can only have one linked merchant center account id.
+     * A single branch ID can only have one linked Merchant Center account ID.
      * 
* * string branch_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -3468,7 +3546,7 @@ public Builder clearState() { * * *
-     * Output only. GCP project ID.
+     * Output only. Google Cloud project ID.
      * 
* * string project_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -3490,7 +3568,7 @@ public java.lang.String getProjectId() { * * *
-     * Output only. GCP project ID.
+     * Output only. Google Cloud project ID.
      * 
* * string project_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -3512,7 +3590,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * * *
-     * Output only. GCP project ID.
+     * Output only. Google Cloud project ID.
      * 
* * string project_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -3533,7 +3611,7 @@ public Builder setProjectId(java.lang.String value) { * * *
-     * Output only. GCP project ID.
+     * Output only. Google Cloud project ID.
      * 
* * string project_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -3550,7 +3628,7 @@ public Builder clearProjectId() { * * *
-     * Output only. GCP project ID.
+     * Output only. Google Cloud project ID.
      * 
* * string project_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -3569,6 +3647,117 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object source_ = ""; + /** + * + * + *
+     * Optional. An optional arbitrary string that could be used as a tag for
+     * tracking link source.
+     * 
+ * + * string source = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional arbitrary string that could be used as a tag for
+     * tracking link source.
+     * 
+ * + * string source = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional arbitrary string that could be used as a tag for
+     * tracking link source.
+     * 
+ * + * string source = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional arbitrary string that could be used as a tag for
+     * tracking link source.
+     * 
+ * + * string source = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSource() { + source_ = getDefaultInstance().getSource(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional arbitrary string that could be used as a tag for
+     * tracking link source.
+     * 
+ * + * string source = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + source_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkOrBuilder.java index 906f71814f40..bfb4d0cbb171 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkOrBuilder.java @@ -117,12 +117,12 @@ public interface MerchantCenterAccountLinkOrBuilder * * *
-   * Required. The branch id (e.g. 0/1/2) within the catalog that products from
+   * Required. The branch ID (e.g. 0/1/2) within the catalog that products from
    * merchant_center_account_id are streamed to. When updating this field, an
    * empty value will use the currently configured default branch. However,
    * changing the default branch later on won't change the linked branch here.
    *
-   * A single branch id can only have one linked merchant center account id.
+   * A single branch ID can only have one linked Merchant Center account ID.
    * 
* * string branch_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -134,12 +134,12 @@ public interface MerchantCenterAccountLinkOrBuilder * * *
-   * Required. The branch id (e.g. 0/1/2) within the catalog that products from
+   * Required. The branch ID (e.g. 0/1/2) within the catalog that products from
    * merchant_center_account_id are streamed to. When updating this field, an
    * empty value will use the currently configured default branch. However,
    * changing the default branch later on won't change the linked branch here.
    *
-   * A single branch id can only have one linked merchant center account id.
+   * A single branch ID can only have one linked Merchant Center account ID.
    * 
* * string branch_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -333,7 +333,7 @@ com.google.cloud.retail.v2alpha.MerchantCenterAccountLink.MerchantCenterFeedFilt * * *
-   * Output only. GCP project ID.
+   * Output only. Google Cloud project ID.
    * 
* * string project_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -345,7 +345,7 @@ com.google.cloud.retail.v2alpha.MerchantCenterAccountLink.MerchantCenterFeedFilt * * *
-   * Output only. GCP project ID.
+   * Output only. Google Cloud project ID.
    * 
* * string project_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -353,4 +353,31 @@ com.google.cloud.retail.v2alpha.MerchantCenterAccountLink.MerchantCenterFeedFilt * @return The bytes for projectId. */ com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Optional. An optional arbitrary string that could be used as a tag for
+   * tracking link source.
+   * 
+ * + * string source = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The source. + */ + java.lang.String getSource(); + /** + * + * + *
+   * Optional. An optional arbitrary string that could be used as a tag for
+   * tracking link source.
+   * 
+ * + * string source = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); } diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkProto.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkProto.java index 8ae9e363302c..6c78ba544f13 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkProto.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkProto.java @@ -53,7 +53,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "enter_account_link.proto\022\033google.cloud.r" + "etail.v2alpha\032\037google/api/field_behavior" + ".proto\032\031google/api/resource.proto\032\037googl" - + "e/protobuf/timestamp.proto\"\306\005\n\031MerchantC" + + "e/protobuf/timestamp.proto\"\333\005\n\031MerchantC" + "enterAccountLink\022\024\n\004name\030\001 \001(\tB\006\340A\005\340A\003\022\022" + "\n\002id\030\010 \001(\tB\006\340A\005\340A\003\022\'\n\032merchant_center_ac" + "count_id\030\002 \001(\003B\003\340A\002\022\026\n\tbranch_id\030\003 \001(\tB\003" @@ -63,24 +63,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "Link.MerchantCenterFeedFilter\022P\n\005state\030\007" + " \001(\0162<.google.cloud.retail.v2alpha.Merch" + "antCenterAccountLink.StateB\003\340A\003\022\027\n\nproje" - + "ct_id\030\t \001(\tB\003\340A\003\032N\n\030MerchantCenterFeedFi" - + "lter\022\027\n\017primary_feed_id\030\001 \001(\003\022\031\n\021primary" - + "_feed_name\030\002 \001(\t\"C\n\005State\022\025\n\021STATE_UNSPE" - + "CIFIED\020\000\022\013\n\007PENDING\020\001\022\n\n\006ACTIVE\020\002\022\n\n\006FAI" - + "LED\020\003:\253\001\352A\247\001\n/retail.googleapis.com/Merc" - + "hantCenterAccountLink\022tprojects/{project" - + "}/locations/{location}/catalogs/{catalog" - + "}/merchantCenterAccountLinks/{merchant_c" - + "enter_account_link}\"\213\001\n\'CreateMerchantCe" - + "nterAccountLinkMetadata\022/\n\013create_time\030\001" - + " \001(\0132\032.google.protobuf.Timestamp\022/\n\013upda" - + "te_time\030\002 \001(\0132\032.google.protobuf.Timestam" - + "pB\342\001\n\037com.google.cloud.retail.v2alphaB\036M" - + "erchantCenterAccountLinkProtoP\001Z7cloud.g" - + "oogle.com/go/retail/apiv2alpha/retailpb;" - + "retailpb\242\002\006RETAIL\252\002\033Google.Cloud.Retail." - + "V2Alpha\312\002\033Google\\Cloud\\Retail\\V2alpha\352\002\036" - + "Google::Cloud::Retail::V2alphab\006proto3" + + "ct_id\030\t \001(\tB\003\340A\003\022\023\n\006source\030\n \001(\tB\003\340A\001\032N\n" + + "\030MerchantCenterFeedFilter\022\027\n\017primary_fee" + + "d_id\030\001 \001(\003\022\031\n\021primary_feed_name\030\002 \001(\t\"C\n" + + "\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007PENDING" + + "\020\001\022\n\n\006ACTIVE\020\002\022\n\n\006FAILED\020\003:\253\001\352A\247\001\n/retai" + + "l.googleapis.com/MerchantCenterAccountLi" + + "nk\022tprojects/{project}/locations/{locati" + + "on}/catalogs/{catalog}/merchantCenterAcc" + + "ountLinks/{merchant_center_account_link}" + + "\"\213\001\n\'CreateMerchantCenterAccountLinkMeta" + + "data\022/\n\013create_time\030\001 \001(\0132\032.google.proto" + + "buf.Timestamp\022/\n\013update_time\030\002 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\342\001\n\037com.google.cl" + + "oud.retail.v2alphaB\036MerchantCenterAccoun" + + "tLinkProtoP\001Z7cloud.google.com/go/retail" + + "/apiv2alpha/retailpb;retailpb\242\002\006RETAIL\252\002" + + "\033Google.Cloud.Retail.V2Alpha\312\002\033Google\\Cl" + + "oud\\Retail\\V2alpha\352\002\036Google::Cloud::Reta" + + "il::V2alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -105,6 +106,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FeedFilters", "State", "ProjectId", + "Source", }); internal_static_google_cloud_retail_v2alpha_MerchantCenterAccountLink_MerchantCenterFeedFilter_descriptor = internal_static_google_cloud_retail_v2alpha_MerchantCenterAccountLink_descriptor diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLink.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLink.java index d39796cdc426..927ad445315a 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLink.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLink.java @@ -24,8 +24,8 @@ * *
  * Represents a link between a Merchant Center account and a branch.
- * Once a link is established, products from the linked merchant center account
- * will be streamed to the linked branch.
+ * After a link is established, products from the linked Merchant Center account
+ * are streamed to the linked branch.
  * 
* * Protobuf type {@code google.cloud.retail.v2alpha.MerchantCenterLink} @@ -75,7 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The linked [Merchant center account
+   * Required. The linked [Merchant Center account
    * ID](https://developers.google.com/shopping-content/guides/accountstatuses).
    * The account must be a standalone account or a sub-account of a MCA.
    * 
@@ -102,7 +102,7 @@ public long getMerchantCenterAccountId() { * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; @@ -130,7 +130,7 @@ public java.lang.String getBranchId() { * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; @@ -666,8 +666,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * Represents a link between a Merchant Center account and a branch.
-   * Once a link is established, products from the linked merchant center account
-   * will be streamed to the linked branch.
+   * After a link is established, products from the linked Merchant Center account
+   * are streamed to the linked branch.
    * 
* * Protobuf type {@code google.cloud.retail.v2alpha.MerchantCenterLink} @@ -978,7 +978,7 @@ public Builder mergeFrom( * * *
-     * Required. The linked [Merchant center account
+     * Required. The linked [Merchant Center account
      * ID](https://developers.google.com/shopping-content/guides/accountstatuses).
      * The account must be a standalone account or a sub-account of a MCA.
      * 
@@ -995,7 +995,7 @@ public long getMerchantCenterAccountId() { * * *
-     * Required. The linked [Merchant center account
+     * Required. The linked [Merchant Center account
      * ID](https://developers.google.com/shopping-content/guides/accountstatuses).
      * The account must be a standalone account or a sub-account of a MCA.
      * 
@@ -1016,7 +1016,7 @@ public Builder setMerchantCenterAccountId(long value) { * * *
-     * Required. The linked [Merchant center account
+     * Required. The linked [Merchant Center account
      * ID](https://developers.google.com/shopping-content/guides/accountstatuses).
      * The account must be a standalone account or a sub-account of a MCA.
      * 
@@ -1042,7 +1042,7 @@ public Builder clearMerchantCenterAccountId() { * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; @@ -1069,7 +1069,7 @@ public java.lang.String getBranchId() { * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; @@ -1096,7 +1096,7 @@ public com.google.protobuf.ByteString getBranchIdBytes() { * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; @@ -1122,7 +1122,7 @@ public Builder setBranchId(java.lang.String value) { * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; @@ -1144,7 +1144,7 @@ public Builder clearBranchId() { * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLinkOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLinkOrBuilder.java index 50f5fe3d282a..25a3bcf27949 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLinkOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLinkOrBuilder.java @@ -28,7 +28,7 @@ public interface MerchantCenterLinkOrBuilder * * *
-   * Required. The linked [Merchant center account
+   * Required. The linked [Merchant Center account
    * ID](https://developers.google.com/shopping-content/guides/accountstatuses).
    * The account must be a standalone account or a sub-account of a MCA.
    * 
@@ -48,7 +48,7 @@ public interface MerchantCenterLinkOrBuilder * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; @@ -65,7 +65,7 @@ public interface MerchantCenterLinkOrBuilder * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Model.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Model.java index 1115ec9346d0..6998d6eead5f 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Model.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Model.java @@ -774,6 +774,174 @@ private DataState(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2alpha.Model.DataState) } + /** + * + * + *
+   * Use single or multiple context products for recommendations.
+   * 
+ * + * Protobuf enum {@code google.cloud.retail.v2alpha.Model.ContextProductsType} + */ + public enum ContextProductsType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified default value, should never be explicitly set.
+     * Defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2alpha.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * CONTEXT_PRODUCTS_TYPE_UNSPECIFIED = 0; + */ + CONTEXT_PRODUCTS_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Use only a single product as context for the recommendation. Typically
+     * used on pages like add-to-cart or product details.
+     * 
+ * + * SINGLE_CONTEXT_PRODUCT = 1; + */ + SINGLE_CONTEXT_PRODUCT(1), + /** + * + * + *
+     * Use one or multiple products as context for the recommendation. Typically
+     * used on shopping cart pages.
+     * 
+ * + * MULTIPLE_CONTEXT_PRODUCTS = 2; + */ + MULTIPLE_CONTEXT_PRODUCTS(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified default value, should never be explicitly set.
+     * Defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2alpha.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * CONTEXT_PRODUCTS_TYPE_UNSPECIFIED = 0; + */ + public static final int CONTEXT_PRODUCTS_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Use only a single product as context for the recommendation. Typically
+     * used on pages like add-to-cart or product details.
+     * 
+ * + * SINGLE_CONTEXT_PRODUCT = 1; + */ + public static final int SINGLE_CONTEXT_PRODUCT_VALUE = 1; + /** + * + * + *
+     * Use one or multiple products as context for the recommendation. Typically
+     * used on shopping cart pages.
+     * 
+ * + * MULTIPLE_CONTEXT_PRODUCTS = 2; + */ + public static final int MULTIPLE_CONTEXT_PRODUCTS_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 ContextProductsType 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 ContextProductsType forNumber(int value) { + switch (value) { + case 0: + return CONTEXT_PRODUCTS_TYPE_UNSPECIFIED; + case 1: + return SINGLE_CONTEXT_PRODUCT; + case 2: + return MULTIPLE_CONTEXT_PRODUCTS; + 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 ContextProductsType findValueByNumber(int number) { + return ContextProductsType.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.Model.getDescriptor().getEnumTypes().get(4); + } + + private static final ContextProductsType[] VALUES = values(); + + public static ContextProductsType 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 ContextProductsType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2alpha.Model.ContextProductsType) + } + public interface PageOptimizationConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.Model.PageOptimizationConfig) @@ -6320,123 +6488,1732 @@ public com.google.cloud.retail.v2alpha.Model.ServingConfigList getDefaultInstanc } } - private int bitField0_; - private int trainingConfigCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object trainingConfig_; - - public enum TrainingConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - PAGE_OPTIMIZATION_CONFIG(17), - TRAININGCONFIG_NOT_SET(0); - private final int value; + public interface FrequentlyBoughtTogetherFeaturesConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig) + com.google.protobuf.MessageOrBuilder { - private TrainingConfigCase(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. + * + * + *
+     * Optional. Specifies the context of the model when it is used in predict
+     * requests. Can only be set for the `frequently-bought-together` type. If
+     * it isn't specified, it defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2alpha.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for contextProductsType. */ - @java.lang.Deprecated - public static TrainingConfigCase valueOf(int value) { - return forNumber(value); - } - - public static TrainingConfigCase forNumber(int value) { - switch (value) { - case 17: - return PAGE_OPTIMIZATION_CONFIG; - case 0: - return TRAININGCONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public TrainingConfigCase getTrainingConfigCase() { - return TrainingConfigCase.forNumber(trainingConfigCase_); - } - - public static final int PAGE_OPTIMIZATION_CONFIG_FIELD_NUMBER = 17; - /** - * - * - *
-   * Optional. The page optimization config.
-   * 
- * - * - * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pageOptimizationConfig field is set. - */ - @java.lang.Override - public boolean hasPageOptimizationConfig() { - return trainingConfigCase_ == 17; + int getContextProductsTypeValue(); + /** + * + * + *
+     * Optional. Specifies the context of the model when it is used in predict
+     * requests. Can only be set for the `frequently-bought-together` type. If
+     * it isn't specified, it defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2alpha.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The contextProductsType. + */ + com.google.cloud.retail.v2alpha.Model.ContextProductsType getContextProductsType(); } /** * * *
-   * Optional. The page optimization config.
+   * Additional configs for the frequently-bought-together model type.
    * 
* - * - * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pageOptimizationConfig. + * Protobuf type {@code google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig} */ - @java.lang.Override - public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig getPageOptimizationConfig() { - if (trainingConfigCase_ == 17) { - return (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) trainingConfig_; + public static final class FrequentlyBoughtTogetherFeaturesConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig) + FrequentlyBoughtTogetherFeaturesConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use FrequentlyBoughtTogetherFeaturesConfig.newBuilder() to construct. + private FrequentlyBoughtTogetherFeaturesConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - return com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. The page optimization config.
-   * 
- * - * - * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfigOrBuilder - getPageOptimizationConfigOrBuilder() { - if (trainingConfigCase_ == 17) { - return (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) trainingConfig_; + + private FrequentlyBoughtTogetherFeaturesConfig() { + contextProductsType_ = 0; } - return com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.getDefaultInstance(); - } - public static final int NAME_FIELD_NUMBER = 1; + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FrequentlyBoughtTogetherFeaturesConfig(); + } - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The fully qualified resource name of the model.
-   *
-   * Format:
-   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+      return com.google.cloud.retail.v2alpha.ModelProto
+          .internal_static_google_cloud_retail_v2alpha_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor;
+    }
+
+    @java.lang.Override
+    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return com.google.cloud.retail.v2alpha.ModelProto
+          .internal_static_google_cloud_retail_v2alpha_Model_FrequentlyBoughtTogetherFeaturesConfig_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig.class,
+              com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder
+                  .class);
+    }
+
+    public static final int CONTEXT_PRODUCTS_TYPE_FIELD_NUMBER = 2;
+    private int contextProductsType_ = 0;
+    /**
+     *
+     *
+     * 
+     * Optional. Specifies the context of the model when it is used in predict
+     * requests. Can only be set for the `frequently-bought-together` type. If
+     * it isn't specified, it defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2alpha.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for contextProductsType. + */ + @java.lang.Override + public int getContextProductsTypeValue() { + return contextProductsType_; + } + /** + * + * + *
+     * Optional. Specifies the context of the model when it is used in predict
+     * requests. Can only be set for the `frequently-bought-together` type. If
+     * it isn't specified, it defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2alpha.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The contextProductsType. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.ContextProductsType getContextProductsType() { + com.google.cloud.retail.v2alpha.Model.ContextProductsType result = + com.google.cloud.retail.v2alpha.Model.ContextProductsType.forNumber(contextProductsType_); + return result == null + ? com.google.cloud.retail.v2alpha.Model.ContextProductsType.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 (contextProductsType_ + != com.google.cloud.retail.v2alpha.Model.ContextProductsType + .CONTEXT_PRODUCTS_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, contextProductsType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (contextProductsType_ + != com.google.cloud.retail.v2alpha.Model.ContextProductsType + .CONTEXT_PRODUCTS_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, contextProductsType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig other = + (com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig) obj; + + if (contextProductsType_ != other.contextProductsType_) 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_PRODUCTS_TYPE_FIELD_NUMBER; + hash = (53 * hash) + contextProductsType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Additional configs for the frequently-bought-together model type.
+     * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig) + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_FrequentlyBoughtTogetherFeaturesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig.class, + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + contextProductsType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig build() { + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + buildPartial() { + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig result = + new com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextProductsType_ = contextProductsType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig) { + return mergeFrom( + (com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig other) { + if (other + == com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance()) return this; + if (other.contextProductsType_ != 0) { + setContextProductsTypeValue(other.getContextProductsTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: + { + contextProductsType_ = input.readEnum(); + bitField0_ |= 0x00000001; + 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 contextProductsType_ = 0; + /** + * + * + *
+       * Optional. Specifies the context of the model when it is used in predict
+       * requests. Can only be set for the `frequently-bought-together` type. If
+       * it isn't specified, it defaults to
+       * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2alpha.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for contextProductsType. + */ + @java.lang.Override + public int getContextProductsTypeValue() { + return contextProductsType_; + } + /** + * + * + *
+       * Optional. Specifies the context of the model when it is used in predict
+       * requests. Can only be set for the `frequently-bought-together` type. If
+       * it isn't specified, it defaults to
+       * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2alpha.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for contextProductsType to set. + * @return This builder for chaining. + */ + public Builder setContextProductsTypeValue(int value) { + contextProductsType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Specifies the context of the model when it is used in predict
+       * requests. Can only be set for the `frequently-bought-together` type. If
+       * it isn't specified, it defaults to
+       * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2alpha.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The contextProductsType. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.ContextProductsType getContextProductsType() { + com.google.cloud.retail.v2alpha.Model.ContextProductsType result = + com.google.cloud.retail.v2alpha.Model.ContextProductsType.forNumber( + contextProductsType_); + return result == null + ? com.google.cloud.retail.v2alpha.Model.ContextProductsType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Optional. Specifies the context of the model when it is used in predict
+       * requests. Can only be set for the `frequently-bought-together` type. If
+       * it isn't specified, it defaults to
+       * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2alpha.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The contextProductsType to set. + * @return This builder for chaining. + */ + public Builder setContextProductsType( + com.google.cloud.retail.v2alpha.Model.ContextProductsType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + contextProductsType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Specifies the context of the model when it is used in predict
+       * requests. Can only be set for the `frequently-bought-together` type. If
+       * it isn't specified, it defaults to
+       * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2alpha.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearContextProductsType() { + bitField0_ = (bitField0_ & ~0x00000001); + contextProductsType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig) + private static final com.google.cloud.retail.v2alpha.Model + .FrequentlyBoughtTogetherFeaturesConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig(); + } + + public static com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FrequentlyBoughtTogetherFeaturesConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ModelFeaturesConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.Model.ModelFeaturesConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return Whether the frequentlyBoughtTogetherConfig field is set. + */ + boolean hasFrequentlyBoughtTogetherConfig(); + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return The frequentlyBoughtTogetherConfig. + */ + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + getFrequentlyBoughtTogetherConfig(); + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder + getFrequentlyBoughtTogetherConfigOrBuilder(); + + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.TypeDedicatedConfigCase + getTypeDedicatedConfigCase(); + } + /** + * + * + *
+   * Additional model features config.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.Model.ModelFeaturesConfig} + */ + public static final class ModelFeaturesConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.Model.ModelFeaturesConfig) + ModelFeaturesConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ModelFeaturesConfig.newBuilder() to construct. + private ModelFeaturesConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ModelFeaturesConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ModelFeaturesConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_ModelFeaturesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_ModelFeaturesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.class, + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.Builder.class); + } + + private int typeDedicatedConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object typeDedicatedConfig_; + + public enum TypeDedicatedConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FREQUENTLY_BOUGHT_TOGETHER_CONFIG(1), + TYPEDEDICATEDCONFIG_NOT_SET(0); + private final int value; + + private TypeDedicatedConfigCase(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 TypeDedicatedConfigCase valueOf(int value) { + return forNumber(value); + } + + public static TypeDedicatedConfigCase forNumber(int value) { + switch (value) { + case 1: + return FREQUENTLY_BOUGHT_TOGETHER_CONFIG; + case 0: + return TYPEDEDICATEDCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeDedicatedConfigCase getTypeDedicatedConfigCase() { + return TypeDedicatedConfigCase.forNumber(typeDedicatedConfigCase_); + } + + public static final int FREQUENTLY_BOUGHT_TOGETHER_CONFIG_FIELD_NUMBER = 1; + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return Whether the frequentlyBoughtTogetherConfig field is set. + */ + @java.lang.Override + public boolean hasFrequentlyBoughtTogetherConfig() { + return typeDedicatedConfigCase_ == 1; + } + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return The frequentlyBoughtTogetherConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + getFrequentlyBoughtTogetherConfig() { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_; + } + return com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder + getFrequentlyBoughtTogetherConfigOrBuilder() { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_; + } + return com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + .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 (typeDedicatedConfigCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeDedicatedConfigCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2alpha.Model.ModelFeaturesConfig)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig other = + (com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig) obj; + + if (!getTypeDedicatedConfigCase().equals(other.getTypeDedicatedConfigCase())) return false; + switch (typeDedicatedConfigCase_) { + case 1: + if (!getFrequentlyBoughtTogetherConfig() + .equals(other.getFrequentlyBoughtTogetherConfig())) 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 (typeDedicatedConfigCase_) { + case 1: + hash = (37 * hash) + FREQUENTLY_BOUGHT_TOGETHER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getFrequentlyBoughtTogetherConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.Model.ModelFeaturesConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Additional model features config.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.Model.ModelFeaturesConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.Model.ModelFeaturesConfig) + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_ModelFeaturesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_ModelFeaturesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.class, + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (frequentlyBoughtTogetherConfigBuilder_ != null) { + frequentlyBoughtTogetherConfigBuilder_.clear(); + } + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_ModelFeaturesConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig build() { + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig buildPartial() { + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig result = + new com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig result) { + result.typeDedicatedConfigCase_ = typeDedicatedConfigCase_; + result.typeDedicatedConfig_ = this.typeDedicatedConfig_; + if (typeDedicatedConfigCase_ == 1 && frequentlyBoughtTogetherConfigBuilder_ != null) { + result.typeDedicatedConfig_ = frequentlyBoughtTogetherConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig) { + return mergeFrom((com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig other) { + if (other == com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.getDefaultInstance()) + return this; + switch (other.getTypeDedicatedConfigCase()) { + case FREQUENTLY_BOUGHT_TOGETHER_CONFIG: + { + mergeFrequentlyBoughtTogetherConfig(other.getFrequentlyBoughtTogetherConfig()); + break; + } + case TYPEDEDICATEDCONFIG_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( + getFrequentlyBoughtTogetherConfigFieldBuilder().getBuilder(), + extensionRegistry); + typeDedicatedConfigCase_ = 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 typeDedicatedConfigCase_ = 0; + private java.lang.Object typeDedicatedConfig_; + + public TypeDedicatedConfigCase getTypeDedicatedConfigCase() { + return TypeDedicatedConfigCase.forNumber(typeDedicatedConfigCase_); + } + + public Builder clearTypeDedicatedConfig() { + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig, + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder, + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder> + frequentlyBoughtTogetherConfigBuilder_; + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return Whether the frequentlyBoughtTogetherConfig field is set. + */ + @java.lang.Override + public boolean hasFrequentlyBoughtTogetherConfig() { + return typeDedicatedConfigCase_ == 1; + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return The frequentlyBoughtTogetherConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + getFrequentlyBoughtTogetherConfig() { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_; + } + return com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } else { + if (typeDedicatedConfigCase_ == 1) { + return frequentlyBoughtTogetherConfigBuilder_.getMessage(); + } + return com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + public Builder setFrequentlyBoughtTogetherConfig( + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig value) { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeDedicatedConfig_ = value; + onChanged(); + } else { + frequentlyBoughtTogetherConfigBuilder_.setMessage(value); + } + typeDedicatedConfigCase_ = 1; + return this; + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + public Builder setFrequentlyBoughtTogetherConfig( + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder + builderForValue) { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + typeDedicatedConfig_ = builderForValue.build(); + onChanged(); + } else { + frequentlyBoughtTogetherConfigBuilder_.setMessage(builderForValue.build()); + } + typeDedicatedConfigCase_ = 1; + return this; + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + public Builder mergeFrequentlyBoughtTogetherConfig( + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig value) { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + if (typeDedicatedConfigCase_ == 1 + && typeDedicatedConfig_ + != com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance()) { + typeDedicatedConfig_ = + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + .newBuilder( + (com.google.cloud.retail.v2alpha.Model + .FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + typeDedicatedConfig_ = value; + } + onChanged(); + } else { + if (typeDedicatedConfigCase_ == 1) { + frequentlyBoughtTogetherConfigBuilder_.mergeFrom(value); + } else { + frequentlyBoughtTogetherConfigBuilder_.setMessage(value); + } + } + typeDedicatedConfigCase_ = 1; + return this; + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + public Builder clearFrequentlyBoughtTogetherConfig() { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + if (typeDedicatedConfigCase_ == 1) { + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + onChanged(); + } + } else { + if (typeDedicatedConfigCase_ == 1) { + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + } + frequentlyBoughtTogetherConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + public com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder + getFrequentlyBoughtTogetherConfigBuilder() { + return getFrequentlyBoughtTogetherConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder + getFrequentlyBoughtTogetherConfigOrBuilder() { + if ((typeDedicatedConfigCase_ == 1) && (frequentlyBoughtTogetherConfigBuilder_ != null)) { + return frequentlyBoughtTogetherConfigBuilder_.getMessageOrBuilder(); + } else { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_; + } + return com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig, + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder, + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder> + getFrequentlyBoughtTogetherConfigFieldBuilder() { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + if (!(typeDedicatedConfigCase_ == 1)) { + typeDedicatedConfig_ = + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } + frequentlyBoughtTogetherConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig, + com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig + .Builder, + com.google.cloud.retail.v2alpha.Model + .FrequentlyBoughtTogetherFeaturesConfigOrBuilder>( + (com.google.cloud.retail.v2alpha.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_, + getParentForChildren(), + isClean()); + typeDedicatedConfig_ = null; + } + typeDedicatedConfigCase_ = 1; + onChanged(); + return frequentlyBoughtTogetherConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.Model.ModelFeaturesConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.Model.ModelFeaturesConfig) + private static final com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig(); + } + + public static com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModelFeaturesConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.Model.ModelFeaturesConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int trainingConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object trainingConfig_; + + public enum TrainingConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PAGE_OPTIMIZATION_CONFIG(17), + TRAININGCONFIG_NOT_SET(0); + private final int value; + + private TrainingConfigCase(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 TrainingConfigCase valueOf(int value) { + return forNumber(value); + } + + public static TrainingConfigCase forNumber(int value) { + switch (value) { + case 17: + return PAGE_OPTIMIZATION_CONFIG; + case 0: + return TRAININGCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TrainingConfigCase getTrainingConfigCase() { + return TrainingConfigCase.forNumber(trainingConfigCase_); + } + + public static final int PAGE_OPTIMIZATION_CONFIG_FIELD_NUMBER = 17; + /** + * + * + *
+   * Optional. The page optimization config.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the pageOptimizationConfig field is set. + */ + @java.lang.Override + public boolean hasPageOptimizationConfig() { + return trainingConfigCase_ == 17; + } + /** + * + * + *
+   * Optional. The page optimization config.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pageOptimizationConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig getPageOptimizationConfig() { + if (trainingConfigCase_ == 17) { + return (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) trainingConfig_; + } + return com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. The page optimization config.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfigOrBuilder + getPageOptimizationConfigOrBuilder() { + if (trainingConfigCase_ == 17) { + return (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) trainingConfig_; + } + return com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The fully qualified resource name of the model.
+   *
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
    * catalog_id has char limit of 50.
    * recommendation_model_id has char limit of 40.
    * 
@@ -7268,6 +9045,63 @@ public com.google.cloud.retail.v2alpha.Model.ServingConfigList getServingConfigL return servingConfigLists_.get(index); } + public static final int MODEL_FEATURES_CONFIG_FIELD_NUMBER = 22; + private com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig modelFeaturesConfig_; + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the modelFeaturesConfig field is set. + */ + @java.lang.Override + public boolean hasModelFeaturesConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The modelFeaturesConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig getModelFeaturesConfig() { + return modelFeaturesConfig_ == null + ? com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.getDefaultInstance() + : modelFeaturesConfig_; + } + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfigOrBuilder + getModelFeaturesConfigOrBuilder() { + return modelFeaturesConfig_ == null + ? com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.getDefaultInstance() + : modelFeaturesConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -7339,6 +9173,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < servingConfigLists_.size(); i++) { output.writeMessage(19, servingConfigLists_.get(i)); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(22, getModelFeaturesConfig()); + } getUnknownFields().writeTo(output); } @@ -7407,6 +9244,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, servingConfigLists_.get(i)); } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(22, getModelFeaturesConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -7445,6 +9286,10 @@ public boolean equals(final java.lang.Object obj) { if (dataState_ != other.dataState_) return false; if (filteringOption_ != other.filteringOption_) return false; if (!getServingConfigListsList().equals(other.getServingConfigListsList())) return false; + if (hasModelFeaturesConfig() != other.hasModelFeaturesConfig()) return false; + if (hasModelFeaturesConfig()) { + if (!getModelFeaturesConfig().equals(other.getModelFeaturesConfig())) return false; + } if (!getTrainingConfigCase().equals(other.getTrainingConfigCase())) return false; switch (trainingConfigCase_) { case 17: @@ -7500,6 +9345,10 @@ public int hashCode() { hash = (37 * hash) + SERVING_CONFIG_LISTS_FIELD_NUMBER; hash = (53 * hash) + getServingConfigListsList().hashCode(); } + if (hasModelFeaturesConfig()) { + hash = (37 * hash) + MODEL_FEATURES_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getModelFeaturesConfig().hashCode(); + } switch (trainingConfigCase_) { case 17: hash = (37 * hash) + PAGE_OPTIMIZATION_CONFIG_FIELD_NUMBER; @@ -7655,6 +9504,7 @@ private void maybeForceBuilderInitialization() { getUpdateTimeFieldBuilder(); getLastTuneTimeFieldBuilder(); getServingConfigListsFieldBuilder(); + getModelFeaturesConfigFieldBuilder(); } } @@ -7697,6 +9547,11 @@ public Builder clear() { servingConfigListsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00004000); + modelFeaturesConfig_ = null; + if (modelFeaturesConfigBuilder_ != null) { + modelFeaturesConfigBuilder_.dispose(); + modelFeaturesConfigBuilder_ = null; + } trainingConfigCase_ = 0; trainingConfig_ = null; return this; @@ -7793,6 +9648,13 @@ private void buildPartial0(com.google.cloud.retail.v2alpha.Model result) { if (((from_bitField0_ & 0x00002000) != 0)) { result.filteringOption_ = filteringOption_; } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.modelFeaturesConfig_ = + modelFeaturesConfigBuilder_ == null + ? modelFeaturesConfig_ + : modelFeaturesConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -7925,6 +9787,9 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Model other) { } } } + if (other.hasModelFeaturesConfig()) { + mergeModelFeaturesConfig(other.getModelFeaturesConfig()); + } switch (other.getTrainingConfigCase()) { case PAGE_OPTIMIZATION_CONFIG: { @@ -8061,6 +9926,13 @@ public Builder mergeFrom( } break; } // case 154 + case 178: + { + input.readMessage( + getModelFeaturesConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 178 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -10761,6 +12633,215 @@ public Builder removeServingConfigLists(int index) { return servingConfigListsBuilder_; } + private com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig modelFeaturesConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig, + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.Builder, + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfigOrBuilder> + modelFeaturesConfigBuilder_; + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the modelFeaturesConfig field is set. + */ + public boolean hasModelFeaturesConfig() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The modelFeaturesConfig. + */ + public com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig getModelFeaturesConfig() { + if (modelFeaturesConfigBuilder_ == null) { + return modelFeaturesConfig_ == null + ? com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.getDefaultInstance() + : modelFeaturesConfig_; + } else { + return modelFeaturesConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setModelFeaturesConfig( + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig value) { + if (modelFeaturesConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelFeaturesConfig_ = value; + } else { + modelFeaturesConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setModelFeaturesConfig( + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.Builder builderForValue) { + if (modelFeaturesConfigBuilder_ == null) { + modelFeaturesConfig_ = builderForValue.build(); + } else { + modelFeaturesConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeModelFeaturesConfig( + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig value) { + if (modelFeaturesConfigBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && modelFeaturesConfig_ != null + && modelFeaturesConfig_ + != com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.getDefaultInstance()) { + getModelFeaturesConfigBuilder().mergeFrom(value); + } else { + modelFeaturesConfig_ = value; + } + } else { + modelFeaturesConfigBuilder_.mergeFrom(value); + } + if (modelFeaturesConfig_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearModelFeaturesConfig() { + bitField0_ = (bitField0_ & ~0x00008000); + modelFeaturesConfig_ = null; + if (modelFeaturesConfigBuilder_ != null) { + modelFeaturesConfigBuilder_.dispose(); + modelFeaturesConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.Builder + getModelFeaturesConfigBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getModelFeaturesConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfigOrBuilder + getModelFeaturesConfigOrBuilder() { + if (modelFeaturesConfigBuilder_ != null) { + return modelFeaturesConfigBuilder_.getMessageOrBuilder(); + } else { + return modelFeaturesConfig_ == null + ? com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.getDefaultInstance() + : modelFeaturesConfig_; + } + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig, + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.Builder, + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfigOrBuilder> + getModelFeaturesConfigFieldBuilder() { + if (modelFeaturesConfigBuilder_ == null) { + modelFeaturesConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig, + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig.Builder, + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfigOrBuilder>( + getModelFeaturesConfig(), getParentForChildren(), isClean()); + modelFeaturesConfig_ = null; + } + return modelFeaturesConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelOrBuilder.java index 62576d19383c..161a4504f77c 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelOrBuilder.java @@ -664,5 +664,47 @@ public interface ModelOrBuilder com.google.cloud.retail.v2alpha.Model.ServingConfigListOrBuilder getServingConfigListsOrBuilder( int index); + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the modelFeaturesConfig field is set. + */ + boolean hasModelFeaturesConfig(); + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The modelFeaturesConfig. + */ + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfig getModelFeaturesConfig(); + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.retail.v2alpha.Model.ModelFeaturesConfigOrBuilder + getModelFeaturesConfigOrBuilder(); + com.google.cloud.retail.v2alpha.Model.TrainingConfigCase getTrainingConfigCase(); } diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelProto.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelProto.java index 0efa2ee8a110..c1161df670c3 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelProto.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelProto.java @@ -48,6 +48,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2alpha_Model_ServingConfigList_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2alpha_Model_ServingConfigList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_Model_FrequentlyBoughtTogetherFeaturesConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_Model_ModelFeaturesConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_Model_ModelFeaturesConfig_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -62,7 +70,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pi/field_behavior.proto\032\031google/api/reso" + "urce.proto\032(google/cloud/retail/v2alpha/" + "common.proto\032\037google/protobuf/timestamp." - + "proto\"\374\020\n\005Model\022b\n\030page_optimization_con" + + "proto\"\201\025\n\005Model\022b\n\030page_optimization_con" + "fig\030\021 \001(\01329.google.cloud.retail.v2alpha." + "Model.PageOptimizationConfigB\003\340A\001H\000\022\021\n\004n" + "ame\030\001 \001(\tB\003\340A\002\022\031\n\014display_name\030\002 \001(\tB\003\340A" @@ -84,44 +92,57 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".google.cloud.retail.v2alpha.Recommendat" + "ionsFilteringOptionB\003\340A\001\022W\n\024serving_conf" + "ig_lists\030\023 \003(\01324.google.cloud.retail.v2a" - + "lpha.Model.ServingConfigListB\003\340A\003\032\302\005\n\026Pa" - + "geOptimizationConfig\022)\n\034page_optimizatio" - + "n_event_type\030\001 \001(\tB\003\340A\002\022T\n\006panels\030\002 \003(\0132" - + "?.google.cloud.retail.v2alpha.Model.Page" - + "OptimizationConfig.PanelB\003\340A\002\022_\n\013restric" - + "tion\030\003 \001(\0162E.google.cloud.retail.v2alpha" - + ".Model.PageOptimizationConfig.Restrictio" - + "nB\003\340A\001\0325\n\tCandidate\022\033\n\021serving_config_id" - + "\030\001 \001(\tH\000B\013\n\tcandidate\032\345\001\n\005Panel\022\031\n\014displ" - + "ay_name\030\001 \001(\tB\003\340A\001\022\\\n\ncandidates\030\002 \003(\0132C" - + ".google.cloud.retail.v2alpha.Model.PageO" - + "ptimizationConfig.CandidateB\003\340A\002\022c\n\021defa" - + "ult_candidate\030\003 \001(\0132C.google.cloud.retai" - + "l.v2alpha.Model.PageOptimizationConfig.C" - + "andidateB\003\340A\002\"\246\001\n\013Restriction\022\033\n\027RESTRIC" - + "TION_UNSPECIFIED\020\000\022\022\n\016NO_RESTRICTION\020\001\022%" - + "\n!UNIQUE_SERVING_CONFIG_RESTRICTION\020\002\022\034\n" - + "\030UNIQUE_MODEL_RESTRICTION\020\003\022!\n\035UNIQUE_MO" - + "DEL_TYPE_RESTRICTION\020\004\0324\n\021ServingConfigL" - + "ist\022\037\n\022serving_config_ids\030\001 \003(\tB\003\340A\001\"R\n\014" - + "ServingState\022\035\n\031SERVING_STATE_UNSPECIFIE" - + "D\020\000\022\014\n\010INACTIVE\020\001\022\n\n\006ACTIVE\020\002\022\t\n\005TUNED\020\003" - + "\"I\n\rTrainingState\022\036\n\032TRAINING_STATE_UNSP" - + "ECIFIED\020\000\022\n\n\006PAUSED\020\001\022\014\n\010TRAINING\020\002\"\220\001\n\023" - + "PeriodicTuningState\022%\n!PERIODIC_TUNING_S" - + "TATE_UNSPECIFIED\020\000\022\034\n\030PERIODIC_TUNING_DI" - + "SABLED\020\001\022\027\n\023ALL_TUNING_DISABLED\020\003\022\033\n\027PER" - + "IODIC_TUNING_ENABLED\020\002\"D\n\tDataState\022\032\n\026D" - + "ATA_STATE_UNSPECIFIED\020\000\022\013\n\007DATA_OK\020\001\022\016\n\n" - + "DATA_ERROR\020\002:k\352Ah\n\033retail.googleapis.com" - + "/Model\022Iprojects/{project}/locations/{lo" - + "cation}/catalogs/{catalog}/models/{model" - + "}B\021\n\017training_configB\316\001\n\037com.google.clou" - + "d.retail.v2alphaB\nModelProtoP\001Z7cloud.go" - + "ogle.com/go/retail/apiv2alpha/retailpb;r" - + "etailpb\242\002\006RETAIL\252\002\033Google.Cloud.Retail.V" - + "2Alpha\312\002\033Google\\Cloud\\Retail\\V2alpha\352\002\036G" - + "oogle::Cloud::Retail::V2alphab\006proto3" + + "lpha.Model.ServingConfigListB\003\340A\003\022Z\n\025mod" + + "el_features_config\030\026 \001(\01326.google.cloud." + + "retail.v2alpha.Model.ModelFeaturesConfig" + + "B\003\340A\001\032\302\005\n\026PageOptimizationConfig\022)\n\034page" + + "_optimization_event_type\030\001 \001(\tB\003\340A\002\022T\n\006p" + + "anels\030\002 \003(\0132?.google.cloud.retail.v2alph" + + "a.Model.PageOptimizationConfig.PanelB\003\340A" + + "\002\022_\n\013restriction\030\003 \001(\0162E.google.cloud.re" + + "tail.v2alpha.Model.PageOptimizationConfi" + + "g.RestrictionB\003\340A\001\0325\n\tCandidate\022\033\n\021servi" + + "ng_config_id\030\001 \001(\tH\000B\013\n\tcandidate\032\345\001\n\005Pa" + + "nel\022\031\n\014display_name\030\001 \001(\tB\003\340A\001\022\\\n\ncandid" + + "ates\030\002 \003(\0132C.google.cloud.retail.v2alpha" + + ".Model.PageOptimizationConfig.CandidateB" + + "\003\340A\002\022c\n\021default_candidate\030\003 \001(\0132C.google" + + ".cloud.retail.v2alpha.Model.PageOptimiza" + + "tionConfig.CandidateB\003\340A\002\"\246\001\n\013Restrictio" + + "n\022\033\n\027RESTRICTION_UNSPECIFIED\020\000\022\022\n\016NO_RES" + + "TRICTION\020\001\022%\n!UNIQUE_SERVING_CONFIG_REST" + + "RICTION\020\002\022\034\n\030UNIQUE_MODEL_RESTRICTION\020\003\022" + + "!\n\035UNIQUE_MODEL_TYPE_RESTRICTION\020\004\0324\n\021Se" + + "rvingConfigList\022\037\n\022serving_config_ids\030\001 " + + "\003(\tB\003\340A\001\032\204\001\n&FrequentlyBoughtTogetherFea" + + "turesConfig\022Z\n\025context_products_type\030\002 \001" + + "(\01626.google.cloud.retail.v2alpha.Model.C" + + "ontextProductsTypeB\003\340A\001\032\246\001\n\023ModelFeature" + + "sConfig\022v\n!frequently_bought_together_co" + + "nfig\030\001 \001(\0132I.google.cloud.retail.v2alpha" + + ".Model.FrequentlyBoughtTogetherFeaturesC" + + "onfigH\000B\027\n\025type_dedicated_config\"R\n\014Serv" + + "ingState\022\035\n\031SERVING_STATE_UNSPECIFIED\020\000\022" + + "\014\n\010INACTIVE\020\001\022\n\n\006ACTIVE\020\002\022\t\n\005TUNED\020\003\"I\n\r" + + "TrainingState\022\036\n\032TRAINING_STATE_UNSPECIF" + + "IED\020\000\022\n\n\006PAUSED\020\001\022\014\n\010TRAINING\020\002\"\220\001\n\023Peri" + + "odicTuningState\022%\n!PERIODIC_TUNING_STATE" + + "_UNSPECIFIED\020\000\022\034\n\030PERIODIC_TUNING_DISABL" + + "ED\020\001\022\027\n\023ALL_TUNING_DISABLED\020\003\022\033\n\027PERIODI" + + "C_TUNING_ENABLED\020\002\"D\n\tDataState\022\032\n\026DATA_" + + "STATE_UNSPECIFIED\020\000\022\013\n\007DATA_OK\020\001\022\016\n\nDATA" + + "_ERROR\020\002\"w\n\023ContextProductsType\022%\n!CONTE" + + "XT_PRODUCTS_TYPE_UNSPECIFIED\020\000\022\032\n\026SINGLE" + + "_CONTEXT_PRODUCT\020\001\022\035\n\031MULTIPLE_CONTEXT_P" + + "RODUCTS\020\002:k\352Ah\n\033retail.googleapis.com/Mo" + + "del\022Iprojects/{project}/locations/{locat" + + "ion}/catalogs/{catalog}/models/{model}B\021" + + "\n\017training_configB\316\001\n\037com.google.cloud.r" + + "etail.v2alphaB\nModelProtoP\001Z7cloud.googl" + + "e.com/go/retail/apiv2alpha/retailpb;reta" + + "ilpb\242\002\006RETAIL\252\002\033Google.Cloud.Retail.V2Al" + + "pha\312\002\033Google\\Cloud\\Retail\\V2alpha\352\002\036Goog" + + "le::Cloud::Retail::V2alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -153,6 +174,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DataState", "FilteringOption", "ServingConfigLists", + "ModelFeaturesConfig", "TrainingConfig", }); internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_descriptor = @@ -191,6 +213,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ServingConfigIds", }); + internal_static_google_cloud_retail_v2alpha_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor = + internal_static_google_cloud_retail_v2alpha_Model_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_retail_v2alpha_Model_FrequentlyBoughtTogetherFeaturesConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor, + new java.lang.String[] { + "ContextProductsType", + }); + internal_static_google_cloud_retail_v2alpha_Model_ModelFeaturesConfig_descriptor = + internal_static_google_cloud_retail_v2alpha_Model_descriptor.getNestedTypes().get(3); + internal_static_google_cloud_retail_v2alpha_Model_ModelFeaturesConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_Model_ModelFeaturesConfig_descriptor, + new java.lang.String[] { + "FrequentlyBoughtTogetherConfig", "TypeDedicatedConfig", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Product.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Product.java index fe8724982f49..0e006ac007d6 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Product.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Product.java @@ -578,24 +578,22 @@ public ExpirationCase getExpirationCase() { * * *
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
-   * Note that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION],
-   * and ignored for
-   * [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In
-   * general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
-   * after [expire_time][google.cloud.retail.v2alpha.Product.expire_time].
-   * However, the product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2alpha.Product] is already
+   * expired when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2alpha.Product] is not expired
+   * when it is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be
    * later than
@@ -619,24 +617,22 @@ public boolean hasExpireTime() {
    *
    *
    * 
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
-   * Note that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION],
-   * and ignored for
-   * [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In
-   * general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
-   * after [expire_time][google.cloud.retail.v2alpha.Product.expire_time].
-   * However, the product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2alpha.Product] is already
+   * expired when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2alpha.Product] is not expired
+   * when it is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be
    * later than
@@ -663,24 +659,22 @@ public com.google.protobuf.Timestamp getExpireTime() {
    *
    *
    * 
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
-   * Note that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION],
-   * and ignored for
-   * [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In
-   * general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
-   * after [expire_time][google.cloud.retail.v2alpha.Product.expire_time].
-   * However, the product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2alpha.Product] is already
+   * expired when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2alpha.Product] is not expired
+   * when it is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be
    * later than
@@ -1307,9 +1301,10 @@ public com.google.protobuf.ByteString getGtinBytes() {
    * INVALID_ARGUMENT error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+   * the Google Cloud console. Empty values are not allowed. Each value must be
+   * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+   * an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -1355,9 +1350,10 @@ public com.google.protobuf.ProtocolStringList getCategoriesList() {
    * INVALID_ARGUMENT error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+   * the Google Cloud console. Empty values are not allowed. Each value must be
+   * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+   * an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -1403,9 +1399,10 @@ public int getCategoriesCount() {
    * INVALID_ARGUMENT error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+   * the Google Cloud console. Empty values are not allowed. Each value must be
+   * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+   * an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -1452,9 +1449,10 @@ public java.lang.String getCategories(int index) {
    * INVALID_ARGUMENT error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+   * the Google Cloud console. Empty values are not allowed. Each value must be
+   * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+   * an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -1549,9 +1547,10 @@ public com.google.protobuf.ByteString getTitleBytes() {
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -1571,9 +1570,10 @@ public com.google.protobuf.ProtocolStringList getBrandsList() {
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -1593,9 +1593,10 @@ public int getBrandsCount() {
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -1616,9 +1617,10 @@ public java.lang.String getBrands(int index) {
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -3432,7 +3434,7 @@ public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() {
    * .google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
    *
    * @deprecated google.cloud.retail.v2alpha.Product.retrievable_fields is deprecated. See
-   *     google/cloud/retail/v2alpha/product.proto;l=574
+   *     google/cloud/retail/v2alpha/product.proto;l=570
    * @return Whether the retrievableFields field is set.
    */
   @java.lang.Override
@@ -3510,7 +3512,7 @@ public boolean hasRetrievableFields() {
    * .google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
    *
    * @deprecated google.cloud.retail.v2alpha.Product.retrievable_fields is deprecated. See
-   *     google/cloud/retail/v2alpha/product.proto;l=574
+   *     google/cloud/retail/v2alpha/product.proto;l=570
    * @return The retrievableFields.
    */
   @java.lang.Override
@@ -5507,24 +5509,22 @@ public Builder clearExpiration() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2alpha.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is already
+     * expired when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be
      * later than
@@ -5548,24 +5548,22 @@ public boolean hasExpireTime() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2alpha.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is already
+     * expired when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be
      * later than
@@ -5599,24 +5597,22 @@ public com.google.protobuf.Timestamp getExpireTime() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2alpha.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is already
+     * expired when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be
      * later than
@@ -5647,24 +5643,22 @@ public Builder setExpireTime(com.google.protobuf.Timestamp value) {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2alpha.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is already
+     * expired when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be
      * later than
@@ -5692,24 +5686,22 @@ public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForVal
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2alpha.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is already
+     * expired when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be
      * later than
@@ -5749,24 +5741,22 @@ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2alpha.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is already
+     * expired when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be
      * later than
@@ -5800,24 +5790,22 @@ public Builder clearExpireTime() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2alpha.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is already
+     * expired when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be
      * later than
@@ -5838,24 +5826,22 @@ public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2alpha.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is already
+     * expired when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be
      * later than
@@ -5884,24 +5870,22 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2alpha.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is already
+     * expired when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2alpha.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be
      * later than
@@ -7438,9 +7422,10 @@ private void ensureCategoriesIsMutable() {
      * INVALID_ARGUMENT error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+     * the Google Cloud console. Empty values are not allowed. Each value must be
+     * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+     * an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7487,9 +7472,10 @@ public com.google.protobuf.ProtocolStringList getCategoriesList() {
      * INVALID_ARGUMENT error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+     * the Google Cloud console. Empty values are not allowed. Each value must be
+     * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+     * an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7535,9 +7521,10 @@ public int getCategoriesCount() {
      * INVALID_ARGUMENT error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+     * the Google Cloud console. Empty values are not allowed. Each value must be
+     * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+     * an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7584,9 +7571,10 @@ public java.lang.String getCategories(int index) {
      * INVALID_ARGUMENT error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+     * the Google Cloud console. Empty values are not allowed. Each value must be
+     * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+     * an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7633,9 +7621,10 @@ public com.google.protobuf.ByteString getCategoriesBytes(int index) {
      * INVALID_ARGUMENT error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+     * the Google Cloud console. Empty values are not allowed. Each value must be
+     * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+     * an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7690,9 +7679,10 @@ public Builder setCategories(int index, java.lang.String value) {
      * INVALID_ARGUMENT error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+     * the Google Cloud console. Empty values are not allowed. Each value must be
+     * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+     * an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7746,9 +7736,10 @@ public Builder addCategories(java.lang.String value) {
      * INVALID_ARGUMENT error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+     * the Google Cloud console. Empty values are not allowed. Each value must be
+     * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+     * an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7799,9 +7790,10 @@ public Builder addAllCategories(java.lang.Iterable values) {
      * INVALID_ARGUMENT error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+     * the Google Cloud console. Empty values are not allowed. Each value must be
+     * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+     * an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7851,9 +7843,10 @@ public Builder clearCategories() {
      * INVALID_ARGUMENT error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+     * the Google Cloud console. Empty values are not allowed. Each value must be
+     * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+     * an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -8036,9 +8029,10 @@ private void ensureBrandsIsMutable() {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8059,9 +8053,10 @@ public com.google.protobuf.ProtocolStringList getBrandsList() {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8081,9 +8076,10 @@ public int getBrandsCount() {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8104,9 +8100,10 @@ public java.lang.String getBrands(int index) {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8127,9 +8124,10 @@ public com.google.protobuf.ByteString getBrandsBytes(int index) {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8158,9 +8156,10 @@ public Builder setBrands(int index, java.lang.String value) {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8188,9 +8187,10 @@ public Builder addBrands(java.lang.String value) {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8215,9 +8215,10 @@ public Builder addAllBrands(java.lang.Iterable values) {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8241,9 +8242,10 @@ public Builder clearBrands() {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -13575,7 +13577,7 @@ public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() {
      * .google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
      *
      * @deprecated google.cloud.retail.v2alpha.Product.retrievable_fields is deprecated. See
-     *     google/cloud/retail/v2alpha/product.proto;l=574
+     *     google/cloud/retail/v2alpha/product.proto;l=570
      * @return Whether the retrievableFields field is set.
      */
     @java.lang.Deprecated
@@ -13652,7 +13654,7 @@ public boolean hasRetrievableFields() {
      * .google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
      *
      * @deprecated google.cloud.retail.v2alpha.Product.retrievable_fields is deprecated. See
-     *     google/cloud/retail/v2alpha/product.proto;l=574
+     *     google/cloud/retail/v2alpha/product.proto;l=570
      * @return The retrievableFields.
      */
     @java.lang.Deprecated
diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductOrBuilder.java
index 9970d65369a4..4969dbb166d8 100644
--- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductOrBuilder.java
+++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductOrBuilder.java
@@ -28,24 +28,22 @@ public interface ProductOrBuilder
    *
    *
    * 
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
-   * Note that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION],
-   * and ignored for
-   * [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In
-   * general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
-   * after [expire_time][google.cloud.retail.v2alpha.Product.expire_time].
-   * However, the product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2alpha.Product] is already
+   * expired when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2alpha.Product] is not expired
+   * when it is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be
    * later than
@@ -66,24 +64,22 @@ public interface ProductOrBuilder
    *
    *
    * 
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
-   * Note that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION],
-   * and ignored for
-   * [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In
-   * general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
-   * after [expire_time][google.cloud.retail.v2alpha.Product.expire_time].
-   * However, the product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2alpha.Product] is already
+   * expired when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2alpha.Product] is not expired
+   * when it is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be
    * later than
@@ -104,24 +100,22 @@ public interface ProductOrBuilder
    *
    *
    * 
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
-   * Note that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION],
-   * and ignored for
-   * [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In
-   * general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]
-   * after [expire_time][google.cloud.retail.v2alpha.Product.expire_time].
-   * However, the product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2alpha.Product] is already
+   * expired when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2alpha.Product] is not expired
+   * when it is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be
    * later than
@@ -594,9 +588,10 @@ public interface ProductOrBuilder
    * INVALID_ARGUMENT error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+   * the Google Cloud console. Empty values are not allowed. Each value must be
+   * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+   * an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -640,9 +635,10 @@ public interface ProductOrBuilder
    * INVALID_ARGUMENT error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+   * the Google Cloud console. Empty values are not allowed. Each value must be
+   * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+   * an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -686,9 +682,10 @@ public interface ProductOrBuilder
    * INVALID_ARGUMENT error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+   * the Google Cloud console. Empty values are not allowed. Each value must be
+   * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+   * an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -733,9 +730,10 @@ public interface ProductOrBuilder
    * INVALID_ARGUMENT error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2alpha.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2alpha.Product] unless overridden through
+   * the Google Cloud console. Empty values are not allowed. Each value must be
+   * a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
+   * an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -797,9 +795,10 @@ public interface ProductOrBuilder
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -817,9 +816,10 @@ public interface ProductOrBuilder
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -837,9 +837,10 @@ public interface ProductOrBuilder
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -858,9 +859,10 @@ public interface ProductOrBuilder
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -2331,7 +2333,7 @@ com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault(
    * .google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
    *
    * @deprecated google.cloud.retail.v2alpha.Product.retrievable_fields is deprecated. See
-   *     google/cloud/retail/v2alpha/product.proto;l=574
+   *     google/cloud/retail/v2alpha/product.proto;l=570
    * @return Whether the retrievableFields field is set.
    */
   @java.lang.Deprecated
@@ -2406,7 +2408,7 @@ com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault(
    * .google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
    *
    * @deprecated google.cloud.retail.v2alpha.Product.retrievable_fields is deprecated. See
-   *     google/cloud/retail/v2alpha/product.proto;l=574
+   *     google/cloud/retail/v2alpha/product.proto;l=570
    * @return The retrievableFields.
    */
   @java.lang.Deprecated
diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductProto.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductProto.java
index 9c37bb441f26..6f920420d9f1 100644
--- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductProto.java
+++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductProto.java
@@ -99,15 +99,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "googleapis.com/Product\022_projects/{projec"
           + "t}/locations/{location}/catalogs/{catalo"
           + "g}/branches/{branch}/products/{product}B"
-          + "\014\n\nexpirationB\277\002\n\037com.google.cloud.retai"
+          + "\014\n\nexpirationB\320\001\n\037com.google.cloud.retai"
           + "l.v2alphaB\014ProductProtoP\001Z7cloud.google."
           + "com/go/retail/apiv2alpha/retailpb;retail"
           + "pb\242\002\006RETAIL\252\002\033Google.Cloud.Retail.V2Alph"
           + "a\312\002\033Google\\Cloud\\Retail\\V2alpha\352\002\036Google"
-          + "::Cloud::Retail::V2alpha\352Al\n\034retail.goog"
-          + "leapis.com/Branch\022Lprojects/{project}/lo"
-          + "cations/{location}/catalogs/{catalog}/br"
-          + "anches/{branch}b\006proto3"
+          + "::Cloud::Retail::V2alphab\006proto3"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -176,7 +173,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
         com.google.protobuf.ExtensionRegistry.newInstance();
     registry.add(com.google.api.FieldBehaviorProto.fieldBehavior);
     registry.add(com.google.api.ResourceProto.resource);
-    registry.add(com.google.api.ResourceProto.resourceDefinition);
     com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
         descriptor, registry);
     com.google.api.FieldBehaviorProto.getDescriptor();
diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Project.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Project.java
new file mode 100644
index 000000000000..88164ffb92fd
--- /dev/null
+++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Project.java
@@ -0,0 +1,1054 @@
+/*
+ * Copyright 2024 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: google/cloud/retail/v2alpha/project.proto
+
+// Protobuf Java Version: 3.25.3
+package com.google.cloud.retail.v2alpha;
+
+/**
+ *
+ *
+ * 
+ * Metadata that describes a Cloud Retail Project.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.Project} + */ +public final class Project extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.Project) + ProjectOrBuilder { + private static final long serialVersionUID = 0L; + // Use Project.newBuilder() to construct. + private Project(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Project() { + name_ = ""; + enrolledSolutions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Project(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_Project_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_Project_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Project.class, + com.google.cloud.retail.v2alpha.Project.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Full resource name of the retail project, such as
+   * `projects/{project_id_or_number}/retailProject`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Full resource name of the retail project, such as
+   * `projects/{project_id_or_number}/retailProject`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENROLLED_SOLUTIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List enrolledSolutions_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.retail.v2alpha.SolutionType> + enrolledSolutions_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.retail.v2alpha.SolutionType>() { + public com.google.cloud.retail.v2alpha.SolutionType convert(java.lang.Integer from) { + com.google.cloud.retail.v2alpha.SolutionType result = + com.google.cloud.retail.v2alpha.SolutionType.forNumber(from); + return result == null + ? com.google.cloud.retail.v2alpha.SolutionType.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Output only. Retail API solutions that the project has enrolled.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enrolledSolutions. + */ + @java.lang.Override + public java.util.List getEnrolledSolutionsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.retail.v2alpha.SolutionType>( + enrolledSolutions_, enrolledSolutions_converter_); + } + /** + * + * + *
+   * Output only. Retail API solutions that the project has enrolled.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of enrolledSolutions. + */ + @java.lang.Override + public int getEnrolledSolutionsCount() { + return enrolledSolutions_.size(); + } + /** + * + * + *
+   * Output only. Retail API solutions that the project has enrolled.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The enrolledSolutions at the given index. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.SolutionType getEnrolledSolutions(int index) { + return enrolledSolutions_converter_.convert(enrolledSolutions_.get(index)); + } + /** + * + * + *
+   * Output only. Retail API solutions that the project has enrolled.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for enrolledSolutions. + */ + @java.lang.Override + public java.util.List getEnrolledSolutionsValueList() { + return enrolledSolutions_; + } + /** + * + * + *
+   * Output only. Retail API solutions that the project has enrolled.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enrolledSolutions at the given index. + */ + @java.lang.Override + public int getEnrolledSolutionsValue(int index) { + return enrolledSolutions_.get(index); + } + + private int enrolledSolutionsMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (getEnrolledSolutionsList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(enrolledSolutionsMemoizedSerializedSize); + } + for (int i = 0; i < enrolledSolutions_.size(); i++) { + output.writeEnumNoTag(enrolledSolutions_.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < enrolledSolutions_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(enrolledSolutions_.get(i)); + } + size += dataSize; + if (!getEnrolledSolutionsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + enrolledSolutionsMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.Project)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.Project other = (com.google.cloud.retail.v2alpha.Project) obj; + + if (!getName().equals(other.getName())) return false; + if (!enrolledSolutions_.equals(other.enrolledSolutions_)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getEnrolledSolutionsCount() > 0) { + hash = (37 * hash) + ENROLLED_SOLUTIONS_FIELD_NUMBER; + hash = (53 * hash) + enrolledSolutions_.hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.Project parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Project parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Project parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Project parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Project parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Project parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Project parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Project parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Project parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Project parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Project parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Project parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.Project prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata that describes a Cloud Retail Project.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.Project} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.Project) + com.google.cloud.retail.v2alpha.ProjectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_Project_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_Project_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Project.class, + com.google.cloud.retail.v2alpha.Project.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.Project.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + enrolledSolutions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ProjectProto + .internal_static_google_cloud_retail_v2alpha_Project_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Project getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.Project.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Project build() { + com.google.cloud.retail.v2alpha.Project result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Project buildPartial() { + com.google.cloud.retail.v2alpha.Project result = + new com.google.cloud.retail.v2alpha.Project(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.retail.v2alpha.Project result) { + if (((bitField0_ & 0x00000002) != 0)) { + enrolledSolutions_ = java.util.Collections.unmodifiableList(enrolledSolutions_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.enrolledSolutions_ = enrolledSolutions_; + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.Project result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.Project) { + return mergeFrom((com.google.cloud.retail.v2alpha.Project) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.Project other) { + if (other == com.google.cloud.retail.v2alpha.Project.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.enrolledSolutions_.isEmpty()) { + if (enrolledSolutions_.isEmpty()) { + enrolledSolutions_ = other.enrolledSolutions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEnrolledSolutionsIsMutable(); + enrolledSolutions_.addAll(other.enrolledSolutions_); + } + 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 16: + { + int tmpRaw = input.readEnum(); + ensureEnrolledSolutionsIsMutable(); + enrolledSolutions_.add(tmpRaw); + break; + } // case 16 + case 18: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureEnrolledSolutionsIsMutable(); + enrolledSolutions_.add(tmpRaw); + } + input.popLimit(oldLimit); + 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_ = ""; + /** + * + * + *
+     * Output only. Full resource name of the retail project, such as
+     * `projects/{project_id_or_number}/retailProject`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Full resource name of the retail project, such as
+     * `projects/{project_id_or_number}/retailProject`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Full resource name of the retail project, such as
+     * `projects/{project_id_or_number}/retailProject`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Full resource name of the retail project, such as
+     * `projects/{project_id_or_number}/retailProject`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Full resource name of the retail project, such as
+     * `projects/{project_id_or_number}/retailProject`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List enrolledSolutions_ = + java.util.Collections.emptyList(); + + private void ensureEnrolledSolutionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + enrolledSolutions_ = new java.util.ArrayList(enrolledSolutions_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Output only. Retail API solutions that the project has enrolled.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enrolledSolutions. + */ + public java.util.List getEnrolledSolutionsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.retail.v2alpha.SolutionType>( + enrolledSolutions_, enrolledSolutions_converter_); + } + /** + * + * + *
+     * Output only. Retail API solutions that the project has enrolled.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of enrolledSolutions. + */ + public int getEnrolledSolutionsCount() { + return enrolledSolutions_.size(); + } + /** + * + * + *
+     * Output only. Retail API solutions that the project has enrolled.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The enrolledSolutions at the given index. + */ + public com.google.cloud.retail.v2alpha.SolutionType getEnrolledSolutions(int index) { + return enrolledSolutions_converter_.convert(enrolledSolutions_.get(index)); + } + /** + * + * + *
+     * Output only. Retail API solutions that the project has enrolled.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The enrolledSolutions to set. + * @return This builder for chaining. + */ + public Builder setEnrolledSolutions( + int index, com.google.cloud.retail.v2alpha.SolutionType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnrolledSolutionsIsMutable(); + enrolledSolutions_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Retail API solutions that the project has enrolled.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enrolledSolutions to add. + * @return This builder for chaining. + */ + public Builder addEnrolledSolutions(com.google.cloud.retail.v2alpha.SolutionType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnrolledSolutionsIsMutable(); + enrolledSolutions_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Retail API solutions that the project has enrolled.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The enrolledSolutions to add. + * @return This builder for chaining. + */ + public Builder addAllEnrolledSolutions( + java.lang.Iterable values) { + ensureEnrolledSolutionsIsMutable(); + for (com.google.cloud.retail.v2alpha.SolutionType value : values) { + enrolledSolutions_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Retail API solutions that the project has enrolled.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnrolledSolutions() { + enrolledSolutions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Retail API solutions that the project has enrolled.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for enrolledSolutions. + */ + public java.util.List getEnrolledSolutionsValueList() { + return java.util.Collections.unmodifiableList(enrolledSolutions_); + } + /** + * + * + *
+     * Output only. Retail API solutions that the project has enrolled.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enrolledSolutions at the given index. + */ + public int getEnrolledSolutionsValue(int index) { + return enrolledSolutions_.get(index); + } + /** + * + * + *
+     * Output only. Retail API solutions that the project has enrolled.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for enrolledSolutions to set. + * @return This builder for chaining. + */ + public Builder setEnrolledSolutionsValue(int index, int value) { + ensureEnrolledSolutionsIsMutable(); + enrolledSolutions_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Retail API solutions that the project has enrolled.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for enrolledSolutions to add. + * @return This builder for chaining. + */ + public Builder addEnrolledSolutionsValue(int value) { + ensureEnrolledSolutionsIsMutable(); + enrolledSolutions_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Retail API solutions that the project has enrolled.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The enum numeric values on the wire for enrolledSolutions to add. + * @return This builder for chaining. + */ + public Builder addAllEnrolledSolutionsValue(java.lang.Iterable values) { + ensureEnrolledSolutionsIsMutable(); + for (int value : values) { + enrolledSolutions_.add(value); + } + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.Project) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.Project) + private static final com.google.cloud.retail.v2alpha.Project DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.Project(); + } + + public static com.google.cloud.retail.v2alpha.Project getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Project parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.Project getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProjectName.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProjectName.java new file mode 100644 index 000000000000..827c76754168 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProjectName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +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 ProjectName implements ResourceName { + private static final PathTemplate PROJECT = + PathTemplate.createWithoutUrlEncoding("projects/{project}"); + private volatile Map fieldValuesMap; + private final String project; + + @Deprecated + protected ProjectName() { + project = null; + } + + private ProjectName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProjectName of(String project) { + return newBuilder().setProject(project).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + public static ProjectName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT.validatedMatch( + formattedString, "ProjectName.parse: formattedString not in valid format"); + return of(matchMap.get("project")); + } + + 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 (ProjectName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT.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); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT.instantiate("project", project); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ProjectName that = ((ProjectName) o); + return Objects.equals(this.project, that.project); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** Builder for projects/{project}. */ + public static class Builder { + private String project; + + protected Builder() {} + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder(ProjectName projectName) { + this.project = projectName.project; + } + + public ProjectName build() { + return new ProjectName(this); + } + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProjectOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProjectOrBuilder.java new file mode 100644 index 000000000000..fb2e26d77dc9 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProjectOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface ProjectOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.Project) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Full resource name of the retail project, such as
+   * `projects/{project_id_or_number}/retailProject`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Full resource name of the retail project, such as
+   * `projects/{project_id_or_number}/retailProject`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Retail API solutions that the project has enrolled.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enrolledSolutions. + */ + java.util.List getEnrolledSolutionsList(); + /** + * + * + *
+   * Output only. Retail API solutions that the project has enrolled.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of enrolledSolutions. + */ + int getEnrolledSolutionsCount(); + /** + * + * + *
+   * Output only. Retail API solutions that the project has enrolled.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The enrolledSolutions at the given index. + */ + com.google.cloud.retail.v2alpha.SolutionType getEnrolledSolutions(int index); + /** + * + * + *
+   * Output only. Retail API solutions that the project has enrolled.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for enrolledSolutions. + */ + java.util.List getEnrolledSolutionsValueList(); + /** + * + * + *
+   * Output only. Retail API solutions that the project has enrolled.
+   * 
+ * + * + * repeated .google.cloud.retail.v2alpha.SolutionType enrolled_solutions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enrolledSolutions at the given index. + */ + int getEnrolledSolutionsValue(int index); +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProjectProto.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProjectProto.java new file mode 100644 index 000000000000..f9cb9afa9f4b --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProjectProto.java @@ -0,0 +1,198 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public final class ProjectProto { + private ProjectProto() {} + + 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_retail_v2alpha_LoggingConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_LoggingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_LoggingConfig_LogGenerationRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_LoggingConfig_LogGenerationRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_LoggingConfig_ServiceLogGenerationRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_LoggingConfig_ServiceLogGenerationRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_Project_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_Project_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_AlertConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_AlertConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_Recipient_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_Recipient_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/retail/v2alpha/project.pr" + + "oto\022\033google.cloud.retail.v2alpha\032\037google" + + "/api/field_behavior.proto\032\031google/api/re" + + "source.proto\032(google/cloud/retail/v2alph" + + "a/common.proto\"\375\005\n\rLoggingConfig\022\024\n\004name" + + "\030\001 \001(\tB\006\340A\002\340A\005\022a\n\033default_log_generation" + + "_rule\030\002 \001(\0132<.google.cloud.retail.v2alph" + + "a.LoggingConfig.LogGenerationRule\022i\n\034ser" + + "vice_log_generation_rules\030\004 \003(\0132C.google" + + ".cloud.retail.v2alpha.LoggingConfig.Serv" + + "iceLogGenerationRule\032\237\001\n\021LogGenerationRu" + + "le\022N\n\rlogging_level\030\001 \001(\01627.google.cloud" + + ".retail.v2alpha.LoggingConfig.LoggingLev" + + "el\022!\n\024info_log_sample_rate\030\002 \001(\002H\000\210\001\001B\027\n" + + "\025_info_log_sample_rate\032\220\001\n\030ServiceLogGen" + + "erationRule\022\031\n\014service_name\030\001 \001(\tB\003\340A\002\022Y" + + "\n\023log_generation_rule\030\003 \001(\0132<.google.clo" + + "ud.retail.v2alpha.LoggingConfig.LogGener" + + "ationRule\"\206\001\n\014LoggingLevel\022\035\n\031LOGGING_LE" + + "VEL_UNSPECIFIED\020\000\022\024\n\020LOGGING_DISABLED\020\001\022" + + "\030\n\024LOG_ERRORS_AND_ABOVE\020\002\022\032\n\026LOG_WARNING" + + "S_AND_ABOVE\020\003\022\013\n\007LOG_ALL\020\004:J\352AG\n#retail." + + "googleapis.com/LoggingConfig\022 projects/{" + + "project}/loggingConfig\"\264\001\n\007Project\022\021\n\004na" + + "me\030\001 \001(\tB\003\340A\003\022J\n\022enrolled_solutions\030\002 \003(" + + "\0162).google.cloud.retail.v2alpha.Solution" + + "TypeB\003\340A\003:J\352AG\n#retail.googleapis.com/Re" + + "tailProject\022 projects/{project}/retailPr" + + "oject\"\373\003\n\013AlertConfig\022\024\n\004name\030\001 \001(\tB\006\340A\002" + + "\340A\005\022L\n\016alert_policies\030\002 \003(\01324.google.clo" + + "ud.retail.v2alpha.AlertConfig.AlertPolic" + + "y\032\277\002\n\013AlertPolicy\022\023\n\013alert_group\030\001 \001(\t\022X" + + "\n\renroll_status\030\002 \001(\0162A.google.cloud.ret" + + "ail.v2alpha.AlertConfig.AlertPolicy.Enro" + + "llStatus\022R\n\nrecipients\030\003 \003(\0132>.google.cl" + + "oud.retail.v2alpha.AlertConfig.AlertPoli" + + "cy.Recipient\032\"\n\tRecipient\022\025\n\remail_addre" + + "ss\030\001 \001(\t\"I\n\014EnrollStatus\022\035\n\031ENROLL_STATU" + + "S_UNSPECIFIED\020\000\022\014\n\010ENROLLED\020\001\022\014\n\010DECLINE" + + "D\020\002:F\352AC\n!retail.googleapis.com/AlertCon" + + "fig\022\036projects/{project}/alertConfigB\320\001\n\037" + + "com.google.cloud.retail.v2alphaB\014Project" + + "ProtoP\001Z7cloud.google.com/go/retail/apiv" + + "2alpha/retailpb;retailpb\242\002\006RETAIL\252\002\033Goog" + + "le.Cloud.Retail.V2Alpha\312\002\033Google\\Cloud\\R" + + "etail\\V2alpha\352\002\036Google::Cloud::Retail::V" + + "2alphab\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.retail.v2alpha.CommonProto.getDescriptor(), + }); + internal_static_google_cloud_retail_v2alpha_LoggingConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_retail_v2alpha_LoggingConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_LoggingConfig_descriptor, + new java.lang.String[] { + "Name", "DefaultLogGenerationRule", "ServiceLogGenerationRules", + }); + internal_static_google_cloud_retail_v2alpha_LoggingConfig_LogGenerationRule_descriptor = + internal_static_google_cloud_retail_v2alpha_LoggingConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_retail_v2alpha_LoggingConfig_LogGenerationRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_LoggingConfig_LogGenerationRule_descriptor, + new java.lang.String[] { + "LoggingLevel", "InfoLogSampleRate", + }); + internal_static_google_cloud_retail_v2alpha_LoggingConfig_ServiceLogGenerationRule_descriptor = + internal_static_google_cloud_retail_v2alpha_LoggingConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_retail_v2alpha_LoggingConfig_ServiceLogGenerationRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_LoggingConfig_ServiceLogGenerationRule_descriptor, + new java.lang.String[] { + "ServiceName", "LogGenerationRule", + }); + internal_static_google_cloud_retail_v2alpha_Project_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_retail_v2alpha_Project_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_Project_descriptor, + new java.lang.String[] { + "Name", "EnrolledSolutions", + }); + internal_static_google_cloud_retail_v2alpha_AlertConfig_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_retail_v2alpha_AlertConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_AlertConfig_descriptor, + new java.lang.String[] { + "Name", "AlertPolicies", + }); + internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_descriptor = + internal_static_google_cloud_retail_v2alpha_AlertConfig_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_descriptor, + new java.lang.String[] { + "AlertGroup", "EnrollStatus", "Recipients", + }); + internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_Recipient_descriptor = + internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_Recipient_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_AlertConfig_AlertPolicy_Recipient_descriptor, + new java.lang.String[] { + "EmailAddress", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.retail.v2alpha.CommonProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProjectServiceProto.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProjectServiceProto.java new file mode 100644 index 000000000000..74c0dd48974f --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProjectServiceProto.java @@ -0,0 +1,292 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public final class ProjectServiceProto { + private ProjectServiceProto() {} + + 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_retail_v2alpha_GetProjectRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_GetProjectRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_AcceptTermsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_AcceptTermsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_EnrollSolutionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_EnrollSolutionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_EnrollSolutionResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_EnrollSolutionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_EnrollSolutionMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_EnrollSolutionMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_GetLoggingConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_GetLoggingConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_UpdateLoggingConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_UpdateLoggingConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_GetAlertConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_GetAlertConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_UpdateAlertConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_UpdateAlertConfigRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/retail/v2alpha/project_se" + + "rvice.proto\022\033google.cloud.retail.v2alpha" + + "\032\034google/api/annotations.proto\032\027google/a" + + "pi/client.proto\032\037google/api/field_behavi" + + "or.proto\032\031google/api/resource.proto\032(goo" + + "gle/cloud/retail/v2alpha/common.proto\032)g" + + "oogle/cloud/retail/v2alpha/project.proto" + + "\032#google/longrunning/operations.proto\032 g" + + "oogle/protobuf/field_mask.proto\"N\n\021GetPr" + + "ojectRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#reta" + + "il.googleapis.com/RetailProject\"R\n\022Accep" + + "tTermsRequest\022<\n\007project\030\001 \001(\tB+\340A\002\372A%\n#" + + "retail.googleapis.com/RetailProject\"\237\001\n\025" + + "EnrollSolutionRequest\022D\n\007project\030\001 \001(\tB3" + + "\340A\002\372A-\n+cloudresourcemanager.googleapis." + + "com/Project\022@\n\010solution\030\002 \001(\0162).google.c" + + "loud.retail.v2alpha.SolutionTypeB\003\340A\002\"^\n" + + "\026EnrollSolutionResponse\022D\n\021enrolled_solu" + + "tion\030\001 \001(\0162).google.cloud.retail.v2alpha" + + ".SolutionType\"\030\n\026EnrollSolutionMetadata\"" + + "c\n\034ListEnrolledSolutionsRequest\022C\n\006paren" + + "t\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.go" + + "ogleapis.com/Project\"f\n\035ListEnrolledSolu" + + "tionsResponse\022E\n\022enrolled_solutions\030\001 \003(" + + "\0162).google.cloud.retail.v2alpha.Solution" + + "Type\"T\n\027GetLoggingConfigRequest\0229\n\004name\030" + + "\001 \001(\tB+\340A\002\372A%\n#retail.googleapis.com/Log" + + "gingConfig\"\226\001\n\032UpdateLoggingConfigReques" + + "t\022G\n\016logging_config\030\001 \001(\0132*.google.cloud" + + ".retail.v2alpha.LoggingConfigB\003\340A\002\022/\n\013up" + + "date_mask\030\002 \001(\0132\032.google.protobuf.FieldM" + + "ask\"P\n\025GetAlertConfigRequest\0227\n\004name\030\001 \001" + + "(\tB)\340A\002\372A#\n!retail.googleapis.com/AlertC" + + "onfig\"\220\001\n\030UpdateAlertConfigRequest\022C\n\014al" + + "ert_config\030\001 \001(\0132(.google.cloud.retail.v" + + "2alpha.AlertConfigB\003\340A\002\022/\n\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMask2\253\r\n\016Pro" + + "jectService\022\233\001\n\nGetProject\022..google.clou" + + "d.retail.v2alpha.GetProjectRequest\032$.goo" + + "gle.cloud.retail.v2alpha.Project\"7\332A\004nam" + + "e\202\323\344\223\002*\022(/v2alpha/{name=projects/*/retai" + + "lProject}\022\262\001\n\013AcceptTerms\022/.google.cloud" + + ".retail.v2alpha.AcceptTermsRequest\032$.goo" + + "gle.cloud.retail.v2alpha.Project\"L\332A\007pro" + + "ject\202\323\344\223\002<\"7/v2alpha/{project=projects/*" + + "/retailProject}:acceptTerms:\001*\022\210\002\n\016Enrol" + + "lSolution\0222.google.cloud.retail.v2alpha." + + "EnrollSolutionRequest\032\035.google.longrunni" + + "ng.Operation\"\242\001\312Ah\n2google.cloud.retail." + + "v2alpha.EnrollSolutionResponse\0222google.c" + + "loud.retail.v2alpha.EnrollSolutionMetada" + + "ta\202\323\344\223\0021\",/v2alpha/{project=projects/*}:" + + "enrollSolution:\001*\022\317\001\n\025ListEnrolledSoluti" + + "ons\0229.google.cloud.retail.v2alpha.ListEn" + + "rolledSolutionsRequest\032:.google.cloud.re" + + "tail.v2alpha.ListEnrolledSolutionsRespon" + + "se\"?\332A\006parent\202\323\344\223\0020\022./v2alpha/{parent=pr" + + "ojects/*}:enrolledSolutions\022\255\001\n\020GetLoggi" + + "ngConfig\0224.google.cloud.retail.v2alpha.G" + + "etLoggingConfigRequest\032*.google.cloud.re" + + "tail.v2alpha.LoggingConfig\"7\332A\004name\202\323\344\223\002" + + "*\022(/v2alpha/{name=projects/*/loggingConf" + + "ig}\022\350\001\n\023UpdateLoggingConfig\0227.google.clo" + + "ud.retail.v2alpha.UpdateLoggingConfigReq" + + "uest\032*.google.cloud.retail.v2alpha.Loggi" + + "ngConfig\"l\332A\032logging_config,update_mask\202" + + "\323\344\223\002I27/v2alpha/{logging_config.name=pro" + + "jects/*/loggingConfig}:\016logging_config\022\245" + + "\001\n\016GetAlertConfig\0222.google.cloud.retail." + + "v2alpha.GetAlertConfigRequest\032(.google.c" + + "loud.retail.v2alpha.AlertConfig\"5\332A\004name" + + "\202\323\344\223\002(\022&/v2alpha/{name=projects/*/alertC" + + "onfig}\022\332\001\n\021UpdateAlertConfig\0225.google.cl" + + "oud.retail.v2alpha.UpdateAlertConfigRequ" + + "est\032(.google.cloud.retail.v2alpha.AlertC" + + "onfig\"d\332A\030alert_config,update_mask\202\323\344\223\002C" + + "23/v2alpha/{alert_config.name=projects/*" + + "/alertConfig}:\014alert_config\032I\312A\025retail.g" + + "oogleapis.com\322A.https://www.googleapis.c" + + "om/auth/cloud-platformB\327\001\n\037com.google.cl" + + "oud.retail.v2alphaB\023ProjectServiceProtoP" + + "\001Z7cloud.google.com/go/retail/apiv2alpha" + + "/retailpb;retailpb\242\002\006RETAIL\252\002\033Google.Clo" + + "ud.Retail.V2Alpha\312\002\033Google\\Cloud\\Retail\\" + + "V2alpha\352\002\036Google::Cloud::Retail::V2alpha" + + "b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.retail.v2alpha.CommonProto.getDescriptor(), + com.google.cloud.retail.v2alpha.ProjectProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_retail_v2alpha_GetProjectRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_retail_v2alpha_GetProjectRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_GetProjectRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_retail_v2alpha_AcceptTermsRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_retail_v2alpha_AcceptTermsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_AcceptTermsRequest_descriptor, + new java.lang.String[] { + "Project", + }); + internal_static_google_cloud_retail_v2alpha_EnrollSolutionRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_retail_v2alpha_EnrollSolutionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_EnrollSolutionRequest_descriptor, + new java.lang.String[] { + "Project", "Solution", + }); + internal_static_google_cloud_retail_v2alpha_EnrollSolutionResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_retail_v2alpha_EnrollSolutionResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_EnrollSolutionResponse_descriptor, + new java.lang.String[] { + "EnrolledSolution", + }); + internal_static_google_cloud_retail_v2alpha_EnrollSolutionMetadata_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_retail_v2alpha_EnrollSolutionMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_EnrollSolutionMetadata_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsRequest_descriptor, + new java.lang.String[] { + "Parent", + }); + internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_ListEnrolledSolutionsResponse_descriptor, + new java.lang.String[] { + "EnrolledSolutions", + }); + internal_static_google_cloud_retail_v2alpha_GetLoggingConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_retail_v2alpha_GetLoggingConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_GetLoggingConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_retail_v2alpha_UpdateLoggingConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_retail_v2alpha_UpdateLoggingConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_UpdateLoggingConfigRequest_descriptor, + new java.lang.String[] { + "LoggingConfig", "UpdateMask", + }); + internal_static_google_cloud_retail_v2alpha_GetAlertConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_retail_v2alpha_GetAlertConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_GetAlertConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_retail_v2alpha_UpdateAlertConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_retail_v2alpha_UpdateAlertConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_UpdateAlertConfigRequest_descriptor, + new java.lang.String[] { + "AlertConfig", "UpdateMask", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.retail.v2alpha.CommonProto.getDescriptor(); + com.google.cloud.retail.v2alpha.ProjectProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Promotion.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Promotion.java index 24fa4f655d9a..9aaa6930dea3 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Promotion.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Promotion.java @@ -78,8 +78,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -109,8 +109,8 @@ public java.lang.String getPromotionId() { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -483,8 +483,8 @@ public Builder mergeFrom( * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -513,8 +513,8 @@ public java.lang.String getPromotionId() { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -543,8 +543,8 @@ public com.google.protobuf.ByteString getPromotionIdBytes() { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -572,8 +572,8 @@ public Builder setPromotionId(java.lang.String value) { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -597,8 +597,8 @@ public Builder clearPromotionId() { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PromotionOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PromotionOrBuilder.java index 1cc90e028aba..2b188fa15948 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PromotionOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PromotionOrBuilder.java @@ -35,8 +35,8 @@ public interface PromotionOrBuilder * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -55,8 +55,8 @@ public interface PromotionOrBuilder * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RetailProjectName.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RetailProjectName.java new file mode 100644 index 000000000000..2ee9e20b306b --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RetailProjectName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha; + +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 RetailProjectName implements ResourceName { + private static final PathTemplate PROJECT = + PathTemplate.createWithoutUrlEncoding("projects/{project}/retailProject"); + private volatile Map fieldValuesMap; + private final String project; + + @Deprecated + protected RetailProjectName() { + project = null; + } + + private RetailProjectName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RetailProjectName of(String project) { + return newBuilder().setProject(project).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + public static RetailProjectName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT.validatedMatch( + formattedString, "RetailProjectName.parse: formattedString not in valid format"); + return of(matchMap.get("project")); + } + + 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 (RetailProjectName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT.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); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT.instantiate("project", project); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + RetailProjectName that = ((RetailProjectName) o); + return Objects.equals(this.project, that.project); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** Builder for projects/{project}/retailProject. */ + public static class Builder { + private String project; + + protected Builder() {} + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder(RetailProjectName retailProjectName) { + this.project = retailProjectName.project; + } + + public RetailProjectName build() { + return new RetailProjectName(this); + } + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rule.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rule.java index 4014eab416ae..c70e7162049b 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rule.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rule.java @@ -1027,9 +1027,8 @@ public interface FilterActionOrBuilder * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1053,9 +1052,8 @@ public interface FilterActionOrBuilder * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1075,17 +1073,19 @@ public interface FilterActionOrBuilder * *
    * * Rule Condition:
-   *   - No
-   *   [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
-   *   provided is a global match.
-   *   - 1 or more
-   *   [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
-   *   provided are combined with OR operator.
+   *     - No
+   *     [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
+   *     provided is a global match.
+   *     - 1 or more
+   *     [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
+   *     provided are combined with OR operator.
+   *
    * * Action Input: The request query and filter that are applied to the
    * retrieved products, in addition to any filters already provided with the
    * SearchRequest. The AND operator is used to combine the query's existing
    * filters with the filter rule(s). NOTE: May result in 0 results when
    * filters conflict.
+   *
    * * Action Result: Filters the returned objects to be ONLY those that passed
    * the filter.
    * 
@@ -1141,9 +1141,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1178,9 +1177,8 @@ public java.lang.String getFilter() { * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1371,17 +1369,19 @@ protected Builder newBuilderForType( * *
      * * Rule Condition:
-     *   - No
-     *   [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
-     *   provided is a global match.
-     *   - 1 or more
-     *   [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
-     *   provided are combined with OR operator.
+     *     - No
+     *     [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
+     *     provided is a global match.
+     *     - 1 or more
+     *     [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
+     *     provided are combined with OR operator.
+     *
      * * Action Input: The request query and filter that are applied to the
      * retrieved products, in addition to any filters already provided with the
      * SearchRequest. The AND operator is used to combine the query's existing
      * filters with the filter rule(s). NOTE: May result in 0 results when
      * filters conflict.
+     *
      * * Action Result: Filters the returned objects to be ONLY those that passed
      * the filter.
      * 
@@ -1576,9 +1576,8 @@ public Builder mergeFrom( * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1612,9 +1611,8 @@ public java.lang.String getFilter() { * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1648,9 +1646,8 @@ public com.google.protobuf.ByteString getFilterBytes() { * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1683,9 +1680,8 @@ public Builder setFilter(java.lang.String value) { * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1714,9 +1710,8 @@ public Builder clearFilter() { * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1842,7 +1837,7 @@ public interface RedirectActionOrBuilder * Redirects a shopper to a specific page. * * * Rule Condition: - * - Must specify + * Must specify * [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]. * * Action Input: Request Query * * Action Result: Redirects shopper to provided uri. @@ -2104,7 +2099,7 @@ protected Builder newBuilderForType( * Redirects a shopper to a specific page. * * * Rule Condition: - * - Must specify + * Must specify * [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]. * * Action Input: Request Query * * Action Result: Redirects shopper to provided uri. @@ -8230,211 +8225,3095 @@ public com.google.cloud.retail.v2alpha.Rule.IgnoreAction getDefaultInstanceForTy } } - private int bitField0_; - private int actionCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object action_; - - public enum ActionCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - BOOST_ACTION(2), - REDIRECT_ACTION(3), - ONEWAY_SYNONYMS_ACTION(6), - DO_NOT_ASSOCIATE_ACTION(7), - REPLACEMENT_ACTION(8), - IGNORE_ACTION(9), - FILTER_ACTION(10), - TWOWAY_SYNONYMS_ACTION(11), - ACTION_NOT_SET(0); - private final int value; + public interface ForceReturnFacetActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) + com.google.protobuf.MessageOrBuilder { - private ActionCase(int value) { - this.value = value; - } /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * */ - @java.lang.Deprecated - public static ActionCase valueOf(int value) { - return forNumber(value); - } - - public static ActionCase forNumber(int value) { - switch (value) { - case 2: - return BOOST_ACTION; - case 3: - return REDIRECT_ACTION; - case 6: - return ONEWAY_SYNONYMS_ACTION; - case 7: - return DO_NOT_ASSOCIATE_ACTION; - case 8: - return REPLACEMENT_ACTION; - case 9: - return IGNORE_ACTION; - case 10: - return FILTER_ACTION; - case 11: - return TWOWAY_SYNONYMS_ACTION; - case 0: - return ACTION_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ActionCase getActionCase() { - return ActionCase.forNumber(actionCase_); + java.util.List< + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment> + getFacetPositionAdjustmentsList(); + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getFacetPositionAdjustments(int index); + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + int getFacetPositionAdjustmentsCount(); + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder> + getFacetPositionAdjustmentsOrBuilderList(); + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustmentOrBuilder + getFacetPositionAdjustmentsOrBuilder(int index); } - - public static final int BOOST_ACTION_FIELD_NUMBER = 2; /** * * *
-   * A boost action.
-   * 
- * - * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; - * - * @return Whether the boostAction field is set. - */ - @java.lang.Override - public boolean hasBoostAction() { - return actionCase_ == 2; - } - /** + * Force returns an attribute/facet in the request around a certain position + * or above. * - * - *
-   * A boost action.
+   * * Rule Condition:
+   *   Must specify non-empty
+   *   [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
+   *   (for search only) or
+   *   [Condition.page_categories][google.cloud.retail.v2alpha.Condition.page_categories]
+   *   (for browse only), but can't specify both.
+   *
+   * * Action Inputs: attribute name, position
+   *
+   * * Action Result: Will force return a facet key around a certain position
+   * or above if the condition is satisfied.
+   *
+   * Example: Suppose the query is "shoes", the
+   * [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
+   * is "shoes", the
+   * [ForceReturnFacetAction.FacetPositionAdjustment.attribute_name][google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment.attribute_name]
+   * is "size" and the
+   * [ForceReturnFacetAction.FacetPositionAdjustment.position][google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment.position]
+   * is 8.
+   *
+   * Two cases: a) The facet key "size" is not already in the top 8 slots, then
+   * the facet "size" will appear at a position close to 8. b) The facet key
+   * "size" in among the top 8 positions in the request, then it will stay at
+   * its current rank.
    * 
* - * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; - * - * @return The boostAction. + * Protobuf type {@code google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction} */ - @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.BoostAction getBoostAction() { - if (actionCase_ == 2) { - return (com.google.cloud.retail.v2alpha.Rule.BoostAction) action_; + public static final class ForceReturnFacetAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) + ForceReturnFacetActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ForceReturnFacetAction.newBuilder() to construct. + private ForceReturnFacetAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - return com.google.cloud.retail.v2alpha.Rule.BoostAction.getDefaultInstance(); - } - /** - * - * - *
-   * A boost action.
-   * 
- * - * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; - */ - @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.BoostActionOrBuilder getBoostActionOrBuilder() { - if (actionCase_ == 2) { - return (com.google.cloud.retail.v2alpha.Rule.BoostAction) action_; + + private ForceReturnFacetAction() { + facetPositionAdjustments_ = java.util.Collections.emptyList(); } - return com.google.cloud.retail.v2alpha.Rule.BoostAction.getDefaultInstance(); - } - public static final int REDIRECT_ACTION_FIELD_NUMBER = 3; - /** - * - * - *
-   * Redirects a shopper to a specific page.
-   * 
- * - * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; - * - * @return Whether the redirectAction field is set. - */ - @java.lang.Override - public boolean hasRedirectAction() { - return actionCase_ == 3; - } - /** - * - * - *
-   * Redirects a shopper to a specific page.
-   * 
- * - * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; - * - * @return The redirectAction. - */ - @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.RedirectAction getRedirectAction() { - if (actionCase_ == 3) { - return (com.google.cloud.retail.v2alpha.Rule.RedirectAction) action_; + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ForceReturnFacetAction(); } - return com.google.cloud.retail.v2alpha.Rule.RedirectAction.getDefaultInstance(); - } - /** - * - * - *
-   * Redirects a shopper to a specific page.
-   * 
- * - * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; - */ - @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.RedirectActionOrBuilder getRedirectActionOrBuilder() { - if (actionCase_ == 3) { - return (com.google.cloud.retail.v2alpha.Rule.RedirectAction) action_; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_descriptor; } - return com.google.cloud.retail.v2alpha.Rule.RedirectAction.getDefaultInstance(); - } - public static final int ONEWAY_SYNONYMS_ACTION_FIELD_NUMBER = 6; - /** - * - * - *
-   * Treats specific term as a synonym with a group of terms.
-   * Group of terms will not be treated as synonyms with the specific term.
-   * 
- * - * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * - * @return Whether the onewaySynonymsAction field is set. - */ - @java.lang.Override - public boolean hasOnewaySynonymsAction() { - return actionCase_ == 6; - } - /** - * - * - *
-   * Treats specific term as a synonym with a group of terms.
-   * Group of terms will not be treated as synonyms with the specific term.
-   * 
- * - * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * - * @return The onewaySynonymsAction. - */ - @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction getOnewaySynonymsAction() { - if (actionCase_ == 6) { - return (com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction) action_; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.class, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.Builder.class); } - return com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.getDefaultInstance(); + + public interface FacetPositionAdjustmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The attribute name to force return as a facet. Each attribute name
+       * should be a valid attribute name, be non-empty and contain at most 80
+       * characters long.
+       * 
+ * + * string attribute_name = 1; + * + * @return The attributeName. + */ + java.lang.String getAttributeName(); + /** + * + * + *
+       * The attribute name to force return as a facet. Each attribute name
+       * should be a valid attribute name, be non-empty and contain at most 80
+       * characters long.
+       * 
+ * + * string attribute_name = 1; + * + * @return The bytes for attributeName. + */ + com.google.protobuf.ByteString getAttributeNameBytes(); + + /** + * + * + *
+       * This is the position in the request as explained above. It should be
+       * strictly positive be at most 100.
+       * 
+ * + * int32 position = 2; + * + * @return The position. + */ + int getPosition(); + } + /** + * + * + *
+     * Each facet position adjustment consists of a single attribute name (i.e.
+     * facet key) along with a specified position.
+     * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment} + */ + public static final class FacetPositionAdjustment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + FacetPositionAdjustmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use FacetPositionAdjustment.newBuilder() to construct. + private FacetPositionAdjustment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FacetPositionAdjustment() { + attributeName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FacetPositionAdjustment(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_FacetPositionAdjustment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .class, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder.class); + } + + public static final int ATTRIBUTE_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object attributeName_ = ""; + /** + * + * + *
+       * The attribute name to force return as a facet. Each attribute name
+       * should be a valid attribute name, be non-empty and contain at most 80
+       * characters long.
+       * 
+ * + * string attribute_name = 1; + * + * @return The attributeName. + */ + @java.lang.Override + public java.lang.String getAttributeName() { + java.lang.Object ref = attributeName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeName_ = s; + return s; + } + } + /** + * + * + *
+       * The attribute name to force return as a facet. Each attribute name
+       * should be a valid attribute name, be non-empty and contain at most 80
+       * characters long.
+       * 
+ * + * string attribute_name = 1; + * + * @return The bytes for attributeName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttributeNameBytes() { + java.lang.Object ref = attributeName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POSITION_FIELD_NUMBER = 2; + private int position_ = 0; + /** + * + * + *
+       * This is the position in the request as explained above. It should be
+       * strictly positive be at most 100.
+       * 
+ * + * int32 position = 2; + * + * @return The position. + */ + @java.lang.Override + public int getPosition() { + return position_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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.GeneratedMessageV3.isStringEmpty(attributeName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeName_); + } + if (position_ != 0) { + output.writeInt32(2, position_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeName_); + } + if (position_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, 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.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment other = + (com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + obj; + + if (!getAttributeName().equals(other.getAttributeName())) return false; + if (getPosition() != other.getPosition()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ATTRIBUTE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAttributeName().hashCode(); + hash = (37 * hash) + POSITION_FIELD_NUMBER; + hash = (53 * hash) + getPosition(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Each facet position adjustment consists of a single attribute name (i.e.
+       * facet key) along with a specified position.
+       * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_FacetPositionAdjustment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment.class, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment.Builder.class); + } + + // Construct using + // com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeName_ = ""; + position_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + build() { + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + buildPartial() { + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + result = + new com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attributeName_ = attributeName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.position_ = position_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment) { + return mergeFrom( + (com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + other) { + if (other + == com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .getDefaultInstance()) return this; + if (!other.getAttributeName().isEmpty()) { + attributeName_ = other.attributeName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPosition() != 0) { + setPosition(other.getPosition()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attributeName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + position_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object attributeName_ = ""; + /** + * + * + *
+         * The attribute name to force return as a facet. Each attribute name
+         * should be a valid attribute name, be non-empty and contain at most 80
+         * characters long.
+         * 
+ * + * string attribute_name = 1; + * + * @return The attributeName. + */ + public java.lang.String getAttributeName() { + java.lang.Object ref = attributeName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The attribute name to force return as a facet. Each attribute name
+         * should be a valid attribute name, be non-empty and contain at most 80
+         * characters long.
+         * 
+ * + * string attribute_name = 1; + * + * @return The bytes for attributeName. + */ + public com.google.protobuf.ByteString getAttributeNameBytes() { + java.lang.Object ref = attributeName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The attribute name to force return as a facet. Each attribute name
+         * should be a valid attribute name, be non-empty and contain at most 80
+         * characters long.
+         * 
+ * + * string attribute_name = 1; + * + * @param value The attributeName to set. + * @return This builder for chaining. + */ + public Builder setAttributeName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + attributeName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The attribute name to force return as a facet. Each attribute name
+         * should be a valid attribute name, be non-empty and contain at most 80
+         * characters long.
+         * 
+ * + * string attribute_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearAttributeName() { + attributeName_ = getDefaultInstance().getAttributeName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * The attribute name to force return as a facet. Each attribute name
+         * should be a valid attribute name, be non-empty and contain at most 80
+         * characters long.
+         * 
+ * + * string attribute_name = 1; + * + * @param value The bytes for attributeName to set. + * @return This builder for chaining. + */ + public Builder setAttributeNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + attributeName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int position_; + /** + * + * + *
+         * This is the position in the request as explained above. It should be
+         * strictly positive be at most 100.
+         * 
+ * + * int32 position = 2; + * + * @return The position. + */ + @java.lang.Override + public int getPosition() { + return position_; + } + /** + * + * + *
+         * This is the position in the request as explained above. It should be
+         * strictly positive be at most 100.
+         * 
+ * + * int32 position = 2; + * + * @param value The position to set. + * @return This builder for chaining. + */ + public Builder setPosition(int value) { + + position_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * This is the position in the request as explained above. It should be
+         * strictly positive be at most 100.
+         * 
+ * + * int32 position = 2; + * + * @return This builder for chaining. + */ + public Builder clearPosition() { + bitField0_ = (bitField0_ & ~0x00000002); + position_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + private static final com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment(); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FacetPositionAdjustment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int FACET_POSITION_ADJUSTMENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment> + facetPositionAdjustments_; + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment> + getFacetPositionAdjustmentsList() { + return facetPositionAdjustments_; + } + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder> + getFacetPositionAdjustmentsOrBuilderList() { + return facetPositionAdjustments_; + } + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + @java.lang.Override + public int getFacetPositionAdjustmentsCount() { + return facetPositionAdjustments_.size(); + } + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getFacetPositionAdjustments(int index) { + return facetPositionAdjustments_.get(index); + } + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder + getFacetPositionAdjustmentsOrBuilder(int index) { + return facetPositionAdjustments_.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 < facetPositionAdjustments_.size(); i++) { + output.writeMessage(1, facetPositionAdjustments_.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 < facetPositionAdjustments_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, facetPositionAdjustments_.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.retail.v2alpha.Rule.ForceReturnFacetAction)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction other = + (com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) obj; + + if (!getFacetPositionAdjustmentsList().equals(other.getFacetPositionAdjustmentsList())) + 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 (getFacetPositionAdjustmentsCount() > 0) { + hash = (37 * hash) + FACET_POSITION_ADJUSTMENTS_FIELD_NUMBER; + hash = (53 * hash) + getFacetPositionAdjustmentsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.Rule.ForceReturnFacetAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Force returns an attribute/facet in the request around a certain position
+     * or above.
+     *
+     * * Rule Condition:
+     *   Must specify non-empty
+     *   [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
+     *   (for search only) or
+     *   [Condition.page_categories][google.cloud.retail.v2alpha.Condition.page_categories]
+     *   (for browse only), but can't specify both.
+     *
+     * * Action Inputs: attribute name, position
+     *
+     * * Action Result: Will force return a facet key around a certain position
+     * or above if the condition is satisfied.
+     *
+     * Example: Suppose the query is "shoes", the
+     * [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
+     * is "shoes", the
+     * [ForceReturnFacetAction.FacetPositionAdjustment.attribute_name][google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment.attribute_name]
+     * is "size" and the
+     * [ForceReturnFacetAction.FacetPositionAdjustment.position][google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment.position]
+     * is 8.
+     *
+     * Two cases: a) The facet key "size" is not already in the top 8 slots, then
+     * the facet "size" will appear at a position close to 8. b) The facet key
+     * "size" in among the top 8 positions in the request, then it will stay at
+     * its current rank.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.class, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (facetPositionAdjustmentsBuilder_ == null) { + facetPositionAdjustments_ = java.util.Collections.emptyList(); + } else { + facetPositionAdjustments_ = null; + facetPositionAdjustmentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_ForceReturnFacetAction_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction build() { + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction buildPartial() { + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction result = + new com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction result) { + if (facetPositionAdjustmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + facetPositionAdjustments_ = + java.util.Collections.unmodifiableList(facetPositionAdjustments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.facetPositionAdjustments_ = facetPositionAdjustments_; + } else { + result.facetPositionAdjustments_ = facetPositionAdjustmentsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) { + return mergeFrom((com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction other) { + if (other + == com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.getDefaultInstance()) + return this; + if (facetPositionAdjustmentsBuilder_ == null) { + if (!other.facetPositionAdjustments_.isEmpty()) { + if (facetPositionAdjustments_.isEmpty()) { + facetPositionAdjustments_ = other.facetPositionAdjustments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.addAll(other.facetPositionAdjustments_); + } + onChanged(); + } + } else { + if (!other.facetPositionAdjustments_.isEmpty()) { + if (facetPositionAdjustmentsBuilder_.isEmpty()) { + facetPositionAdjustmentsBuilder_.dispose(); + facetPositionAdjustmentsBuilder_ = null; + facetPositionAdjustments_ = other.facetPositionAdjustments_; + bitField0_ = (bitField0_ & ~0x00000001); + facetPositionAdjustmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFacetPositionAdjustmentsFieldBuilder() + : null; + } else { + facetPositionAdjustmentsBuilder_.addAllMessages(other.facetPositionAdjustments_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + m = + input.readMessage( + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment.parser(), + extensionRegistry); + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.add(m); + } else { + facetPositionAdjustmentsBuilder_.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.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment> + facetPositionAdjustments_ = java.util.Collections.emptyList(); + + private void ensureFacetPositionAdjustmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + facetPositionAdjustments_ = + new java.util.ArrayList< + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment>(facetPositionAdjustments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder> + facetPositionAdjustmentsBuilder_; + + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public java.util.List< + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment> + getFacetPositionAdjustmentsList() { + if (facetPositionAdjustmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(facetPositionAdjustments_); + } else { + return facetPositionAdjustmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public int getFacetPositionAdjustmentsCount() { + if (facetPositionAdjustmentsBuilder_ == null) { + return facetPositionAdjustments_.size(); + } else { + return facetPositionAdjustmentsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getFacetPositionAdjustments(int index) { + if (facetPositionAdjustmentsBuilder_ == null) { + return facetPositionAdjustments_.get(index); + } else { + return facetPositionAdjustmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder setFacetPositionAdjustments( + int index, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + value) { + if (facetPositionAdjustmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.set(index, value); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder setFacetPositionAdjustments( + int index, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder + builderForValue) { + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.set(index, builderForValue.build()); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder addFacetPositionAdjustments( + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + value) { + if (facetPositionAdjustmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.add(value); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder addFacetPositionAdjustments( + int index, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + value) { + if (facetPositionAdjustmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.add(index, value); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder addFacetPositionAdjustments( + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder + builderForValue) { + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.add(builderForValue.build()); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder addFacetPositionAdjustments( + int index, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder + builderForValue) { + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.add(index, builderForValue.build()); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder addAllFacetPositionAdjustments( + java.lang.Iterable< + ? extends + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment> + values) { + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, facetPositionAdjustments_); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder clearFacetPositionAdjustments() { + if (facetPositionAdjustmentsBuilder_ == null) { + facetPositionAdjustments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder removeFacetPositionAdjustments(int index) { + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.remove(index); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder + getFacetPositionAdjustmentsBuilder(int index) { + return getFacetPositionAdjustmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder + getFacetPositionAdjustmentsOrBuilder(int index) { + if (facetPositionAdjustmentsBuilder_ == null) { + return facetPositionAdjustments_.get(index); + } else { + return facetPositionAdjustmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder> + getFacetPositionAdjustmentsOrBuilderList() { + if (facetPositionAdjustmentsBuilder_ != null) { + return facetPositionAdjustmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(facetPositionAdjustments_); + } + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder + addFacetPositionAdjustmentsBuilder() { + return getFacetPositionAdjustmentsFieldBuilder() + .addBuilder( + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder + addFacetPositionAdjustmentsBuilder(int index) { + return getFacetPositionAdjustmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public java.util.List< + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder> + getFacetPositionAdjustmentsBuilderList() { + return getFacetPositionAdjustmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder> + getFacetPositionAdjustmentsFieldBuilder() { + if (facetPositionAdjustmentsBuilder_ == null) { + facetPositionAdjustmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustment.Builder, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder>( + facetPositionAdjustments_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + facetPositionAdjustments_ = null; + } + return facetPositionAdjustmentsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) + private static final com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction(); + } + + public static com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ForceReturnFacetAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.Rule.ForceReturnFacetAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RemoveFacetActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.Rule.RemoveFacetAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @return A list containing the attributeNames. + */ + java.util.List getAttributeNamesList(); + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @return The count of attributeNames. + */ + int getAttributeNamesCount(); + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the element to return. + * @return The attributeNames at the given index. + */ + java.lang.String getAttributeNames(int index); + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the attributeNames at the given index. + */ + com.google.protobuf.ByteString getAttributeNamesBytes(int index); + } + /** + * + * + *
+   * Removes an attribute/facet in the request if is present.
+   *
+   * * Rule Condition:
+   *   Must specify non-empty
+   *   [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
+   *   (for search only) or
+   *   [Condition.page_categories][google.cloud.retail.v2alpha.Condition.page_categories]
+   *   (for browse only), but can't specify both.
+   *
+   * * Action Input: attribute name
+   *
+   * * Action Result: Will remove the attribute (as a facet) from the request
+   * if it is present.
+   *
+   * Example: Suppose the query is "shoes", the
+   * [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
+   * is "shoes" and the attribute name "size", then facet key "size" will be
+   * removed from the request (if it is present).
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.Rule.RemoveFacetAction} + */ + public static final class RemoveFacetAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.Rule.RemoveFacetAction) + RemoveFacetActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveFacetAction.newBuilder() to construct. + private RemoveFacetAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveFacetAction() { + attributeNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveFacetAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_RemoveFacetAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_RemoveFacetAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.class, + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.Builder.class); + } + + public static final int ATTRIBUTE_NAMES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList attributeNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @return A list containing the attributeNames. + */ + public com.google.protobuf.ProtocolStringList getAttributeNamesList() { + return attributeNames_; + } + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @return The count of attributeNames. + */ + public int getAttributeNamesCount() { + return attributeNames_.size(); + } + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the element to return. + * @return The attributeNames at the given index. + */ + public java.lang.String getAttributeNames(int index) { + return attributeNames_.get(index); + } + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the attributeNames at the given index. + */ + public com.google.protobuf.ByteString getAttributeNamesBytes(int index) { + return attributeNames_.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 < attributeNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeNames_.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 < attributeNames_.size(); i++) { + dataSize += computeStringSizeNoTag(attributeNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getAttributeNamesList().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.retail.v2alpha.Rule.RemoveFacetAction)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction other = + (com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction) obj; + + if (!getAttributeNamesList().equals(other.getAttributeNamesList())) 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 (getAttributeNamesCount() > 0) { + hash = (37 * hash) + ATTRIBUTE_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getAttributeNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.Rule.RemoveFacetAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Removes an attribute/facet in the request if is present.
+     *
+     * * Rule Condition:
+     *   Must specify non-empty
+     *   [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
+     *   (for search only) or
+     *   [Condition.page_categories][google.cloud.retail.v2alpha.Condition.page_categories]
+     *   (for browse only), but can't specify both.
+     *
+     * * Action Input: attribute name
+     *
+     * * Action Result: Will remove the attribute (as a facet) from the request
+     * if it is present.
+     *
+     * Example: Suppose the query is "shoes", the
+     * [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
+     * is "shoes" and the attribute name "size", then facet key "size" will be
+     * removed from the request (if it is present).
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.Rule.RemoveFacetAction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.Rule.RemoveFacetAction) + com.google.cloud.retail.v2alpha.Rule.RemoveFacetActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_RemoveFacetAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_RemoveFacetAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.class, + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_RemoveFacetAction_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction build() { + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction buildPartial() { + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction result = + new com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + attributeNames_.makeImmutable(); + result.attributeNames_ = attributeNames_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction) { + return mergeFrom((com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction other) { + if (other == com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.getDefaultInstance()) + return this; + if (!other.attributeNames_.isEmpty()) { + if (attributeNames_.isEmpty()) { + attributeNames_ = other.attributeNames_; + bitField0_ |= 0x00000001; + } else { + ensureAttributeNamesIsMutable(); + attributeNames_.addAll(other.attributeNames_); + } + 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(); + ensureAttributeNamesIsMutable(); + attributeNames_.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 attributeNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAttributeNamesIsMutable() { + if (!attributeNames_.isModifiable()) { + attributeNames_ = new com.google.protobuf.LazyStringArrayList(attributeNames_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @return A list containing the attributeNames. + */ + public com.google.protobuf.ProtocolStringList getAttributeNamesList() { + attributeNames_.makeImmutable(); + return attributeNames_; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @return The count of attributeNames. + */ + public int getAttributeNamesCount() { + return attributeNames_.size(); + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the element to return. + * @return The attributeNames at the given index. + */ + public java.lang.String getAttributeNames(int index) { + return attributeNames_.get(index); + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the attributeNames at the given index. + */ + public com.google.protobuf.ByteString getAttributeNamesBytes(int index) { + return attributeNames_.getByteString(index); + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index to set the value at. + * @param value The attributeNames to set. + * @return This builder for chaining. + */ + public Builder setAttributeNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributeNamesIsMutable(); + attributeNames_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param value The attributeNames to add. + * @return This builder for chaining. + */ + public Builder addAttributeNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributeNamesIsMutable(); + attributeNames_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param values The attributeNames to add. + * @return This builder for chaining. + */ + public Builder addAllAttributeNames(java.lang.Iterable values) { + ensureAttributeNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributeNames_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @return This builder for chaining. + */ + public Builder clearAttributeNames() { + attributeNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param value The bytes of the attributeNames to add. + * @return This builder for chaining. + */ + public Builder addAttributeNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAttributeNamesIsMutable(); + attributeNames_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.Rule.RemoveFacetAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.Rule.RemoveFacetAction) + private static final com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction(); + } + + public static com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveFacetAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.Rule.RemoveFacetAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int actionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object action_; + + public enum ActionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BOOST_ACTION(2), + REDIRECT_ACTION(3), + ONEWAY_SYNONYMS_ACTION(6), + DO_NOT_ASSOCIATE_ACTION(7), + REPLACEMENT_ACTION(8), + IGNORE_ACTION(9), + FILTER_ACTION(10), + TWOWAY_SYNONYMS_ACTION(11), + FORCE_RETURN_FACET_ACTION(12), + REMOVE_FACET_ACTION(13), + ACTION_NOT_SET(0); + private final int value; + + private ActionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ActionCase valueOf(int value) { + return forNumber(value); + } + + public static ActionCase forNumber(int value) { + switch (value) { + case 2: + return BOOST_ACTION; + case 3: + return REDIRECT_ACTION; + case 6: + return ONEWAY_SYNONYMS_ACTION; + case 7: + return DO_NOT_ASSOCIATE_ACTION; + case 8: + return REPLACEMENT_ACTION; + case 9: + return IGNORE_ACTION; + case 10: + return FILTER_ACTION; + case 11: + return TWOWAY_SYNONYMS_ACTION; + case 12: + return FORCE_RETURN_FACET_ACTION; + case 13: + return REMOVE_FACET_ACTION; + case 0: + return ACTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); + } + + public static final int BOOST_ACTION_FIELD_NUMBER = 2; + /** + * + * + *
+   * A boost action.
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + * + * @return Whether the boostAction field is set. + */ + @java.lang.Override + public boolean hasBoostAction() { + return actionCase_ == 2; + } + /** + * + * + *
+   * A boost action.
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + * + * @return The boostAction. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.BoostAction getBoostAction() { + if (actionCase_ == 2) { + return (com.google.cloud.retail.v2alpha.Rule.BoostAction) action_; + } + return com.google.cloud.retail.v2alpha.Rule.BoostAction.getDefaultInstance(); + } + /** + * + * + *
+   * A boost action.
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.BoostActionOrBuilder getBoostActionOrBuilder() { + if (actionCase_ == 2) { + return (com.google.cloud.retail.v2alpha.Rule.BoostAction) action_; + } + return com.google.cloud.retail.v2alpha.Rule.BoostAction.getDefaultInstance(); + } + + public static final int REDIRECT_ACTION_FIELD_NUMBER = 3; + /** + * + * + *
+   * Redirects a shopper to a specific page.
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + * + * @return Whether the redirectAction field is set. + */ + @java.lang.Override + public boolean hasRedirectAction() { + return actionCase_ == 3; + } + /** + * + * + *
+   * Redirects a shopper to a specific page.
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + * + * @return The redirectAction. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.RedirectAction getRedirectAction() { + if (actionCase_ == 3) { + return (com.google.cloud.retail.v2alpha.Rule.RedirectAction) action_; + } + return com.google.cloud.retail.v2alpha.Rule.RedirectAction.getDefaultInstance(); + } + /** + * + * + *
+   * Redirects a shopper to a specific page.
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.RedirectActionOrBuilder getRedirectActionOrBuilder() { + if (actionCase_ == 3) { + return (com.google.cloud.retail.v2alpha.Rule.RedirectAction) action_; + } + return com.google.cloud.retail.v2alpha.Rule.RedirectAction.getDefaultInstance(); + } + + public static final int ONEWAY_SYNONYMS_ACTION_FIELD_NUMBER = 6; + /** + * + * + *
+   * Treats specific term as a synonym with a group of terms.
+   * Group of terms will not be treated as synonyms with the specific term.
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * + * @return Whether the onewaySynonymsAction field is set. + */ + @java.lang.Override + public boolean hasOnewaySynonymsAction() { + return actionCase_ == 6; + } + /** + * + * + *
+   * Treats specific term as a synonym with a group of terms.
+   * Group of terms will not be treated as synonyms with the specific term.
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * + * @return The onewaySynonymsAction. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction getOnewaySynonymsAction() { + if (actionCase_ == 6) { + return (com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction) action_; + } + return com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.getDefaultInstance(); } /** * @@ -8691,32 +11570,139 @@ public boolean hasTwowaySynonymsAction() { * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; * * - * @return The twowaySynonymsAction. + * @return The twowaySynonymsAction. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction getTwowaySynonymsAction() { + if (actionCase_ == 11) { + return (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_; + } + return com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.getDefaultInstance(); + } + /** + * + * + *
+   * Treats a set of terms as synonyms of one another.
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsActionOrBuilder + getTwowaySynonymsActionOrBuilder() { + if (actionCase_ == 11) { + return (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_; + } + return com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.getDefaultInstance(); + } + + public static final int FORCE_RETURN_FACET_ACTION_FIELD_NUMBER = 12; + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + * + * @return Whether the forceReturnFacetAction field is set. + */ + @java.lang.Override + public boolean hasForceReturnFacetAction() { + return actionCase_ == 12; + } + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + * + * @return The forceReturnFacetAction. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction getForceReturnFacetAction() { + if (actionCase_ == 12) { + return (com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) action_; + } + return com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.getDefaultInstance(); + } + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetActionOrBuilder + getForceReturnFacetActionOrBuilder() { + if (actionCase_ == 12) { + return (com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) action_; + } + return com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.getDefaultInstance(); + } + + public static final int REMOVE_FACET_ACTION_FIELD_NUMBER = 13; + /** + * + * + *
+   * Remove an attribute as a facet in the request (if present).
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.RemoveFacetAction remove_facet_action = 13; + * + * @return Whether the removeFacetAction field is set. + */ + @java.lang.Override + public boolean hasRemoveFacetAction() { + return actionCase_ == 13; + } + /** + * + * + *
+   * Remove an attribute as a facet in the request (if present).
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.RemoveFacetAction remove_facet_action = 13; + * + * @return The removeFacetAction. */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction getTwowaySynonymsAction() { - if (actionCase_ == 11) { - return (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_; + public com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction getRemoveFacetAction() { + if (actionCase_ == 13) { + return (com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.getDefaultInstance(); } /** * * *
-   * Treats a set of terms as synonyms of one another.
+   * Remove an attribute as a facet in the request (if present).
    * 
* - * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2alpha.Rule.RemoveFacetAction remove_facet_action = 13; */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsActionOrBuilder - getTwowaySynonymsActionOrBuilder() { - if (actionCase_ == 11) { - return (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_; + public com.google.cloud.retail.v2alpha.Rule.RemoveFacetActionOrBuilder + getRemoveFacetActionOrBuilder() { + if (actionCase_ == 13) { + return (com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.getDefaultInstance(); } public static final int CONDITION_FIELD_NUMBER = 1; @@ -8819,6 +11805,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (actionCase_ == 11) { output.writeMessage(11, (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_); } + if (actionCase_ == 12) { + output.writeMessage( + 12, (com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) action_); + } + if (actionCase_ == 13) { + output.writeMessage(13, (com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction) action_); + } getUnknownFields().writeTo(output); } @@ -8871,6 +11864,16 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 11, (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_); } + if (actionCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) action_); + } + if (actionCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction) action_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -8916,6 +11919,12 @@ public boolean equals(final java.lang.Object obj) { case 11: if (!getTwowaySynonymsAction().equals(other.getTwowaySynonymsAction())) return false; break; + case 12: + if (!getForceReturnFacetAction().equals(other.getForceReturnFacetAction())) return false; + break; + case 13: + if (!getRemoveFacetAction().equals(other.getRemoveFacetAction())) return false; + break; case 0: default: } @@ -8967,6 +11976,14 @@ public int hashCode() { hash = (37 * hash) + TWOWAY_SYNONYMS_ACTION_FIELD_NUMBER; hash = (53 * hash) + getTwowaySynonymsAction().hashCode(); break; + case 12: + hash = (37 * hash) + FORCE_RETURN_FACET_ACTION_FIELD_NUMBER; + hash = (53 * hash) + getForceReturnFacetAction().hashCode(); + break; + case 13: + hash = (37 * hash) + REMOVE_FACET_ACTION_FIELD_NUMBER; + hash = (53 * hash) + getRemoveFacetAction().hashCode(); + break; case 0: default: } @@ -9094,453 +12111,922 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.retail.v2alpha.CommonProto - .internal_static_google_cloud_retail_v2alpha_Rule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.retail.v2alpha.Rule.class, - com.google.cloud.retail.v2alpha.Rule.Builder.class); + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Rule.class, + com.google.cloud.retail.v2alpha.Rule.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.Rule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConditionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (boostActionBuilder_ != null) { + boostActionBuilder_.clear(); + } + if (redirectActionBuilder_ != null) { + redirectActionBuilder_.clear(); + } + if (onewaySynonymsActionBuilder_ != null) { + onewaySynonymsActionBuilder_.clear(); + } + if (doNotAssociateActionBuilder_ != null) { + doNotAssociateActionBuilder_.clear(); + } + if (replacementActionBuilder_ != null) { + replacementActionBuilder_.clear(); + } + if (ignoreActionBuilder_ != null) { + ignoreActionBuilder_.clear(); + } + if (filterActionBuilder_ != null) { + filterActionBuilder_.clear(); + } + if (twowaySynonymsActionBuilder_ != null) { + twowaySynonymsActionBuilder_.clear(); + } + if (forceReturnFacetActionBuilder_ != null) { + forceReturnFacetActionBuilder_.clear(); + } + if (removeFacetActionBuilder_ != null) { + removeFacetActionBuilder_.clear(); + } + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + actionCase_ = 0; + action_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.CommonProto + .internal_static_google_cloud_retail_v2alpha_Rule_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.Rule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule build() { + com.google.cloud.retail.v2alpha.Rule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Rule buildPartial() { + com.google.cloud.retail.v2alpha.Rule result = new com.google.cloud.retail.v2alpha.Rule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.Rule result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000400) != 0)) { + result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.retail.v2alpha.Rule result) { + result.actionCase_ = actionCase_; + result.action_ = this.action_; + if (actionCase_ == 2 && boostActionBuilder_ != null) { + result.action_ = boostActionBuilder_.build(); + } + if (actionCase_ == 3 && redirectActionBuilder_ != null) { + result.action_ = redirectActionBuilder_.build(); + } + if (actionCase_ == 6 && onewaySynonymsActionBuilder_ != null) { + result.action_ = onewaySynonymsActionBuilder_.build(); + } + if (actionCase_ == 7 && doNotAssociateActionBuilder_ != null) { + result.action_ = doNotAssociateActionBuilder_.build(); + } + if (actionCase_ == 8 && replacementActionBuilder_ != null) { + result.action_ = replacementActionBuilder_.build(); + } + if (actionCase_ == 9 && ignoreActionBuilder_ != null) { + result.action_ = ignoreActionBuilder_.build(); + } + if (actionCase_ == 10 && filterActionBuilder_ != null) { + result.action_ = filterActionBuilder_.build(); + } + if (actionCase_ == 11 && twowaySynonymsActionBuilder_ != null) { + result.action_ = twowaySynonymsActionBuilder_.build(); + } + if (actionCase_ == 12 && forceReturnFacetActionBuilder_ != null) { + result.action_ = forceReturnFacetActionBuilder_.build(); + } + if (actionCase_ == 13 && removeFacetActionBuilder_ != null) { + result.action_ = removeFacetActionBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.Rule) { + return mergeFrom((com.google.cloud.retail.v2alpha.Rule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.Rule other) { + if (other == com.google.cloud.retail.v2alpha.Rule.getDefaultInstance()) return this; + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + switch (other.getActionCase()) { + case BOOST_ACTION: + { + mergeBoostAction(other.getBoostAction()); + break; + } + case REDIRECT_ACTION: + { + mergeRedirectAction(other.getRedirectAction()); + break; + } + case ONEWAY_SYNONYMS_ACTION: + { + mergeOnewaySynonymsAction(other.getOnewaySynonymsAction()); + break; + } + case DO_NOT_ASSOCIATE_ACTION: + { + mergeDoNotAssociateAction(other.getDoNotAssociateAction()); + break; + } + case REPLACEMENT_ACTION: + { + mergeReplacementAction(other.getReplacementAction()); + break; + } + case IGNORE_ACTION: + { + mergeIgnoreAction(other.getIgnoreAction()); + break; + } + case FILTER_ACTION: + { + mergeFilterAction(other.getFilterAction()); + break; + } + case TWOWAY_SYNONYMS_ACTION: + { + mergeTwowaySynonymsAction(other.getTwowaySynonymsAction()); + break; + } + case FORCE_RETURN_FACET_ACTION: + { + mergeForceReturnFacetAction(other.getForceReturnFacetAction()); + break; + } + case REMOVE_FACET_ACTION: + { + mergeRemoveFacetAction(other.getRemoveFacetAction()); + break; + } + case ACTION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; } - // Construct using com.google.cloud.retail.v2alpha.Rule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 10 + case 18: + { + input.readMessage(getBoostActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getRedirectActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 3; + break; + } // case 26 + case 50: + { + input.readMessage( + getOnewaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + getDoNotAssociateActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + getReplacementActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage(getIgnoreActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage(getFilterActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage( + getTwowaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage( + getForceReturnFacetActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage( + getRemoveFacetActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 13; + break; + } // case 106 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + private int actionCase_ = 0; + private java.lang.Object action_; - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConditionFieldBuilder(); - } + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (boostActionBuilder_ != null) { - boostActionBuilder_.clear(); - } - if (redirectActionBuilder_ != null) { - redirectActionBuilder_.clear(); - } - if (onewaySynonymsActionBuilder_ != null) { - onewaySynonymsActionBuilder_.clear(); - } - if (doNotAssociateActionBuilder_ != null) { - doNotAssociateActionBuilder_.clear(); - } - if (replacementActionBuilder_ != null) { - replacementActionBuilder_.clear(); - } - if (ignoreActionBuilder_ != null) { - ignoreActionBuilder_.clear(); - } - if (filterActionBuilder_ != null) { - filterActionBuilder_.clear(); - } - if (twowaySynonymsActionBuilder_ != null) { - twowaySynonymsActionBuilder_.clear(); - } - condition_ = null; - if (conditionBuilder_ != null) { - conditionBuilder_.dispose(); - conditionBuilder_ = null; - } + public Builder clearAction() { actionCase_ = 0; action_ = null; + onChanged(); return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.retail.v2alpha.CommonProto - .internal_static_google_cloud_retail_v2alpha_Rule_descriptor; - } - - @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule getDefaultInstanceForType() { - return com.google.cloud.retail.v2alpha.Rule.getDefaultInstance(); - } + private int bitField0_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Rule.BoostAction, + com.google.cloud.retail.v2alpha.Rule.BoostAction.Builder, + com.google.cloud.retail.v2alpha.Rule.BoostActionOrBuilder> + boostActionBuilder_; + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + * + * @return Whether the boostAction field is set. + */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule build() { - com.google.cloud.retail.v2alpha.Rule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + public boolean hasBoostAction() { + return actionCase_ == 2; } - + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + * + * @return The boostAction. + */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule buildPartial() { - com.google.cloud.retail.v2alpha.Rule result = new com.google.cloud.retail.v2alpha.Rule(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.retail.v2alpha.Rule result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000100) != 0)) { - result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.retail.v2alpha.Rule result) { - result.actionCase_ = actionCase_; - result.action_ = this.action_; - if (actionCase_ == 2 && boostActionBuilder_ != null) { - result.action_ = boostActionBuilder_.build(); - } - if (actionCase_ == 3 && redirectActionBuilder_ != null) { - result.action_ = redirectActionBuilder_.build(); - } - if (actionCase_ == 6 && onewaySynonymsActionBuilder_ != null) { - result.action_ = onewaySynonymsActionBuilder_.build(); - } - if (actionCase_ == 7 && doNotAssociateActionBuilder_ != null) { - result.action_ = doNotAssociateActionBuilder_.build(); + public com.google.cloud.retail.v2alpha.Rule.BoostAction getBoostAction() { + if (boostActionBuilder_ == null) { + if (actionCase_ == 2) { + return (com.google.cloud.retail.v2alpha.Rule.BoostAction) action_; + } + return com.google.cloud.retail.v2alpha.Rule.BoostAction.getDefaultInstance(); + } else { + if (actionCase_ == 2) { + return boostActionBuilder_.getMessage(); + } + return com.google.cloud.retail.v2alpha.Rule.BoostAction.getDefaultInstance(); } - if (actionCase_ == 8 && replacementActionBuilder_ != null) { - result.action_ = replacementActionBuilder_.build(); + } + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + */ + public Builder setBoostAction(com.google.cloud.retail.v2alpha.Rule.BoostAction value) { + if (boostActionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + boostActionBuilder_.setMessage(value); } - if (actionCase_ == 9 && ignoreActionBuilder_ != null) { - result.action_ = ignoreActionBuilder_.build(); + actionCase_ = 2; + return this; + } + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + */ + public Builder setBoostAction( + com.google.cloud.retail.v2alpha.Rule.BoostAction.Builder builderForValue) { + if (boostActionBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + boostActionBuilder_.setMessage(builderForValue.build()); } - if (actionCase_ == 10 && filterActionBuilder_ != null) { - result.action_ = filterActionBuilder_.build(); + actionCase_ = 2; + return this; + } + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + */ + public Builder mergeBoostAction(com.google.cloud.retail.v2alpha.Rule.BoostAction value) { + if (boostActionBuilder_ == null) { + if (actionCase_ == 2 + && action_ != com.google.cloud.retail.v2alpha.Rule.BoostAction.getDefaultInstance()) { + action_ = + com.google.cloud.retail.v2alpha.Rule.BoostAction.newBuilder( + (com.google.cloud.retail.v2alpha.Rule.BoostAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 2) { + boostActionBuilder_.mergeFrom(value); + } else { + boostActionBuilder_.setMessage(value); + } } - if (actionCase_ == 11 && twowaySynonymsActionBuilder_ != null) { - result.action_ = twowaySynonymsActionBuilder_.build(); + actionCase_ = 2; + return this; + } + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + */ + public Builder clearBoostAction() { + if (boostActionBuilder_ == null) { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + } + boostActionBuilder_.clear(); } + return this; } - - @java.lang.Override - public Builder clone() { - return super.clone(); + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + */ + public com.google.cloud.retail.v2alpha.Rule.BoostAction.Builder getBoostActionBuilder() { + return getBoostActionFieldBuilder().getBuilder(); } - + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + */ @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + public com.google.cloud.retail.v2alpha.Rule.BoostActionOrBuilder getBoostActionOrBuilder() { + if ((actionCase_ == 2) && (boostActionBuilder_ != null)) { + return boostActionBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 2) { + return (com.google.cloud.retail.v2alpha.Rule.BoostAction) action_; + } + return com.google.cloud.retail.v2alpha.Rule.BoostAction.getDefaultInstance(); + } } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Rule.BoostAction, + com.google.cloud.retail.v2alpha.Rule.BoostAction.Builder, + com.google.cloud.retail.v2alpha.Rule.BoostActionOrBuilder> + getBoostActionFieldBuilder() { + if (boostActionBuilder_ == null) { + if (!(actionCase_ == 2)) { + action_ = com.google.cloud.retail.v2alpha.Rule.BoostAction.getDefaultInstance(); + } + boostActionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Rule.BoostAction, + com.google.cloud.retail.v2alpha.Rule.BoostAction.Builder, + com.google.cloud.retail.v2alpha.Rule.BoostActionOrBuilder>( + (com.google.cloud.retail.v2alpha.Rule.BoostAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 2; + onChanged(); + return boostActionBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Rule.RedirectAction, + com.google.cloud.retail.v2alpha.Rule.RedirectAction.Builder, + com.google.cloud.retail.v2alpha.Rule.RedirectActionOrBuilder> + redirectActionBuilder_; + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + * + * @return Whether the redirectAction field is set. + */ @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + public boolean hasRedirectAction() { + return actionCase_ == 3; } - + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + * + * @return The redirectAction. + */ @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + public com.google.cloud.retail.v2alpha.Rule.RedirectAction getRedirectAction() { + if (redirectActionBuilder_ == null) { + if (actionCase_ == 3) { + return (com.google.cloud.retail.v2alpha.Rule.RedirectAction) action_; + } + return com.google.cloud.retail.v2alpha.Rule.RedirectAction.getDefaultInstance(); + } else { + if (actionCase_ == 3) { + return redirectActionBuilder_.getMessage(); + } + return com.google.cloud.retail.v2alpha.Rule.RedirectAction.getDefaultInstance(); + } } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + */ + public Builder setRedirectAction(com.google.cloud.retail.v2alpha.Rule.RedirectAction value) { + if (redirectActionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + redirectActionBuilder_.setMessage(value); + } + actionCase_ = 3; + return this; } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.retail.v2alpha.Rule) { - return mergeFrom((com.google.cloud.retail.v2alpha.Rule) other); + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + */ + public Builder setRedirectAction( + com.google.cloud.retail.v2alpha.Rule.RedirectAction.Builder builderForValue) { + if (redirectActionBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); } else { - super.mergeFrom(other); - return this; + redirectActionBuilder_.setMessage(builderForValue.build()); } + actionCase_ = 3; + return this; } - - public Builder mergeFrom(com.google.cloud.retail.v2alpha.Rule other) { - if (other == com.google.cloud.retail.v2alpha.Rule.getDefaultInstance()) return this; - if (other.hasCondition()) { - mergeCondition(other.getCondition()); + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + */ + public Builder mergeRedirectAction(com.google.cloud.retail.v2alpha.Rule.RedirectAction value) { + if (redirectActionBuilder_ == null) { + if (actionCase_ == 3 + && action_ + != com.google.cloud.retail.v2alpha.Rule.RedirectAction.getDefaultInstance()) { + action_ = + com.google.cloud.retail.v2alpha.Rule.RedirectAction.newBuilder( + (com.google.cloud.retail.v2alpha.Rule.RedirectAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 3) { + redirectActionBuilder_.mergeFrom(value); + } else { + redirectActionBuilder_.setMessage(value); + } } - switch (other.getActionCase()) { - case BOOST_ACTION: - { - mergeBoostAction(other.getBoostAction()); - break; - } - case REDIRECT_ACTION: - { - mergeRedirectAction(other.getRedirectAction()); - break; - } - case ONEWAY_SYNONYMS_ACTION: - { - mergeOnewaySynonymsAction(other.getOnewaySynonymsAction()); - break; - } - case DO_NOT_ASSOCIATE_ACTION: - { - mergeDoNotAssociateAction(other.getDoNotAssociateAction()); - break; - } - case REPLACEMENT_ACTION: - { - mergeReplacementAction(other.getReplacementAction()); - break; - } - case IGNORE_ACTION: - { - mergeIgnoreAction(other.getIgnoreAction()); - break; - } - case FILTER_ACTION: - { - mergeFilterAction(other.getFilterAction()); - break; - } - case TWOWAY_SYNONYMS_ACTION: - { - mergeTwowaySynonymsAction(other.getTwowaySynonymsAction()); - break; - } - case ACTION_NOT_SET: - { - break; - } + actionCase_ = 3; + return this; + } + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + */ + public Builder clearRedirectAction() { + if (redirectActionBuilder_ == null) { + if (actionCase_ == 3) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 3) { + actionCase_ = 0; + action_ = null; + } + redirectActionBuilder_.clear(); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); return this; } - - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + */ + public com.google.cloud.retail.v2alpha.Rule.RedirectAction.Builder getRedirectActionBuilder() { + return getRedirectActionFieldBuilder().getBuilder(); } - + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + */ @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + public com.google.cloud.retail.v2alpha.Rule.RedirectActionOrBuilder + getRedirectActionOrBuilder() { + if ((actionCase_ == 3) && (redirectActionBuilder_ != null)) { + return redirectActionBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 3) { + return (com.google.cloud.retail.v2alpha.Rule.RedirectAction) action_; + } + return com.google.cloud.retail.v2alpha.Rule.RedirectAction.getDefaultInstance(); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 10 - case 18: - { - input.readMessage(getBoostActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 2; - break; - } // case 18 - case 26: - { - input.readMessage(getRedirectActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 3; - break; - } // case 26 - case 50: - { - input.readMessage( - getOnewaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 6; - break; - } // case 50 - case 58: - { - input.readMessage( - getDoNotAssociateActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 7; - break; - } // case 58 - case 66: - { - input.readMessage( - getReplacementActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 8; - break; - } // case 66 - case 74: - { - input.readMessage(getIgnoreActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 9; - break; - } // case 74 - case 82: - { - input.readMessage(getFilterActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 10; - break; - } // case 82 - case 90: - { - input.readMessage( - getTwowaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 11; - 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 actionCase_ = 0; - private java.lang.Object action_; - - public ActionCase getActionCase() { - return ActionCase.forNumber(actionCase_); } - - public Builder clearAction() { - actionCase_ = 0; - action_ = null; + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Rule.RedirectAction, + com.google.cloud.retail.v2alpha.Rule.RedirectAction.Builder, + com.google.cloud.retail.v2alpha.Rule.RedirectActionOrBuilder> + getRedirectActionFieldBuilder() { + if (redirectActionBuilder_ == null) { + if (!(actionCase_ == 3)) { + action_ = com.google.cloud.retail.v2alpha.Rule.RedirectAction.getDefaultInstance(); + } + redirectActionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Rule.RedirectAction, + com.google.cloud.retail.v2alpha.Rule.RedirectAction.Builder, + com.google.cloud.retail.v2alpha.Rule.RedirectActionOrBuilder>( + (com.google.cloud.retail.v2alpha.Rule.RedirectAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 3; onChanged(); - return this; + return redirectActionBuilder_; } - private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.BoostAction, - com.google.cloud.retail.v2alpha.Rule.BoostAction.Builder, - com.google.cloud.retail.v2alpha.Rule.BoostActionOrBuilder> - boostActionBuilder_; + com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction, + com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.Builder, + com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsActionOrBuilder> + onewaySynonymsActionBuilder_; /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * * - * @return Whether the boostAction field is set. + * @return Whether the onewaySynonymsAction field is set. */ @java.lang.Override - public boolean hasBoostAction() { - return actionCase_ == 2; + public boolean hasOnewaySynonymsAction() { + return actionCase_ == 6; } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * * - * @return The boostAction. + * @return The onewaySynonymsAction. */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.BoostAction getBoostAction() { - if (boostActionBuilder_ == null) { - if (actionCase_ == 2) { - return (com.google.cloud.retail.v2alpha.Rule.BoostAction) action_; + public com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction getOnewaySynonymsAction() { + if (onewaySynonymsActionBuilder_ == null) { + if (actionCase_ == 6) { + return (com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.BoostAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.getDefaultInstance(); } else { - if (actionCase_ == 2) { - return boostActionBuilder_.getMessage(); + if (actionCase_ == 6) { + return onewaySynonymsActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2alpha.Rule.BoostAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.getDefaultInstance(); } } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * */ - public Builder setBoostAction(com.google.cloud.retail.v2alpha.Rule.BoostAction value) { - if (boostActionBuilder_ == null) { + public Builder setOnewaySynonymsAction( + com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction value) { + if (onewaySynonymsActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - boostActionBuilder_.setMessage(value); + onewaySynonymsActionBuilder_.setMessage(value); } - actionCase_ = 2; + actionCase_ = 6; return this; } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * */ - public Builder setBoostAction( - com.google.cloud.retail.v2alpha.Rule.BoostAction.Builder builderForValue) { - if (boostActionBuilder_ == null) { + public Builder setOnewaySynonymsAction( + com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.Builder builderForValue) { + if (onewaySynonymsActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - boostActionBuilder_.setMessage(builderForValue.build()); + onewaySynonymsActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 2; + actionCase_ = 6; return this; } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * */ - public Builder mergeBoostAction(com.google.cloud.retail.v2alpha.Rule.BoostAction value) { - if (boostActionBuilder_ == null) { - if (actionCase_ == 2 - && action_ != com.google.cloud.retail.v2alpha.Rule.BoostAction.getDefaultInstance()) { + public Builder mergeOnewaySynonymsAction( + com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction value) { + if (onewaySynonymsActionBuilder_ == null) { + if (actionCase_ == 6 + && action_ + != com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2alpha.Rule.BoostAction.newBuilder( - (com.google.cloud.retail.v2alpha.Rule.BoostAction) action_) + com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.newBuilder( + (com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -9548,37 +13034,39 @@ public Builder mergeBoostAction(com.google.cloud.retail.v2alpha.Rule.BoostAction } onChanged(); } else { - if (actionCase_ == 2) { - boostActionBuilder_.mergeFrom(value); + if (actionCase_ == 6) { + onewaySynonymsActionBuilder_.mergeFrom(value); } else { - boostActionBuilder_.setMessage(value); + onewaySynonymsActionBuilder_.setMessage(value); } } - actionCase_ = 2; + actionCase_ = 6; return this; } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * */ - public Builder clearBoostAction() { - if (boostActionBuilder_ == null) { - if (actionCase_ == 2) { + public Builder clearOnewaySynonymsAction() { + if (onewaySynonymsActionBuilder_ == null) { + if (actionCase_ == 6) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 2) { + if (actionCase_ == 6) { actionCase_ = 0; action_ = null; } - boostActionBuilder_.clear(); + onewaySynonymsActionBuilder_.clear(); } return this; } @@ -9586,171 +13074,186 @@ public Builder clearBoostAction() { * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * */ - public com.google.cloud.retail.v2alpha.Rule.BoostAction.Builder getBoostActionBuilder() { - return getBoostActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.Builder + getOnewaySynonymsActionBuilder() { + return getOnewaySynonymsActionFieldBuilder().getBuilder(); } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.BoostActionOrBuilder getBoostActionOrBuilder() { - if ((actionCase_ == 2) && (boostActionBuilder_ != null)) { - return boostActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsActionOrBuilder + getOnewaySynonymsActionOrBuilder() { + if ((actionCase_ == 6) && (onewaySynonymsActionBuilder_ != null)) { + return onewaySynonymsActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 2) { - return (com.google.cloud.retail.v2alpha.Rule.BoostAction) action_; + if (actionCase_ == 6) { + return (com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.BoostAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.getDefaultInstance(); } } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2alpha.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.BoostAction, - com.google.cloud.retail.v2alpha.Rule.BoostAction.Builder, - com.google.cloud.retail.v2alpha.Rule.BoostActionOrBuilder> - getBoostActionFieldBuilder() { - if (boostActionBuilder_ == null) { - if (!(actionCase_ == 2)) { - action_ = com.google.cloud.retail.v2alpha.Rule.BoostAction.getDefaultInstance(); + com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction, + com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.Builder, + com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsActionOrBuilder> + getOnewaySynonymsActionFieldBuilder() { + if (onewaySynonymsActionBuilder_ == null) { + if (!(actionCase_ == 6)) { + action_ = com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.getDefaultInstance(); } - boostActionBuilder_ = + onewaySynonymsActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.BoostAction, - com.google.cloud.retail.v2alpha.Rule.BoostAction.Builder, - com.google.cloud.retail.v2alpha.Rule.BoostActionOrBuilder>( - (com.google.cloud.retail.v2alpha.Rule.BoostAction) action_, + com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction, + com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.Builder, + com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsActionOrBuilder>( + (com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 2; + actionCase_ = 6; onChanged(); - return boostActionBuilder_; + return onewaySynonymsActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.RedirectAction, - com.google.cloud.retail.v2alpha.Rule.RedirectAction.Builder, - com.google.cloud.retail.v2alpha.Rule.RedirectActionOrBuilder> - redirectActionBuilder_; + com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction, + com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.Builder, + com.google.cloud.retail.v2alpha.Rule.DoNotAssociateActionOrBuilder> + doNotAssociateActionBuilder_; /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; + * * - * @return Whether the redirectAction field is set. + * @return Whether the doNotAssociateAction field is set. */ @java.lang.Override - public boolean hasRedirectAction() { - return actionCase_ == 3; + public boolean hasDoNotAssociateAction() { + return actionCase_ == 7; } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; + * * - * @return The redirectAction. + * @return The doNotAssociateAction. */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.RedirectAction getRedirectAction() { - if (redirectActionBuilder_ == null) { - if (actionCase_ == 3) { - return (com.google.cloud.retail.v2alpha.Rule.RedirectAction) action_; + public com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction getDoNotAssociateAction() { + if (doNotAssociateActionBuilder_ == null) { + if (actionCase_ == 7) { + return (com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.RedirectAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.getDefaultInstance(); } else { - if (actionCase_ == 3) { - return redirectActionBuilder_.getMessage(); + if (actionCase_ == 7) { + return doNotAssociateActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2alpha.Rule.RedirectAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.getDefaultInstance(); } } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; + * */ - public Builder setRedirectAction(com.google.cloud.retail.v2alpha.Rule.RedirectAction value) { - if (redirectActionBuilder_ == null) { + public Builder setDoNotAssociateAction( + com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction value) { + if (doNotAssociateActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - redirectActionBuilder_.setMessage(value); + doNotAssociateActionBuilder_.setMessage(value); } - actionCase_ = 3; + actionCase_ = 7; return this; } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; + * */ - public Builder setRedirectAction( - com.google.cloud.retail.v2alpha.Rule.RedirectAction.Builder builderForValue) { - if (redirectActionBuilder_ == null) { + public Builder setDoNotAssociateAction( + com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.Builder builderForValue) { + if (doNotAssociateActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - redirectActionBuilder_.setMessage(builderForValue.build()); + doNotAssociateActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 3; + actionCase_ = 7; return this; } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; + * */ - public Builder mergeRedirectAction(com.google.cloud.retail.v2alpha.Rule.RedirectAction value) { - if (redirectActionBuilder_ == null) { - if (actionCase_ == 3 + public Builder mergeDoNotAssociateAction( + com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction value) { + if (doNotAssociateActionBuilder_ == null) { + if (actionCase_ == 7 && action_ - != com.google.cloud.retail.v2alpha.Rule.RedirectAction.getDefaultInstance()) { + != com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2alpha.Rule.RedirectAction.newBuilder( - (com.google.cloud.retail.v2alpha.Rule.RedirectAction) action_) + com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.newBuilder( + (com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -9758,37 +13261,38 @@ public Builder mergeRedirectAction(com.google.cloud.retail.v2alpha.Rule.Redirect } onChanged(); } else { - if (actionCase_ == 3) { - redirectActionBuilder_.mergeFrom(value); + if (actionCase_ == 7) { + doNotAssociateActionBuilder_.mergeFrom(value); } else { - redirectActionBuilder_.setMessage(value); + doNotAssociateActionBuilder_.setMessage(value); } } - actionCase_ = 3; + actionCase_ = 7; return this; } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; + * */ - public Builder clearRedirectAction() { - if (redirectActionBuilder_ == null) { - if (actionCase_ == 3) { + public Builder clearDoNotAssociateAction() { + if (doNotAssociateActionBuilder_ == null) { + if (actionCase_ == 7) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 3) { + if (actionCase_ == 7) { actionCase_ = 0; action_ = null; } - redirectActionBuilder_.clear(); + doNotAssociateActionBuilder_.clear(); } return this; } @@ -9796,184 +13300,178 @@ public Builder clearRedirectAction() { * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; + * */ - public com.google.cloud.retail.v2alpha.Rule.RedirectAction.Builder getRedirectActionBuilder() { - return getRedirectActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.Builder + getDoNotAssociateActionBuilder() { + return getDoNotAssociateActionFieldBuilder().getBuilder(); } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; + * */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.RedirectActionOrBuilder - getRedirectActionOrBuilder() { - if ((actionCase_ == 3) && (redirectActionBuilder_ != null)) { - return redirectActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2alpha.Rule.DoNotAssociateActionOrBuilder + getDoNotAssociateActionOrBuilder() { + if ((actionCase_ == 7) && (doNotAssociateActionBuilder_ != null)) { + return doNotAssociateActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 3) { - return (com.google.cloud.retail.v2alpha.Rule.RedirectAction) action_; + if (actionCase_ == 7) { + return (com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.RedirectAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.getDefaultInstance(); } } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2alpha.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.RedirectAction, - com.google.cloud.retail.v2alpha.Rule.RedirectAction.Builder, - com.google.cloud.retail.v2alpha.Rule.RedirectActionOrBuilder> - getRedirectActionFieldBuilder() { - if (redirectActionBuilder_ == null) { - if (!(actionCase_ == 3)) { - action_ = com.google.cloud.retail.v2alpha.Rule.RedirectAction.getDefaultInstance(); + com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction, + com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.Builder, + com.google.cloud.retail.v2alpha.Rule.DoNotAssociateActionOrBuilder> + getDoNotAssociateActionFieldBuilder() { + if (doNotAssociateActionBuilder_ == null) { + if (!(actionCase_ == 7)) { + action_ = com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.getDefaultInstance(); } - redirectActionBuilder_ = + doNotAssociateActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.RedirectAction, - com.google.cloud.retail.v2alpha.Rule.RedirectAction.Builder, - com.google.cloud.retail.v2alpha.Rule.RedirectActionOrBuilder>( - (com.google.cloud.retail.v2alpha.Rule.RedirectAction) action_, + com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction, + com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.Builder, + com.google.cloud.retail.v2alpha.Rule.DoNotAssociateActionOrBuilder>( + (com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 3; + actionCase_ = 7; onChanged(); - return redirectActionBuilder_; + return doNotAssociateActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction, - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.Builder, - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsActionOrBuilder> - onewaySynonymsActionBuilder_; + com.google.cloud.retail.v2alpha.Rule.ReplacementAction, + com.google.cloud.retail.v2alpha.Rule.ReplacementAction.Builder, + com.google.cloud.retail.v2alpha.Rule.ReplacementActionOrBuilder> + replacementActionBuilder_; /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; * - * @return Whether the onewaySynonymsAction field is set. + * @return Whether the replacementAction field is set. */ @java.lang.Override - public boolean hasOnewaySynonymsAction() { - return actionCase_ == 6; + public boolean hasReplacementAction() { + return actionCase_ == 8; } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; * - * @return The onewaySynonymsAction. + * @return The replacementAction. */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction getOnewaySynonymsAction() { - if (onewaySynonymsActionBuilder_ == null) { - if (actionCase_ == 6) { - return (com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction) action_; + public com.google.cloud.retail.v2alpha.Rule.ReplacementAction getReplacementAction() { + if (replacementActionBuilder_ == null) { + if (actionCase_ == 8) { + return (com.google.cloud.retail.v2alpha.Rule.ReplacementAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.ReplacementAction.getDefaultInstance(); } else { - if (actionCase_ == 6) { - return onewaySynonymsActionBuilder_.getMessage(); + if (actionCase_ == 8) { + return replacementActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.ReplacementAction.getDefaultInstance(); } } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; */ - public Builder setOnewaySynonymsAction( - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction value) { - if (onewaySynonymsActionBuilder_ == null) { + public Builder setReplacementAction( + com.google.cloud.retail.v2alpha.Rule.ReplacementAction value) { + if (replacementActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - onewaySynonymsActionBuilder_.setMessage(value); + replacementActionBuilder_.setMessage(value); } - actionCase_ = 6; + actionCase_ = 8; return this; } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; */ - public Builder setOnewaySynonymsAction( - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.Builder builderForValue) { - if (onewaySynonymsActionBuilder_ == null) { + public Builder setReplacementAction( + com.google.cloud.retail.v2alpha.Rule.ReplacementAction.Builder builderForValue) { + if (replacementActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - onewaySynonymsActionBuilder_.setMessage(builderForValue.build()); + replacementActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 6; + actionCase_ = 8; return this; } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; */ - public Builder mergeOnewaySynonymsAction( - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction value) { - if (onewaySynonymsActionBuilder_ == null) { - if (actionCase_ == 6 + public Builder mergeReplacementAction( + com.google.cloud.retail.v2alpha.Rule.ReplacementAction value) { + if (replacementActionBuilder_ == null) { + if (actionCase_ == 8 && action_ - != com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.getDefaultInstance()) { + != com.google.cloud.retail.v2alpha.Rule.ReplacementAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.newBuilder( - (com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction) action_) + com.google.cloud.retail.v2alpha.Rule.ReplacementAction.newBuilder( + (com.google.cloud.retail.v2alpha.Rule.ReplacementAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -9981,39 +13479,37 @@ public Builder mergeOnewaySynonymsAction( } onChanged(); } else { - if (actionCase_ == 6) { - onewaySynonymsActionBuilder_.mergeFrom(value); + if (actionCase_ == 8) { + replacementActionBuilder_.mergeFrom(value); } else { - onewaySynonymsActionBuilder_.setMessage(value); + replacementActionBuilder_.setMessage(value); } } - actionCase_ = 6; + actionCase_ = 8; return this; } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; */ - public Builder clearOnewaySynonymsAction() { - if (onewaySynonymsActionBuilder_ == null) { - if (actionCase_ == 6) { + public Builder clearReplacementAction() { + if (replacementActionBuilder_ == null) { + if (actionCase_ == 8) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 6) { + if (actionCase_ == 8) { actionCase_ = 0; action_ = null; } - onewaySynonymsActionBuilder_.clear(); + replacementActionBuilder_.clear(); } return this; } @@ -10021,186 +13517,172 @@ public Builder clearOnewaySynonymsAction() { * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; */ - public com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.Builder - getOnewaySynonymsActionBuilder() { - return getOnewaySynonymsActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2alpha.Rule.ReplacementAction.Builder + getReplacementActionBuilder() { + return getReplacementActionFieldBuilder().getBuilder(); } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsActionOrBuilder - getOnewaySynonymsActionOrBuilder() { - if ((actionCase_ == 6) && (onewaySynonymsActionBuilder_ != null)) { - return onewaySynonymsActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2alpha.Rule.ReplacementActionOrBuilder + getReplacementActionOrBuilder() { + if ((actionCase_ == 8) && (replacementActionBuilder_ != null)) { + return replacementActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 6) { - return (com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction) action_; + if (actionCase_ == 8) { + return (com.google.cloud.retail.v2alpha.Rule.ReplacementAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.ReplacementAction.getDefaultInstance(); } } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction, - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.Builder, - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsActionOrBuilder> - getOnewaySynonymsActionFieldBuilder() { - if (onewaySynonymsActionBuilder_ == null) { - if (!(actionCase_ == 6)) { - action_ = com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.getDefaultInstance(); + com.google.cloud.retail.v2alpha.Rule.ReplacementAction, + com.google.cloud.retail.v2alpha.Rule.ReplacementAction.Builder, + com.google.cloud.retail.v2alpha.Rule.ReplacementActionOrBuilder> + getReplacementActionFieldBuilder() { + if (replacementActionBuilder_ == null) { + if (!(actionCase_ == 8)) { + action_ = com.google.cloud.retail.v2alpha.Rule.ReplacementAction.getDefaultInstance(); } - onewaySynonymsActionBuilder_ = + replacementActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction, - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.Builder, - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsActionOrBuilder>( - (com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction) action_, + com.google.cloud.retail.v2alpha.Rule.ReplacementAction, + com.google.cloud.retail.v2alpha.Rule.ReplacementAction.Builder, + com.google.cloud.retail.v2alpha.Rule.ReplacementActionOrBuilder>( + (com.google.cloud.retail.v2alpha.Rule.ReplacementAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 6; + actionCase_ = 8; onChanged(); - return onewaySynonymsActionBuilder_; + return replacementActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction, - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.Builder, - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateActionOrBuilder> - doNotAssociateActionBuilder_; + com.google.cloud.retail.v2alpha.Rule.IgnoreAction, + com.google.cloud.retail.v2alpha.Rule.IgnoreAction.Builder, + com.google.cloud.retail.v2alpha.Rule.IgnoreActionOrBuilder> + ignoreActionBuilder_; /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; * - * @return Whether the doNotAssociateAction field is set. + * @return Whether the ignoreAction field is set. */ @java.lang.Override - public boolean hasDoNotAssociateAction() { - return actionCase_ == 7; + public boolean hasIgnoreAction() { + return actionCase_ == 9; } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; * - * @return The doNotAssociateAction. + * @return The ignoreAction. */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction getDoNotAssociateAction() { - if (doNotAssociateActionBuilder_ == null) { - if (actionCase_ == 7) { - return (com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction) action_; + public com.google.cloud.retail.v2alpha.Rule.IgnoreAction getIgnoreAction() { + if (ignoreActionBuilder_ == null) { + if (actionCase_ == 9) { + return (com.google.cloud.retail.v2alpha.Rule.IgnoreAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.IgnoreAction.getDefaultInstance(); } else { - if (actionCase_ == 7) { - return doNotAssociateActionBuilder_.getMessage(); + if (actionCase_ == 9) { + return ignoreActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.IgnoreAction.getDefaultInstance(); } } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; */ - public Builder setDoNotAssociateAction( - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction value) { - if (doNotAssociateActionBuilder_ == null) { + public Builder setIgnoreAction(com.google.cloud.retail.v2alpha.Rule.IgnoreAction value) { + if (ignoreActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - doNotAssociateActionBuilder_.setMessage(value); + ignoreActionBuilder_.setMessage(value); } - actionCase_ = 7; + actionCase_ = 9; return this; } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; */ - public Builder setDoNotAssociateAction( - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.Builder builderForValue) { - if (doNotAssociateActionBuilder_ == null) { + public Builder setIgnoreAction( + com.google.cloud.retail.v2alpha.Rule.IgnoreAction.Builder builderForValue) { + if (ignoreActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - doNotAssociateActionBuilder_.setMessage(builderForValue.build()); + ignoreActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 7; + actionCase_ = 9; return this; } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; */ - public Builder mergeDoNotAssociateAction( - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction value) { - if (doNotAssociateActionBuilder_ == null) { - if (actionCase_ == 7 - && action_ - != com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.getDefaultInstance()) { + public Builder mergeIgnoreAction(com.google.cloud.retail.v2alpha.Rule.IgnoreAction value) { + if (ignoreActionBuilder_ == null) { + if (actionCase_ == 9 + && action_ != com.google.cloud.retail.v2alpha.Rule.IgnoreAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.newBuilder( - (com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction) action_) + com.google.cloud.retail.v2alpha.Rule.IgnoreAction.newBuilder( + (com.google.cloud.retail.v2alpha.Rule.IgnoreAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -10208,38 +13690,37 @@ public Builder mergeDoNotAssociateAction( } onChanged(); } else { - if (actionCase_ == 7) { - doNotAssociateActionBuilder_.mergeFrom(value); + if (actionCase_ == 9) { + ignoreActionBuilder_.mergeFrom(value); } else { - doNotAssociateActionBuilder_.setMessage(value); + ignoreActionBuilder_.setMessage(value); } } - actionCase_ = 7; + actionCase_ = 9; return this; } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; */ - public Builder clearDoNotAssociateAction() { - if (doNotAssociateActionBuilder_ == null) { - if (actionCase_ == 7) { + public Builder clearIgnoreAction() { + if (ignoreActionBuilder_ == null) { + if (actionCase_ == 9) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 7) { + if (actionCase_ == 9) { actionCase_ = 0; action_ = null; } - doNotAssociateActionBuilder_.clear(); + ignoreActionBuilder_.clear(); } return this; } @@ -10247,178 +13728,170 @@ public Builder clearDoNotAssociateAction() { * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; */ - public com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.Builder - getDoNotAssociateActionBuilder() { - return getDoNotAssociateActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2alpha.Rule.IgnoreAction.Builder getIgnoreActionBuilder() { + return getIgnoreActionFieldBuilder().getBuilder(); } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.DoNotAssociateActionOrBuilder - getDoNotAssociateActionOrBuilder() { - if ((actionCase_ == 7) && (doNotAssociateActionBuilder_ != null)) { - return doNotAssociateActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2alpha.Rule.IgnoreActionOrBuilder getIgnoreActionOrBuilder() { + if ((actionCase_ == 9) && (ignoreActionBuilder_ != null)) { + return ignoreActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 7) { - return (com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction) action_; + if (actionCase_ == 9) { + return (com.google.cloud.retail.v2alpha.Rule.IgnoreAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.IgnoreAction.getDefaultInstance(); } } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2alpha.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction, - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.Builder, - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateActionOrBuilder> - getDoNotAssociateActionFieldBuilder() { - if (doNotAssociateActionBuilder_ == null) { - if (!(actionCase_ == 7)) { - action_ = com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.getDefaultInstance(); + com.google.cloud.retail.v2alpha.Rule.IgnoreAction, + com.google.cloud.retail.v2alpha.Rule.IgnoreAction.Builder, + com.google.cloud.retail.v2alpha.Rule.IgnoreActionOrBuilder> + getIgnoreActionFieldBuilder() { + if (ignoreActionBuilder_ == null) { + if (!(actionCase_ == 9)) { + action_ = com.google.cloud.retail.v2alpha.Rule.IgnoreAction.getDefaultInstance(); } - doNotAssociateActionBuilder_ = + ignoreActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction, - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.Builder, - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateActionOrBuilder>( - (com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction) action_, + com.google.cloud.retail.v2alpha.Rule.IgnoreAction, + com.google.cloud.retail.v2alpha.Rule.IgnoreAction.Builder, + com.google.cloud.retail.v2alpha.Rule.IgnoreActionOrBuilder>( + (com.google.cloud.retail.v2alpha.Rule.IgnoreAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 7; + actionCase_ = 9; onChanged(); - return doNotAssociateActionBuilder_; + return ignoreActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.ReplacementAction, - com.google.cloud.retail.v2alpha.Rule.ReplacementAction.Builder, - com.google.cloud.retail.v2alpha.Rule.ReplacementActionOrBuilder> - replacementActionBuilder_; + com.google.cloud.retail.v2alpha.Rule.FilterAction, + com.google.cloud.retail.v2alpha.Rule.FilterAction.Builder, + com.google.cloud.retail.v2alpha.Rule.FilterActionOrBuilder> + filterActionBuilder_; /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; * - * @return Whether the replacementAction field is set. + * @return Whether the filterAction field is set. */ @java.lang.Override - public boolean hasReplacementAction() { - return actionCase_ == 8; + public boolean hasFilterAction() { + return actionCase_ == 10; } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; * - * @return The replacementAction. + * @return The filterAction. */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.ReplacementAction getReplacementAction() { - if (replacementActionBuilder_ == null) { - if (actionCase_ == 8) { - return (com.google.cloud.retail.v2alpha.Rule.ReplacementAction) action_; + public com.google.cloud.retail.v2alpha.Rule.FilterAction getFilterAction() { + if (filterActionBuilder_ == null) { + if (actionCase_ == 10) { + return (com.google.cloud.retail.v2alpha.Rule.FilterAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.ReplacementAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.FilterAction.getDefaultInstance(); } else { - if (actionCase_ == 8) { - return replacementActionBuilder_.getMessage(); + if (actionCase_ == 10) { + return filterActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2alpha.Rule.ReplacementAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.FilterAction.getDefaultInstance(); } } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; */ - public Builder setReplacementAction( - com.google.cloud.retail.v2alpha.Rule.ReplacementAction value) { - if (replacementActionBuilder_ == null) { + public Builder setFilterAction(com.google.cloud.retail.v2alpha.Rule.FilterAction value) { + if (filterActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - replacementActionBuilder_.setMessage(value); + filterActionBuilder_.setMessage(value); } - actionCase_ = 8; + actionCase_ = 10; return this; } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; */ - public Builder setReplacementAction( - com.google.cloud.retail.v2alpha.Rule.ReplacementAction.Builder builderForValue) { - if (replacementActionBuilder_ == null) { + public Builder setFilterAction( + com.google.cloud.retail.v2alpha.Rule.FilterAction.Builder builderForValue) { + if (filterActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - replacementActionBuilder_.setMessage(builderForValue.build()); + filterActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 8; + actionCase_ = 10; return this; } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; */ - public Builder mergeReplacementAction( - com.google.cloud.retail.v2alpha.Rule.ReplacementAction value) { - if (replacementActionBuilder_ == null) { - if (actionCase_ == 8 - && action_ - != com.google.cloud.retail.v2alpha.Rule.ReplacementAction.getDefaultInstance()) { + public Builder mergeFilterAction(com.google.cloud.retail.v2alpha.Rule.FilterAction value) { + if (filterActionBuilder_ == null) { + if (actionCase_ == 10 + && action_ != com.google.cloud.retail.v2alpha.Rule.FilterAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2alpha.Rule.ReplacementAction.newBuilder( - (com.google.cloud.retail.v2alpha.Rule.ReplacementAction) action_) + com.google.cloud.retail.v2alpha.Rule.FilterAction.newBuilder( + (com.google.cloud.retail.v2alpha.Rule.FilterAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -10426,37 +13899,37 @@ public Builder mergeReplacementAction( } onChanged(); } else { - if (actionCase_ == 8) { - replacementActionBuilder_.mergeFrom(value); + if (actionCase_ == 10) { + filterActionBuilder_.mergeFrom(value); } else { - replacementActionBuilder_.setMessage(value); + filterActionBuilder_.setMessage(value); } } - actionCase_ = 8; + actionCase_ = 10; return this; } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; */ - public Builder clearReplacementAction() { - if (replacementActionBuilder_ == null) { - if (actionCase_ == 8) { + public Builder clearFilterAction() { + if (filterActionBuilder_ == null) { + if (actionCase_ == 10) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 8) { + if (actionCase_ == 10) { actionCase_ = 0; action_ = null; } - replacementActionBuilder_.clear(); + filterActionBuilder_.clear(); } return this; } @@ -10464,172 +13937,178 @@ public Builder clearReplacementAction() { * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; */ - public com.google.cloud.retail.v2alpha.Rule.ReplacementAction.Builder - getReplacementActionBuilder() { - return getReplacementActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2alpha.Rule.FilterAction.Builder getFilterActionBuilder() { + return getFilterActionFieldBuilder().getBuilder(); } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.ReplacementActionOrBuilder - getReplacementActionOrBuilder() { - if ((actionCase_ == 8) && (replacementActionBuilder_ != null)) { - return replacementActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2alpha.Rule.FilterActionOrBuilder getFilterActionOrBuilder() { + if ((actionCase_ == 10) && (filterActionBuilder_ != null)) { + return filterActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 8) { - return (com.google.cloud.retail.v2alpha.Rule.ReplacementAction) action_; + if (actionCase_ == 10) { + return (com.google.cloud.retail.v2alpha.Rule.FilterAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.ReplacementAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.FilterAction.getDefaultInstance(); } } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2alpha.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.ReplacementAction, - com.google.cloud.retail.v2alpha.Rule.ReplacementAction.Builder, - com.google.cloud.retail.v2alpha.Rule.ReplacementActionOrBuilder> - getReplacementActionFieldBuilder() { - if (replacementActionBuilder_ == null) { - if (!(actionCase_ == 8)) { - action_ = com.google.cloud.retail.v2alpha.Rule.ReplacementAction.getDefaultInstance(); + com.google.cloud.retail.v2alpha.Rule.FilterAction, + com.google.cloud.retail.v2alpha.Rule.FilterAction.Builder, + com.google.cloud.retail.v2alpha.Rule.FilterActionOrBuilder> + getFilterActionFieldBuilder() { + if (filterActionBuilder_ == null) { + if (!(actionCase_ == 10)) { + action_ = com.google.cloud.retail.v2alpha.Rule.FilterAction.getDefaultInstance(); } - replacementActionBuilder_ = + filterActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.ReplacementAction, - com.google.cloud.retail.v2alpha.Rule.ReplacementAction.Builder, - com.google.cloud.retail.v2alpha.Rule.ReplacementActionOrBuilder>( - (com.google.cloud.retail.v2alpha.Rule.ReplacementAction) action_, + com.google.cloud.retail.v2alpha.Rule.FilterAction, + com.google.cloud.retail.v2alpha.Rule.FilterAction.Builder, + com.google.cloud.retail.v2alpha.Rule.FilterActionOrBuilder>( + (com.google.cloud.retail.v2alpha.Rule.FilterAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 8; + actionCase_ = 10; onChanged(); - return replacementActionBuilder_; + return filterActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.IgnoreAction, - com.google.cloud.retail.v2alpha.Rule.IgnoreAction.Builder, - com.google.cloud.retail.v2alpha.Rule.IgnoreActionOrBuilder> - ignoreActionBuilder_; + com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction, + com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.Builder, + com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsActionOrBuilder> + twowaySynonymsActionBuilder_; /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * * - * @return Whether the ignoreAction field is set. + * @return Whether the twowaySynonymsAction field is set. */ @java.lang.Override - public boolean hasIgnoreAction() { - return actionCase_ == 9; + public boolean hasTwowaySynonymsAction() { + return actionCase_ == 11; } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * * - * @return The ignoreAction. + * @return The twowaySynonymsAction. */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.IgnoreAction getIgnoreAction() { - if (ignoreActionBuilder_ == null) { - if (actionCase_ == 9) { - return (com.google.cloud.retail.v2alpha.Rule.IgnoreAction) action_; + public com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction getTwowaySynonymsAction() { + if (twowaySynonymsActionBuilder_ == null) { + if (actionCase_ == 11) { + return (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.IgnoreAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.getDefaultInstance(); } else { - if (actionCase_ == 9) { - return ignoreActionBuilder_.getMessage(); + if (actionCase_ == 11) { + return twowaySynonymsActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2alpha.Rule.IgnoreAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.getDefaultInstance(); } } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * */ - public Builder setIgnoreAction(com.google.cloud.retail.v2alpha.Rule.IgnoreAction value) { - if (ignoreActionBuilder_ == null) { + public Builder setTwowaySynonymsAction( + com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction value) { + if (twowaySynonymsActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - ignoreActionBuilder_.setMessage(value); + twowaySynonymsActionBuilder_.setMessage(value); } - actionCase_ = 9; + actionCase_ = 11; return this; } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * */ - public Builder setIgnoreAction( - com.google.cloud.retail.v2alpha.Rule.IgnoreAction.Builder builderForValue) { - if (ignoreActionBuilder_ == null) { + public Builder setTwowaySynonymsAction( + com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.Builder builderForValue) { + if (twowaySynonymsActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - ignoreActionBuilder_.setMessage(builderForValue.build()); + twowaySynonymsActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 9; + actionCase_ = 11; return this; } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * */ - public Builder mergeIgnoreAction(com.google.cloud.retail.v2alpha.Rule.IgnoreAction value) { - if (ignoreActionBuilder_ == null) { - if (actionCase_ == 9 - && action_ != com.google.cloud.retail.v2alpha.Rule.IgnoreAction.getDefaultInstance()) { + public Builder mergeTwowaySynonymsAction( + com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction value) { + if (twowaySynonymsActionBuilder_ == null) { + if (actionCase_ == 11 + && action_ + != com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2alpha.Rule.IgnoreAction.newBuilder( - (com.google.cloud.retail.v2alpha.Rule.IgnoreAction) action_) + com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.newBuilder( + (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -10637,37 +14116,38 @@ public Builder mergeIgnoreAction(com.google.cloud.retail.v2alpha.Rule.IgnoreActi } onChanged(); } else { - if (actionCase_ == 9) { - ignoreActionBuilder_.mergeFrom(value); + if (actionCase_ == 11) { + twowaySynonymsActionBuilder_.mergeFrom(value); } else { - ignoreActionBuilder_.setMessage(value); + twowaySynonymsActionBuilder_.setMessage(value); } } - actionCase_ = 9; + actionCase_ = 11; return this; } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * */ - public Builder clearIgnoreAction() { - if (ignoreActionBuilder_ == null) { - if (actionCase_ == 9) { + public Builder clearTwowaySynonymsAction() { + if (twowaySynonymsActionBuilder_ == null) { + if (actionCase_ == 11) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 9) { + if (actionCase_ == 11) { actionCase_ = 0; action_ = null; } - ignoreActionBuilder_.clear(); + twowaySynonymsActionBuilder_.clear(); } return this; } @@ -10675,170 +14155,189 @@ public Builder clearIgnoreAction() { * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * */ - public com.google.cloud.retail.v2alpha.Rule.IgnoreAction.Builder getIgnoreActionBuilder() { - return getIgnoreActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.Builder + getTwowaySynonymsActionBuilder() { + return getTwowaySynonymsActionFieldBuilder().getBuilder(); } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.IgnoreActionOrBuilder getIgnoreActionOrBuilder() { - if ((actionCase_ == 9) && (ignoreActionBuilder_ != null)) { - return ignoreActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsActionOrBuilder + getTwowaySynonymsActionOrBuilder() { + if ((actionCase_ == 11) && (twowaySynonymsActionBuilder_ != null)) { + return twowaySynonymsActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 9) { - return (com.google.cloud.retail.v2alpha.Rule.IgnoreAction) action_; + if (actionCase_ == 11) { + return (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.IgnoreAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.getDefaultInstance(); } } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2alpha.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.IgnoreAction, - com.google.cloud.retail.v2alpha.Rule.IgnoreAction.Builder, - com.google.cloud.retail.v2alpha.Rule.IgnoreActionOrBuilder> - getIgnoreActionFieldBuilder() { - if (ignoreActionBuilder_ == null) { - if (!(actionCase_ == 9)) { - action_ = com.google.cloud.retail.v2alpha.Rule.IgnoreAction.getDefaultInstance(); + com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction, + com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.Builder, + com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsActionOrBuilder> + getTwowaySynonymsActionFieldBuilder() { + if (twowaySynonymsActionBuilder_ == null) { + if (!(actionCase_ == 11)) { + action_ = com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.getDefaultInstance(); } - ignoreActionBuilder_ = + twowaySynonymsActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.IgnoreAction, - com.google.cloud.retail.v2alpha.Rule.IgnoreAction.Builder, - com.google.cloud.retail.v2alpha.Rule.IgnoreActionOrBuilder>( - (com.google.cloud.retail.v2alpha.Rule.IgnoreAction) action_, + com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction, + com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.Builder, + com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsActionOrBuilder>( + (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 9; + actionCase_ = 11; onChanged(); - return ignoreActionBuilder_; + return twowaySynonymsActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.FilterAction, - com.google.cloud.retail.v2alpha.Rule.FilterAction.Builder, - com.google.cloud.retail.v2alpha.Rule.FilterActionOrBuilder> - filterActionBuilder_; + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.Builder, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetActionOrBuilder> + forceReturnFacetActionBuilder_; /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; + * + * .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * * - * @return Whether the filterAction field is set. + * @return Whether the forceReturnFacetAction field is set. */ @java.lang.Override - public boolean hasFilterAction() { - return actionCase_ == 10; + public boolean hasForceReturnFacetAction() { + return actionCase_ == 12; } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; + * + * .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * * - * @return The filterAction. + * @return The forceReturnFacetAction. */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.FilterAction getFilterAction() { - if (filterActionBuilder_ == null) { - if (actionCase_ == 10) { - return (com.google.cloud.retail.v2alpha.Rule.FilterAction) action_; + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction getForceReturnFacetAction() { + if (forceReturnFacetActionBuilder_ == null) { + if (actionCase_ == 12) { + return (com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.FilterAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.getDefaultInstance(); } else { - if (actionCase_ == 10) { - return filterActionBuilder_.getMessage(); + if (actionCase_ == 12) { + return forceReturnFacetActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2alpha.Rule.FilterAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.getDefaultInstance(); } } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; + * + * .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ - public Builder setFilterAction(com.google.cloud.retail.v2alpha.Rule.FilterAction value) { - if (filterActionBuilder_ == null) { + public Builder setForceReturnFacetAction( + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction value) { + if (forceReturnFacetActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - filterActionBuilder_.setMessage(value); + forceReturnFacetActionBuilder_.setMessage(value); } - actionCase_ = 10; + actionCase_ = 12; return this; } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; + * + * .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ - public Builder setFilterAction( - com.google.cloud.retail.v2alpha.Rule.FilterAction.Builder builderForValue) { - if (filterActionBuilder_ == null) { + public Builder setForceReturnFacetAction( + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.Builder builderForValue) { + if (forceReturnFacetActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - filterActionBuilder_.setMessage(builderForValue.build()); + forceReturnFacetActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 10; + actionCase_ = 12; return this; } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; + * + * .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ - public Builder mergeFilterAction(com.google.cloud.retail.v2alpha.Rule.FilterAction value) { - if (filterActionBuilder_ == null) { - if (actionCase_ == 10 - && action_ != com.google.cloud.retail.v2alpha.Rule.FilterAction.getDefaultInstance()) { + public Builder mergeForceReturnFacetAction( + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction value) { + if (forceReturnFacetActionBuilder_ == null) { + if (actionCase_ == 12 + && action_ + != com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction + .getDefaultInstance()) { action_ = - com.google.cloud.retail.v2alpha.Rule.FilterAction.newBuilder( - (com.google.cloud.retail.v2alpha.Rule.FilterAction) action_) + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.newBuilder( + (com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -10846,37 +14345,39 @@ public Builder mergeFilterAction(com.google.cloud.retail.v2alpha.Rule.FilterActi } onChanged(); } else { - if (actionCase_ == 10) { - filterActionBuilder_.mergeFrom(value); + if (actionCase_ == 12) { + forceReturnFacetActionBuilder_.mergeFrom(value); } else { - filterActionBuilder_.setMessage(value); + forceReturnFacetActionBuilder_.setMessage(value); } } - actionCase_ = 10; + actionCase_ = 12; return this; } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; + * + * .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ - public Builder clearFilterAction() { - if (filterActionBuilder_ == null) { - if (actionCase_ == 10) { + public Builder clearForceReturnFacetAction() { + if (forceReturnFacetActionBuilder_ == null) { + if (actionCase_ == 12) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 10) { + if (actionCase_ == 12) { actionCase_ = 0; action_ = null; } - filterActionBuilder_.clear(); + forceReturnFacetActionBuilder_.clear(); } return this; } @@ -10884,178 +14385,182 @@ public Builder clearFilterAction() { * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; + * + * .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ - public com.google.cloud.retail.v2alpha.Rule.FilterAction.Builder getFilterActionBuilder() { - return getFilterActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.Builder + getForceReturnFacetActionBuilder() { + return getForceReturnFacetActionFieldBuilder().getBuilder(); } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; + * + * .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.FilterActionOrBuilder getFilterActionOrBuilder() { - if ((actionCase_ == 10) && (filterActionBuilder_ != null)) { - return filterActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetActionOrBuilder + getForceReturnFacetActionOrBuilder() { + if ((actionCase_ == 12) && (forceReturnFacetActionBuilder_ != null)) { + return forceReturnFacetActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 10) { - return (com.google.cloud.retail.v2alpha.Rule.FilterAction) action_; + if (actionCase_ == 12) { + return (com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.FilterAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.getDefaultInstance(); } } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2alpha.Rule.FilterAction filter_action = 10; + * + * .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.FilterAction, - com.google.cloud.retail.v2alpha.Rule.FilterAction.Builder, - com.google.cloud.retail.v2alpha.Rule.FilterActionOrBuilder> - getFilterActionFieldBuilder() { - if (filterActionBuilder_ == null) { - if (!(actionCase_ == 10)) { - action_ = com.google.cloud.retail.v2alpha.Rule.FilterAction.getDefaultInstance(); + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.Builder, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetActionOrBuilder> + getForceReturnFacetActionFieldBuilder() { + if (forceReturnFacetActionBuilder_ == null) { + if (!(actionCase_ == 12)) { + action_ = + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.getDefaultInstance(); } - filterActionBuilder_ = + forceReturnFacetActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.FilterAction, - com.google.cloud.retail.v2alpha.Rule.FilterAction.Builder, - com.google.cloud.retail.v2alpha.Rule.FilterActionOrBuilder>( - (com.google.cloud.retail.v2alpha.Rule.FilterAction) action_, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.Builder, + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetActionOrBuilder>( + (com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 10; + actionCase_ = 12; onChanged(); - return filterActionBuilder_; + return forceReturnFacetActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction, - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.Builder, - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsActionOrBuilder> - twowaySynonymsActionBuilder_; + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction, + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.Builder, + com.google.cloud.retail.v2alpha.Rule.RemoveFacetActionOrBuilder> + removeFacetActionBuilder_; /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2alpha.Rule.RemoveFacetAction remove_facet_action = 13; * - * @return Whether the twowaySynonymsAction field is set. + * @return Whether the removeFacetAction field is set. */ @java.lang.Override - public boolean hasTwowaySynonymsAction() { - return actionCase_ == 11; + public boolean hasRemoveFacetAction() { + return actionCase_ == 13; } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2alpha.Rule.RemoveFacetAction remove_facet_action = 13; * - * @return The twowaySynonymsAction. + * @return The removeFacetAction. */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction getTwowaySynonymsAction() { - if (twowaySynonymsActionBuilder_ == null) { - if (actionCase_ == 11) { - return (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_; + public com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction getRemoveFacetAction() { + if (removeFacetActionBuilder_ == null) { + if (actionCase_ == 13) { + return (com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.getDefaultInstance(); } else { - if (actionCase_ == 11) { - return twowaySynonymsActionBuilder_.getMessage(); + if (actionCase_ == 13) { + return removeFacetActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.getDefaultInstance(); } } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2alpha.Rule.RemoveFacetAction remove_facet_action = 13; */ - public Builder setTwowaySynonymsAction( - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction value) { - if (twowaySynonymsActionBuilder_ == null) { + public Builder setRemoveFacetAction( + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction value) { + if (removeFacetActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - twowaySynonymsActionBuilder_.setMessage(value); + removeFacetActionBuilder_.setMessage(value); } - actionCase_ = 11; + actionCase_ = 13; return this; } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2alpha.Rule.RemoveFacetAction remove_facet_action = 13; */ - public Builder setTwowaySynonymsAction( - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.Builder builderForValue) { - if (twowaySynonymsActionBuilder_ == null) { + public Builder setRemoveFacetAction( + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.Builder builderForValue) { + if (removeFacetActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - twowaySynonymsActionBuilder_.setMessage(builderForValue.build()); + removeFacetActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 11; + actionCase_ = 13; return this; } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2alpha.Rule.RemoveFacetAction remove_facet_action = 13; */ - public Builder mergeTwowaySynonymsAction( - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction value) { - if (twowaySynonymsActionBuilder_ == null) { - if (actionCase_ == 11 + public Builder mergeRemoveFacetAction( + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction value) { + if (removeFacetActionBuilder_ == null) { + if (actionCase_ == 13 && action_ - != com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.getDefaultInstance()) { + != com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.newBuilder( - (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_) + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.newBuilder( + (com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -11063,38 +14568,37 @@ public Builder mergeTwowaySynonymsAction( } onChanged(); } else { - if (actionCase_ == 11) { - twowaySynonymsActionBuilder_.mergeFrom(value); + if (actionCase_ == 13) { + removeFacetActionBuilder_.mergeFrom(value); } else { - twowaySynonymsActionBuilder_.setMessage(value); + removeFacetActionBuilder_.setMessage(value); } } - actionCase_ = 11; + actionCase_ = 13; return this; } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2alpha.Rule.RemoveFacetAction remove_facet_action = 13; */ - public Builder clearTwowaySynonymsAction() { - if (twowaySynonymsActionBuilder_ == null) { - if (actionCase_ == 11) { + public Builder clearRemoveFacetAction() { + if (removeFacetActionBuilder_ == null) { + if (actionCase_ == 13) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 11) { + if (actionCase_ == 13) { actionCase_ = 0; action_ = null; } - twowaySynonymsActionBuilder_.clear(); + removeFacetActionBuilder_.clear(); } return this; } @@ -11102,70 +14606,67 @@ public Builder clearTwowaySynonymsAction() { * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2alpha.Rule.RemoveFacetAction remove_facet_action = 13; */ - public com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.Builder - getTwowaySynonymsActionBuilder() { - return getTwowaySynonymsActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.Builder + getRemoveFacetActionBuilder() { + return getRemoveFacetActionFieldBuilder().getBuilder(); } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2alpha.Rule.RemoveFacetAction remove_facet_action = 13; */ @java.lang.Override - public com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsActionOrBuilder - getTwowaySynonymsActionOrBuilder() { - if ((actionCase_ == 11) && (twowaySynonymsActionBuilder_ != null)) { - return twowaySynonymsActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2alpha.Rule.RemoveFacetActionOrBuilder + getRemoveFacetActionOrBuilder() { + if ((actionCase_ == 13) && (removeFacetActionBuilder_ != null)) { + return removeFacetActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 11) { - return (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_; + if (actionCase_ == 13) { + return (com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction) action_; } - return com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.getDefaultInstance(); } } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2alpha.Rule.RemoveFacetAction remove_facet_action = 13; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction, - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.Builder, - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsActionOrBuilder> - getTwowaySynonymsActionFieldBuilder() { - if (twowaySynonymsActionBuilder_ == null) { - if (!(actionCase_ == 11)) { - action_ = com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.getDefaultInstance(); - } - twowaySynonymsActionBuilder_ = + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction, + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.Builder, + com.google.cloud.retail.v2alpha.Rule.RemoveFacetActionOrBuilder> + getRemoveFacetActionFieldBuilder() { + if (removeFacetActionBuilder_ == null) { + if (!(actionCase_ == 13)) { + action_ = com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.getDefaultInstance(); + } + removeFacetActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction, - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.Builder, - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsActionOrBuilder>( - (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_, + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction, + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction.Builder, + com.google.cloud.retail.v2alpha.Rule.RemoveFacetActionOrBuilder>( + (com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 11; + actionCase_ = 13; onChanged(); - return twowaySynonymsActionBuilder_; + return removeFacetActionBuilder_; } private com.google.cloud.retail.v2alpha.Condition condition_; @@ -11189,7 +14690,7 @@ public Builder clearTwowaySynonymsAction() { * @return Whether the condition field is set. */ public boolean hasCondition() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * @@ -11235,7 +14736,7 @@ public Builder setCondition(com.google.cloud.retail.v2alpha.Condition value) { } else { conditionBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -11257,7 +14758,7 @@ public Builder setCondition(com.google.cloud.retail.v2alpha.Condition.Builder bu } else { conditionBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -11275,7 +14776,7 @@ public Builder setCondition(com.google.cloud.retail.v2alpha.Condition.Builder bu */ public Builder mergeCondition(com.google.cloud.retail.v2alpha.Condition value) { if (conditionBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000400) != 0) && condition_ != null && condition_ != com.google.cloud.retail.v2alpha.Condition.getDefaultInstance()) { getConditionBuilder().mergeFrom(value); @@ -11286,7 +14787,7 @@ public Builder mergeCondition(com.google.cloud.retail.v2alpha.Condition value) { conditionBuilder_.mergeFrom(value); } if (condition_ != null) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); } return this; @@ -11304,7 +14805,7 @@ public Builder mergeCondition(com.google.cloud.retail.v2alpha.Condition value) { * */ public Builder clearCondition() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000400); condition_ = null; if (conditionBuilder_ != null) { conditionBuilder_.dispose(); @@ -11326,7 +14827,7 @@ public Builder clearCondition() { * */ public com.google.cloud.retail.v2alpha.Condition.Builder getConditionBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); return getConditionFieldBuilder().getBuilder(); } diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RuleOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RuleOrBuilder.java index 502672d5abde..db126793ae92 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RuleOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RuleOrBuilder.java @@ -316,6 +316,80 @@ public interface RuleOrBuilder com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsActionOrBuilder getTwowaySynonymsActionOrBuilder(); + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + * + * @return Whether the forceReturnFacetAction field is set. + */ + boolean hasForceReturnFacetAction(); + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + * + * @return The forceReturnFacetAction. + */ + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction getForceReturnFacetAction(); + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + */ + com.google.cloud.retail.v2alpha.Rule.ForceReturnFacetActionOrBuilder + getForceReturnFacetActionOrBuilder(); + + /** + * + * + *
+   * Remove an attribute as a facet in the request (if present).
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.RemoveFacetAction remove_facet_action = 13; + * + * @return Whether the removeFacetAction field is set. + */ + boolean hasRemoveFacetAction(); + /** + * + * + *
+   * Remove an attribute as a facet in the request (if present).
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.RemoveFacetAction remove_facet_action = 13; + * + * @return The removeFacetAction. + */ + com.google.cloud.retail.v2alpha.Rule.RemoveFacetAction getRemoveFacetAction(); + /** + * + * + *
+   * Remove an attribute as a facet in the request (if present).
+   * 
+ * + * .google.cloud.retail.v2alpha.Rule.RemoveFacetAction remove_facet_action = 13; + */ + com.google.cloud.retail.v2alpha.Rule.RemoveFacetActionOrBuilder getRemoveFacetActionOrBuilder(); + /** * * diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequest.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequest.java index 5cd66c507647..2fca878f089e 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequest.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequest.java @@ -738,15 +738,15 @@ public interface FacetSpecOrBuilder *
      * Enables dynamic position for this facet. If set to true, the position of
      * this facet among all facets in the response is determined by Google
-     * Retail Search. It will be ordered together with dynamic facets if dynamic
+     * Retail Search. It is ordered together with dynamic facets if dynamic
      * facets is enabled. If set to false, the position of this facet in the
-     * response will be the same as in the request, and it will be ranked before
+     * response is the same as in the request, and it is ranked before
      * the facets with dynamic position enable and all dynamic facets.
      *
      * For example, you may always want to have rating facet returned in
      * the response, but it's not necessarily to always display the rating facet
      * at the top. In that case, you can set enable_dynamic_position to true so
-     * that the position of rating facet in response will be determined by
+     * that the position of rating facet in response is determined by
      * Google Retail Search.
      *
      * Another example, assuming you have the following facets in the request:
@@ -757,13 +757,13 @@ public interface FacetSpecOrBuilder
      *
      * * "brands", enable_dynamic_position = false
      *
-     * And also you have a dynamic facets enable, which will generate a facet
-     * 'gender'. Then the final order of the facets in the response can be
+     * And also you have a dynamic facets enable, which generates a facet
+     * "gender". Then, the final order of the facets in the response can be
      * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
      * "rating") depends on how Google Retail Search orders "gender" and
-     * "rating" facets. However, notice that "price" and "brands" will always be
-     * ranked at 1st and 2nd position since their enable_dynamic_position are
-     * false.
+     * "rating" facets. However, notice that "price" and "brands" are always
+     * ranked at first and second position because their enable_dynamic_position
+     * values are false.
      * 
* * bool enable_dynamic_position = 4; @@ -935,13 +935,13 @@ public interface FacetKeyOrBuilder * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -956,13 +956,13 @@ public interface FacetKeyOrBuilder * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -977,13 +977,13 @@ public interface FacetKeyOrBuilder * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -998,13 +998,13 @@ public interface FacetKeyOrBuilder * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -1020,13 +1020,13 @@ public interface FacetKeyOrBuilder * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -1187,7 +1187,7 @@ public interface FacetKeyOrBuilder * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1203,7 +1203,7 @@ public interface FacetKeyOrBuilder * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1219,7 +1219,7 @@ public interface FacetKeyOrBuilder * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1236,7 +1236,7 @@ public interface FacetKeyOrBuilder * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1254,7 +1254,7 @@ public interface FacetKeyOrBuilder * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. *
* @@ -1270,7 +1270,7 @@ public interface FacetKeyOrBuilder * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. *
* @@ -1286,7 +1286,7 @@ public interface FacetKeyOrBuilder * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. *
* @@ -1303,7 +1303,7 @@ public interface FacetKeyOrBuilder * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. *
* @@ -1400,7 +1400,7 @@ public interface FacetKeyOrBuilder * *
        * The query that is used to compute facet for the given facet key.
-       * When provided, it will override the default behavior of facet
+       * When provided, it overrides the default behavior of facet
        * computation. The query syntax is the same as a filter expression. See
        * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
        * for detail syntax and limitations. Notice that there is no limitation
@@ -1410,9 +1410,9 @@ public interface FacetKeyOrBuilder
        *
        * In the response,
        * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
-       * will be always "1" and
+       * is always "1" and
        * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
-       * will be the number of results that match the query.
+       * is the number of results that match the query.
        *
        * For example, you can set a customized facet for "shipToStore",
        * where
@@ -1420,7 +1420,7 @@ public interface FacetKeyOrBuilder
        * is "customizedShipToStore", and
        * [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query]
        * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-       * Then the facet will count the products that are both in stock and ship
+       * Then the facet counts the products that are both in stock and ship
        * to store "123".
        * 
* @@ -1434,7 +1434,7 @@ public interface FacetKeyOrBuilder * *
        * The query that is used to compute facet for the given facet key.
-       * When provided, it will override the default behavior of facet
+       * When provided, it overrides the default behavior of facet
        * computation. The query syntax is the same as a filter expression. See
        * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
        * for detail syntax and limitations. Notice that there is no limitation
@@ -1444,9 +1444,9 @@ public interface FacetKeyOrBuilder
        *
        * In the response,
        * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
-       * will be always "1" and
+       * is always "1" and
        * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
-       * will be the number of results that match the query.
+       * is the number of results that match the query.
        *
        * For example, you can set a customized facet for "shipToStore",
        * where
@@ -1454,7 +1454,7 @@ public interface FacetKeyOrBuilder
        * is "customizedShipToStore", and
        * [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query]
        * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-       * Then the facet will count the products that are both in stock and ship
+       * Then the facet counts the products that are both in stock and ship
        * to store "123".
        * 
* @@ -1672,13 +1672,13 @@ public com.google.protobuf.ByteString getKeyBytes() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -1696,13 +1696,13 @@ public java.util.List getIntervalsList * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -1721,13 +1721,13 @@ public java.util.List getIntervalsList * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -1745,13 +1745,13 @@ public int getIntervalsCount() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -1769,13 +1769,13 @@ public com.google.cloud.retail.v2alpha.Interval getIntervals(int index) { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -1957,7 +1957,7 @@ public com.google.protobuf.ByteString getRestrictedValuesBytes(int index) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1975,7 +1975,7 @@ public com.google.protobuf.ProtocolStringList getPrefixesList() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1993,7 +1993,7 @@ public int getPrefixesCount() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -2012,7 +2012,7 @@ public java.lang.String getPrefixes(int index) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -2037,7 +2037,7 @@ public com.google.protobuf.ByteString getPrefixesBytes(int index) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. *
* @@ -2055,7 +2055,7 @@ public com.google.protobuf.ProtocolStringList getContainsList() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. *
* @@ -2073,7 +2073,7 @@ public int getContainsCount() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -2092,7 +2092,7 @@ public java.lang.String getContains(int index) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -2226,7 +2226,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { * *
        * The query that is used to compute facet for the given facet key.
-       * When provided, it will override the default behavior of facet
+       * When provided, it overrides the default behavior of facet
        * computation. The query syntax is the same as a filter expression. See
        * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
        * for detail syntax and limitations. Notice that there is no limitation
@@ -2236,9 +2236,9 @@ public com.google.protobuf.ByteString getOrderByBytes() {
        *
        * In the response,
        * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
-       * will be always "1" and
+       * is always "1" and
        * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
-       * will be the number of results that match the query.
+       * is the number of results that match the query.
        *
        * For example, you can set a customized facet for "shipToStore",
        * where
@@ -2246,7 +2246,7 @@ public com.google.protobuf.ByteString getOrderByBytes() {
        * is "customizedShipToStore", and
        * [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query]
        * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-       * Then the facet will count the products that are both in stock and ship
+       * Then the facet counts the products that are both in stock and ship
        * to store "123".
        * 
* @@ -2271,7 +2271,7 @@ public java.lang.String getQuery() { * *
        * The query that is used to compute facet for the given facet key.
-       * When provided, it will override the default behavior of facet
+       * When provided, it overrides the default behavior of facet
        * computation. The query syntax is the same as a filter expression. See
        * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
        * for detail syntax and limitations. Notice that there is no limitation
@@ -2281,9 +2281,9 @@ public java.lang.String getQuery() {
        *
        * In the response,
        * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
-       * will be always "1" and
+       * is always "1" and
        * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
-       * will be the number of results that match the query.
+       * is the number of results that match the query.
        *
        * For example, you can set a customized facet for "shipToStore",
        * where
@@ -2291,7 +2291,7 @@ public java.lang.String getQuery() {
        * is "customizedShipToStore", and
        * [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query]
        * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-       * Then the facet will count the products that are both in stock and ship
+       * Then the facet counts the products that are both in stock and ship
        * to store "123".
        * 
* @@ -3298,13 +3298,13 @@ private void ensureIntervalsIsMutable() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3325,13 +3325,13 @@ public java.util.List getIntervalsList * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3352,13 +3352,13 @@ public int getIntervalsCount() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3379,13 +3379,13 @@ public com.google.cloud.retail.v2alpha.Interval getIntervals(int index) { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3412,13 +3412,13 @@ public Builder setIntervals(int index, com.google.cloud.retail.v2alpha.Interval * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3443,13 +3443,13 @@ public Builder setIntervals( * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3476,13 +3476,13 @@ public Builder addIntervals(com.google.cloud.retail.v2alpha.Interval value) { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3509,13 +3509,13 @@ public Builder addIntervals(int index, com.google.cloud.retail.v2alpha.Interval * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3540,13 +3540,13 @@ public Builder addIntervals( * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3571,13 +3571,13 @@ public Builder addIntervals( * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3602,13 +3602,13 @@ public Builder addAllIntervals( * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3632,13 +3632,13 @@ public Builder clearIntervals() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3662,13 +3662,13 @@ public Builder removeIntervals(int index) { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3685,13 +3685,13 @@ public com.google.cloud.retail.v2alpha.Interval.Builder getIntervalsBuilder(int * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3712,13 +3712,13 @@ public com.google.cloud.retail.v2alpha.IntervalOrBuilder getIntervalsOrBuilder(i * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3740,13 +3740,13 @@ public com.google.cloud.retail.v2alpha.IntervalOrBuilder getIntervalsOrBuilder(i * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3764,13 +3764,13 @@ public com.google.cloud.retail.v2alpha.Interval.Builder addIntervalsBuilder() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -3788,13 +3788,13 @@ public com.google.cloud.retail.v2alpha.Interval.Builder addIntervalsBuilder(int * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2alpha.Interval intervals = 2; @@ -4230,7 +4230,7 @@ private void ensurePrefixesIsMutable() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4249,7 +4249,7 @@ public com.google.protobuf.ProtocolStringList getPrefixesList() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4267,7 +4267,7 @@ public int getPrefixesCount() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4286,7 +4286,7 @@ public java.lang.String getPrefixes(int index) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4305,7 +4305,7 @@ public com.google.protobuf.ByteString getPrefixesBytes(int index) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4332,7 +4332,7 @@ public Builder setPrefixes(int index, java.lang.String value) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4358,7 +4358,7 @@ public Builder addPrefixes(java.lang.String value) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4381,7 +4381,7 @@ public Builder addAllPrefixes(java.lang.Iterable values) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4403,7 +4403,7 @@ public Builder clearPrefixes() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4440,7 +4440,7 @@ private void ensureContainsIsMutable() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4459,7 +4459,7 @@ public com.google.protobuf.ProtocolStringList getContainsList() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4477,7 +4477,7 @@ public int getContainsCount() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4496,7 +4496,7 @@ public java.lang.String getContains(int index) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4515,7 +4515,7 @@ public com.google.protobuf.ByteString getContainsBytes(int index) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4542,7 +4542,7 @@ public Builder setContains(int index, java.lang.String value) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4568,7 +4568,7 @@ public Builder addContains(java.lang.String value) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4591,7 +4591,7 @@ public Builder addAllContains(java.lang.Iterable values) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4613,7 +4613,7 @@ public Builder clearContains() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4907,7 +4907,7 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) { * *
          * The query that is used to compute facet for the given facet key.
-         * When provided, it will override the default behavior of facet
+         * When provided, it overrides the default behavior of facet
          * computation. The query syntax is the same as a filter expression. See
          * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
          * for detail syntax and limitations. Notice that there is no limitation
@@ -4917,9 +4917,9 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) {
          *
          * In the response,
          * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
-         * will be always "1" and
+         * is always "1" and
          * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
-         * will be the number of results that match the query.
+         * is the number of results that match the query.
          *
          * For example, you can set a customized facet for "shipToStore",
          * where
@@ -4927,7 +4927,7 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) {
          * is "customizedShipToStore", and
          * [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query]
          * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-         * Then the facet will count the products that are both in stock and ship
+         * Then the facet counts the products that are both in stock and ship
          * to store "123".
          * 
* @@ -4951,7 +4951,7 @@ public java.lang.String getQuery() { * *
          * The query that is used to compute facet for the given facet key.
-         * When provided, it will override the default behavior of facet
+         * When provided, it overrides the default behavior of facet
          * computation. The query syntax is the same as a filter expression. See
          * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
          * for detail syntax and limitations. Notice that there is no limitation
@@ -4961,9 +4961,9 @@ public java.lang.String getQuery() {
          *
          * In the response,
          * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
-         * will be always "1" and
+         * is always "1" and
          * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
-         * will be the number of results that match the query.
+         * is the number of results that match the query.
          *
          * For example, you can set a customized facet for "shipToStore",
          * where
@@ -4971,7 +4971,7 @@ public java.lang.String getQuery() {
          * is "customizedShipToStore", and
          * [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query]
          * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-         * Then the facet will count the products that are both in stock and ship
+         * Then the facet counts the products that are both in stock and ship
          * to store "123".
          * 
* @@ -4995,7 +4995,7 @@ public com.google.protobuf.ByteString getQueryBytes() { * *
          * The query that is used to compute facet for the given facet key.
-         * When provided, it will override the default behavior of facet
+         * When provided, it overrides the default behavior of facet
          * computation. The query syntax is the same as a filter expression. See
          * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
          * for detail syntax and limitations. Notice that there is no limitation
@@ -5005,9 +5005,9 @@ public com.google.protobuf.ByteString getQueryBytes() {
          *
          * In the response,
          * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
-         * will be always "1" and
+         * is always "1" and
          * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
-         * will be the number of results that match the query.
+         * is the number of results that match the query.
          *
          * For example, you can set a customized facet for "shipToStore",
          * where
@@ -5015,7 +5015,7 @@ public com.google.protobuf.ByteString getQueryBytes() {
          * is "customizedShipToStore", and
          * [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query]
          * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-         * Then the facet will count the products that are both in stock and ship
+         * Then the facet counts the products that are both in stock and ship
          * to store "123".
          * 
* @@ -5038,7 +5038,7 @@ public Builder setQuery(java.lang.String value) { * *
          * The query that is used to compute facet for the given facet key.
-         * When provided, it will override the default behavior of facet
+         * When provided, it overrides the default behavior of facet
          * computation. The query syntax is the same as a filter expression. See
          * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
          * for detail syntax and limitations. Notice that there is no limitation
@@ -5048,9 +5048,9 @@ public Builder setQuery(java.lang.String value) {
          *
          * In the response,
          * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
-         * will be always "1" and
+         * is always "1" and
          * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
-         * will be the number of results that match the query.
+         * is the number of results that match the query.
          *
          * For example, you can set a customized facet for "shipToStore",
          * where
@@ -5058,7 +5058,7 @@ public Builder setQuery(java.lang.String value) {
          * is "customizedShipToStore", and
          * [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query]
          * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-         * Then the facet will count the products that are both in stock and ship
+         * Then the facet counts the products that are both in stock and ship
          * to store "123".
          * 
* @@ -5077,7 +5077,7 @@ public Builder clearQuery() { * *
          * The query that is used to compute facet for the given facet key.
-         * When provided, it will override the default behavior of facet
+         * When provided, it overrides the default behavior of facet
          * computation. The query syntax is the same as a filter expression. See
          * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
          * for detail syntax and limitations. Notice that there is no limitation
@@ -5087,9 +5087,9 @@ public Builder clearQuery() {
          *
          * In the response,
          * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
-         * will be always "1" and
+         * is always "1" and
          * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
-         * will be the number of results that match the query.
+         * is the number of results that match the query.
          *
          * For example, you can set a customized facet for "shipToStore",
          * where
@@ -5097,7 +5097,7 @@ public Builder clearQuery() {
          * is "customizedShipToStore", and
          * [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query]
          * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-         * Then the facet will count the products that are both in stock and ship
+         * Then the facet counts the products that are both in stock and ship
          * to store "123".
          * 
* @@ -5500,15 +5500,15 @@ public com.google.protobuf.ByteString getExcludedFilterKeysBytes(int index) { *
      * Enables dynamic position for this facet. If set to true, the position of
      * this facet among all facets in the response is determined by Google
-     * Retail Search. It will be ordered together with dynamic facets if dynamic
+     * Retail Search. It is ordered together with dynamic facets if dynamic
      * facets is enabled. If set to false, the position of this facet in the
-     * response will be the same as in the request, and it will be ranked before
+     * response is the same as in the request, and it is ranked before
      * the facets with dynamic position enable and all dynamic facets.
      *
      * For example, you may always want to have rating facet returned in
      * the response, but it's not necessarily to always display the rating facet
      * at the top. In that case, you can set enable_dynamic_position to true so
-     * that the position of rating facet in response will be determined by
+     * that the position of rating facet in response is determined by
      * Google Retail Search.
      *
      * Another example, assuming you have the following facets in the request:
@@ -5519,13 +5519,13 @@ public com.google.protobuf.ByteString getExcludedFilterKeysBytes(int index) {
      *
      * * "brands", enable_dynamic_position = false
      *
-     * And also you have a dynamic facets enable, which will generate a facet
-     * 'gender'. Then the final order of the facets in the response can be
+     * And also you have a dynamic facets enable, which generates a facet
+     * "gender". Then, the final order of the facets in the response can be
      * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
      * "rating") depends on how Google Retail Search orders "gender" and
-     * "rating" facets. However, notice that "price" and "brands" will always be
-     * ranked at 1st and 2nd position since their enable_dynamic_position are
-     * false.
+     * "rating" facets. However, notice that "price" and "brands" are always
+     * ranked at first and second position because their enable_dynamic_position
+     * values are false.
      * 
* * bool enable_dynamic_position = 4; @@ -6688,15 +6688,15 @@ public Builder addExcludedFilterKeysBytes(com.google.protobuf.ByteString value) *
        * Enables dynamic position for this facet. If set to true, the position of
        * this facet among all facets in the response is determined by Google
-       * Retail Search. It will be ordered together with dynamic facets if dynamic
+       * Retail Search. It is ordered together with dynamic facets if dynamic
        * facets is enabled. If set to false, the position of this facet in the
-       * response will be the same as in the request, and it will be ranked before
+       * response is the same as in the request, and it is ranked before
        * the facets with dynamic position enable and all dynamic facets.
        *
        * For example, you may always want to have rating facet returned in
        * the response, but it's not necessarily to always display the rating facet
        * at the top. In that case, you can set enable_dynamic_position to true so
-       * that the position of rating facet in response will be determined by
+       * that the position of rating facet in response is determined by
        * Google Retail Search.
        *
        * Another example, assuming you have the following facets in the request:
@@ -6707,13 +6707,13 @@ public Builder addExcludedFilterKeysBytes(com.google.protobuf.ByteString value)
        *
        * * "brands", enable_dynamic_position = false
        *
-       * And also you have a dynamic facets enable, which will generate a facet
-       * 'gender'. Then the final order of the facets in the response can be
+       * And also you have a dynamic facets enable, which generates a facet
+       * "gender". Then, the final order of the facets in the response can be
        * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
        * "rating") depends on how Google Retail Search orders "gender" and
-       * "rating" facets. However, notice that "price" and "brands" will always be
-       * ranked at 1st and 2nd position since their enable_dynamic_position are
-       * false.
+       * "rating" facets. However, notice that "price" and "brands" are always
+       * ranked at first and second position because their enable_dynamic_position
+       * values are false.
        * 
* * bool enable_dynamic_position = 4; @@ -6730,15 +6730,15 @@ public boolean getEnableDynamicPosition() { *
        * Enables dynamic position for this facet. If set to true, the position of
        * this facet among all facets in the response is determined by Google
-       * Retail Search. It will be ordered together with dynamic facets if dynamic
+       * Retail Search. It is ordered together with dynamic facets if dynamic
        * facets is enabled. If set to false, the position of this facet in the
-       * response will be the same as in the request, and it will be ranked before
+       * response is the same as in the request, and it is ranked before
        * the facets with dynamic position enable and all dynamic facets.
        *
        * For example, you may always want to have rating facet returned in
        * the response, but it's not necessarily to always display the rating facet
        * at the top. In that case, you can set enable_dynamic_position to true so
-       * that the position of rating facet in response will be determined by
+       * that the position of rating facet in response is determined by
        * Google Retail Search.
        *
        * Another example, assuming you have the following facets in the request:
@@ -6749,13 +6749,13 @@ public boolean getEnableDynamicPosition() {
        *
        * * "brands", enable_dynamic_position = false
        *
-       * And also you have a dynamic facets enable, which will generate a facet
-       * 'gender'. Then the final order of the facets in the response can be
+       * And also you have a dynamic facets enable, which generates a facet
+       * "gender". Then, the final order of the facets in the response can be
        * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
        * "rating") depends on how Google Retail Search orders "gender" and
-       * "rating" facets. However, notice that "price" and "brands" will always be
-       * ranked at 1st and 2nd position since their enable_dynamic_position are
-       * false.
+       * "rating" facets. However, notice that "price" and "brands" are always
+       * ranked at first and second position because their enable_dynamic_position
+       * values are false.
        * 
* * bool enable_dynamic_position = 4; @@ -6776,15 +6776,15 @@ public Builder setEnableDynamicPosition(boolean value) { *
        * Enables dynamic position for this facet. If set to true, the position of
        * this facet among all facets in the response is determined by Google
-       * Retail Search. It will be ordered together with dynamic facets if dynamic
+       * Retail Search. It is ordered together with dynamic facets if dynamic
        * facets is enabled. If set to false, the position of this facet in the
-       * response will be the same as in the request, and it will be ranked before
+       * response is the same as in the request, and it is ranked before
        * the facets with dynamic position enable and all dynamic facets.
        *
        * For example, you may always want to have rating facet returned in
        * the response, but it's not necessarily to always display the rating facet
        * at the top. In that case, you can set enable_dynamic_position to true so
-       * that the position of rating facet in response will be determined by
+       * that the position of rating facet in response is determined by
        * Google Retail Search.
        *
        * Another example, assuming you have the following facets in the request:
@@ -6795,13 +6795,13 @@ public Builder setEnableDynamicPosition(boolean value) {
        *
        * * "brands", enable_dynamic_position = false
        *
-       * And also you have a dynamic facets enable, which will generate a facet
-       * 'gender'. Then the final order of the facets in the response can be
+       * And also you have a dynamic facets enable, which generates a facet
+       * "gender". Then, the final order of the facets in the response can be
        * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
        * "rating") depends on how Google Retail Search orders "gender" and
-       * "rating" facets. However, notice that "price" and "brands" will always be
-       * ranked at 1st and 2nd position since their enable_dynamic_position are
-       * false.
+       * "rating" facets. However, notice that "price" and "brands" are always
+       * ranked at first and second position because their enable_dynamic_position
+       * values are false.
        * 
* * bool enable_dynamic_position = 4; @@ -12593,7 +12593,7 @@ public com.google.protobuf.Parser getParserForType() { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -12621,7 +12621,7 @@ public java.lang.String getPlacement() { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -13006,8 +13006,8 @@ public int getOffset() { *
    * The filter syntax consists of an expression language for constructing a
    * predicate from one or more fields of the products being filtered. Filter
-   * expression is case-sensitive. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+   * expression is case-sensitive. For more information, see
+   * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -13034,8 +13034,8 @@ public java.lang.String getFilter() { *
    * The filter syntax consists of an expression language for constructing a
    * predicate from one or more fields of the products being filtered. Filter
-   * expression is case-sensitive. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+   * expression is case-sensitive. For more information, see
+   * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -13069,15 +13069,14 @@ public com.google.protobuf.ByteString getFilterBytes() { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2alpha.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See - * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -13104,15 +13103,14 @@ public java.lang.String getCanonicalFilter() { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2alpha.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See - * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -13142,9 +13140,9 @@ public com.google.protobuf.ByteString getCanonicalFilterBytes() { *
    * The order in which products are returned. Products can be ordered by
    * a field in an [Product][google.cloud.retail.v2alpha.Product] object. Leave
-   * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-   * more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+   * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+   * more information, see
+   * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -13171,9 +13169,9 @@ public java.lang.String getOrderBy() { *
    * The order in which products are returned. Products can be ordered by
    * a field in an [Product][google.cloud.retail.v2alpha.Product] object. Leave
-   * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-   * more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+   * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+   * more information, see
+   * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -13301,7 +13299,7 @@ public com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacet *
* * @deprecated google.cloud.retail.v2alpha.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2alpha/search_service.proto;l=622 + * google/cloud/retail/v2alpha/search_service.proto;l=621 * @return Whether the dynamicFacetSpec field is set. */ @java.lang.Override @@ -13325,7 +13323,7 @@ public boolean hasDynamicFacetSpec() { *
* * @deprecated google.cloud.retail.v2alpha.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2alpha/search_service.proto;l=622 + * google/cloud/retail/v2alpha/search_service.proto;l=621 * @return The dynamicFacetSpec. */ @java.lang.Override @@ -13365,8 +13363,8 @@ public com.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec getDynamic * * *
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
@@ -13389,8 +13387,8 @@ public boolean hasBoostSpec() {
    *
    *
    * 
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
@@ -13415,8 +13413,8 @@ public com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec getBoostSpec() {
    *
    *
    * 
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
@@ -13443,8 +13441,8 @@ public com.google.cloud.retail.v2alpha.SearchRequest.BoostSpecOrBuilder getBoost
    *
    * 
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -13461,8 +13459,8 @@ public boolean hasQueryExpansionSpec() { * *
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -13481,8 +13479,8 @@ public com.google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec getQuery * *
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -13507,8 +13505,8 @@ public com.google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec getQuery * Defaults to * [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH], * which means only the most relevant results are shown, and the least number - * of results are returned. See more details at this [user - * guide](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). + * of results are returned. For more information, see [Adjust result + * size](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). *
* * .google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold relevance_threshold = 15; @@ -13529,8 +13527,8 @@ public int getRelevanceThresholdValue() { * Defaults to * [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH], * which means only the most relevant results are shown, and the least number - * of results are returned. See more details at this [user - * guide](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). + * of results are returned. For more information, see [Adjust result + * size](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). *
* * .google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold relevance_threshold = 15; @@ -14197,9 +14195,9 @@ public int getLabelsCount() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -14235,9 +14233,9 @@ public java.util.Map getLabels() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. * * * map<string, string> labels = 34; @@ -14264,9 +14262,9 @@ public java.util.Map getLabelsMap() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. * * * map<string, string> labels = 34; @@ -14300,9 +14298,9 @@ public java.util.Map getLabelsMap() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. * * * map<string, string> labels = 34; @@ -15515,7 +15513,7 @@ public Builder mergeFrom( * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -15542,7 +15540,7 @@ public java.lang.String getPlacement() { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -15569,7 +15567,7 @@ public com.google.protobuf.ByteString getPlacementBytes() { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -15595,7 +15593,7 @@ public Builder setPlacement(java.lang.String value) { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -15617,7 +15615,7 @@ public Builder clearPlacement() { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -16526,8 +16524,8 @@ public Builder clearOffset() { *
      * The filter syntax consists of an expression language for constructing a
      * predicate from one or more fields of the products being filtered. Filter
-     * expression is case-sensitive. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+     * expression is case-sensitive. For more information, see
+     * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16553,8 +16551,8 @@ public java.lang.String getFilter() { *
      * The filter syntax consists of an expression language for constructing a
      * predicate from one or more fields of the products being filtered. Filter
-     * expression is case-sensitive. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+     * expression is case-sensitive. For more information, see
+     * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16580,8 +16578,8 @@ public com.google.protobuf.ByteString getFilterBytes() { *
      * The filter syntax consists of an expression language for constructing a
      * predicate from one or more fields of the products being filtered. Filter
-     * expression is case-sensitive. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+     * expression is case-sensitive. For more information, see
+     * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16606,8 +16604,8 @@ public Builder setFilter(java.lang.String value) { *
      * The filter syntax consists of an expression language for constructing a
      * predicate from one or more fields of the products being filtered. Filter
-     * expression is case-sensitive. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+     * expression is case-sensitive. For more information, see
+     * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16628,8 +16626,8 @@ public Builder clearFilter() { *
      * The filter syntax consists of an expression language for constructing a
      * predicate from one or more fields of the products being filtered. Filter
-     * expression is case-sensitive. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+     * expression is case-sensitive. For more information, see
+     * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16659,15 +16657,14 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2alpha.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See - * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -16693,15 +16690,14 @@ public java.lang.String getCanonicalFilter() { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2alpha.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See - * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -16727,15 +16723,14 @@ public com.google.protobuf.ByteString getCanonicalFilterBytes() { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2alpha.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See - * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -16760,15 +16755,14 @@ public Builder setCanonicalFilter(java.lang.String value) { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2alpha.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See - * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -16789,15 +16783,14 @@ public Builder clearCanonicalFilter() { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2alpha.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See - * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -16823,9 +16816,9 @@ public Builder setCanonicalFilterBytes(com.google.protobuf.ByteString value) { *
      * The order in which products are returned. Products can be ordered by
      * a field in an [Product][google.cloud.retail.v2alpha.Product] object. Leave
-     * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-     * more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+     * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+     * more information, see
+     * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16851,9 +16844,9 @@ public java.lang.String getOrderBy() { *
      * The order in which products are returned. Products can be ordered by
      * a field in an [Product][google.cloud.retail.v2alpha.Product] object. Leave
-     * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-     * more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+     * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+     * more information, see
+     * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16879,9 +16872,9 @@ public com.google.protobuf.ByteString getOrderByBytes() { *
      * The order in which products are returned. Products can be ordered by
      * a field in an [Product][google.cloud.retail.v2alpha.Product] object. Leave
-     * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-     * more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+     * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+     * more information, see
+     * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16906,9 +16899,9 @@ public Builder setOrderBy(java.lang.String value) { *
      * The order in which products are returned. Products can be ordered by
      * a field in an [Product][google.cloud.retail.v2alpha.Product] object. Leave
-     * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-     * more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+     * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+     * more information, see
+     * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16929,9 +16922,9 @@ public Builder clearOrderBy() { *
      * The order in which products are returned. Products can be ordered by
      * a field in an [Product][google.cloud.retail.v2alpha.Product] object. Leave
-     * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-     * more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+     * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+     * more information, see
+     * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -17391,7 +17384,7 @@ public com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec.Builder addFacetS *
* * @deprecated google.cloud.retail.v2alpha.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2alpha/search_service.proto;l=622 + * google/cloud/retail/v2alpha/search_service.proto;l=621 * @return Whether the dynamicFacetSpec field is set. */ @java.lang.Deprecated @@ -17414,7 +17407,7 @@ public boolean hasDynamicFacetSpec() { *
* * @deprecated google.cloud.retail.v2alpha.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2alpha/search_service.proto;l=622 + * google/cloud/retail/v2alpha/search_service.proto;l=621 * @return The dynamicFacetSpec. */ @java.lang.Deprecated @@ -17637,8 +17630,8 @@ public Builder clearDynamicFacetSpec() { * * *
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
@@ -17660,8 +17653,8 @@ public boolean hasBoostSpec() {
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
@@ -17689,8 +17682,8 @@ public com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec getBoostSpec() {
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
@@ -17720,8 +17713,8 @@ public Builder setBoostSpec(com.google.cloud.retail.v2alpha.SearchRequest.BoostS
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
@@ -17749,8 +17742,8 @@ public Builder setBoostSpec(
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
@@ -17786,8 +17779,8 @@ public Builder mergeBoostSpec(com.google.cloud.retail.v2alpha.SearchRequest.Boos
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
@@ -17814,8 +17807,8 @@ public Builder clearBoostSpec() {
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
@@ -17837,8 +17830,8 @@ public com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.Builder getBoostS
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
@@ -17865,8 +17858,8 @@ public com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.Builder getBoostS
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
@@ -17907,8 +17900,8 @@ public com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.Builder getBoostS
      *
      * 
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * @@ -17925,8 +17918,8 @@ public boolean hasQueryExpansionSpec() { * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * @@ -17950,8 +17943,8 @@ public boolean hasQueryExpansionSpec() { * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * @@ -17977,8 +17970,8 @@ public Builder setQueryExpansionSpec( * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * @@ -18001,8 +17994,8 @@ public Builder setQueryExpansionSpec( * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * @@ -18035,8 +18028,8 @@ public Builder mergeQueryExpansionSpec( * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * @@ -18058,8 +18051,8 @@ public Builder clearQueryExpansionSpec() { * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * @@ -18077,8 +18070,8 @@ public Builder clearQueryExpansionSpec() { * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * @@ -18100,8 +18093,8 @@ public Builder clearQueryExpansionSpec() { * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * @@ -18135,8 +18128,8 @@ public Builder clearQueryExpansionSpec() { * Defaults to * [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH], * which means only the most relevant results are shown, and the least number - * of results are returned. See more details at this [user - * guide](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). + * of results are returned. For more information, see [Adjust result + * size](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). *
* * .google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold relevance_threshold = 15; @@ -18157,8 +18150,8 @@ public int getRelevanceThresholdValue() { * Defaults to * [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH], * which means only the most relevant results are shown, and the least number - * of results are returned. See more details at this [user - * guide](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). + * of results are returned. For more information, see [Adjust result + * size](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). *
* * .google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold relevance_threshold = 15; @@ -18182,8 +18175,8 @@ public Builder setRelevanceThresholdValue(int value) { * Defaults to * [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH], * which means only the most relevant results are shown, and the least number - * of results are returned. See more details at this [user - * guide](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). + * of results are returned. For more information, see [Adjust result + * size](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). *
* * .google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold relevance_threshold = 15; @@ -18210,8 +18203,8 @@ public Builder setRelevanceThresholdValue(int value) { * Defaults to * [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH], * which means only the most relevant results are shown, and the least number - * of results are returned. See more details at this [user - * guide](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). + * of results are returned. For more information, see [Adjust result + * size](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). *
* * .google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold relevance_threshold = 15; @@ -18239,8 +18232,8 @@ public Builder setRelevanceThreshold( * Defaults to * [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH], * which means only the most relevant results are shown, and the least number - * of results are returned. See more details at this [user - * guide](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). + * of results are returned. For more information, see [Adjust result + * size](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). *
* * .google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold relevance_threshold = 15; @@ -19836,9 +19829,9 @@ public int getLabelsCount() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -19874,9 +19867,9 @@ public java.util.Map getLabels() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -19903,9 +19896,9 @@ public java.util.Map getLabelsMap() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -19939,9 +19932,9 @@ public java.util.Map getLabelsMap() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -19981,9 +19974,9 @@ public Builder clearLabels() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. * * * map<string, string> labels = 34; @@ -20019,9 +20012,9 @@ public java.util.Map getMutableLabels() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. * * * map<string, string> labels = 34; @@ -20055,9 +20048,9 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. * * * map<string, string> labels = 34; diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequestOrBuilder.java index cf7301b24f25..6c6b20f22d72 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequestOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequestOrBuilder.java @@ -33,7 +33,7 @@ public interface SearchRequestOrBuilder * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -50,7 +50,7 @@ public interface SearchRequestOrBuilder * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -291,8 +291,8 @@ public interface SearchRequestOrBuilder *
    * The filter syntax consists of an expression language for constructing a
    * predicate from one or more fields of the products being filtered. Filter
-   * expression is case-sensitive. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+   * expression is case-sensitive. For more information, see
+   * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -308,8 +308,8 @@ public interface SearchRequestOrBuilder *
    * The filter syntax consists of an expression language for constructing a
    * predicate from one or more fields of the products being filtered. Filter
-   * expression is case-sensitive. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+   * expression is case-sensitive. For more information, see
+   * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -328,15 +328,14 @@ public interface SearchRequestOrBuilder * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2alpha.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See - * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -352,15 +351,14 @@ public interface SearchRequestOrBuilder * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2alpha.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See - * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -375,9 +373,9 @@ public interface SearchRequestOrBuilder *
    * The order in which products are returned. Products can be ordered by
    * a field in an [Product][google.cloud.retail.v2alpha.Product] object. Leave
-   * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-   * more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+   * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+   * more information, see
+   * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -393,9 +391,9 @@ public interface SearchRequestOrBuilder *
    * The order in which products are returned. Products can be ordered by
    * a field in an [Product][google.cloud.retail.v2alpha.Product] object. Leave
-   * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-   * more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+   * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+   * more information, see
+   * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -490,7 +488,7 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr *
* * @deprecated google.cloud.retail.v2alpha.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2alpha/search_service.proto;l=622 + * google/cloud/retail/v2alpha/search_service.proto;l=621 * @return Whether the dynamicFacetSpec field is set. */ @java.lang.Deprecated @@ -511,7 +509,7 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr *
* * @deprecated google.cloud.retail.v2alpha.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2alpha/search_service.proto;l=622 + * google/cloud/retail/v2alpha/search_service.proto;l=621 * @return The dynamicFacetSpec. */ @java.lang.Deprecated @@ -539,8 +537,8 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * * *
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
@@ -560,8 +558,8 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr
    *
    *
    * 
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
@@ -581,8 +579,8 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr
    *
    *
    * 
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids]
@@ -602,8 +600,8 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr
    *
    * 
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -617,8 +615,8 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * *
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -632,8 +630,8 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * *
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -651,8 +649,8 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * Defaults to * [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH], * which means only the most relevant results are shown, and the least number - * of results are returned. See more details at this [user - * guide](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). + * of results are returned. For more information, see [Adjust result + * size](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). *
* * .google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold relevance_threshold = 15; @@ -670,8 +668,8 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * Defaults to * [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH], * which means only the most relevant results are shown, and the least number - * of results are returned. See more details at this [user - * guide](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). + * of results are returned. For more information, see [Adjust result + * size](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). *
* * .google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold relevance_threshold = 15; @@ -1250,9 +1248,9 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -1276,9 +1274,9 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. * * * map<string, string> labels = 34; @@ -1305,9 +1303,9 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. * * * map<string, string> labels = 34; @@ -1331,9 +1329,9 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. * * * map<string, string> labels = 34; @@ -1361,9 +1359,9 @@ java.lang.String getLabelsOrDefault( * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. * * * map<string, string> labels = 34; diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfig.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfig.java index f1219713ff2e..0cbe1ac02249 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfig.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfig.java @@ -1693,6 +1693,25 @@ public com.google.protobuf.ByteString getEnableCategoryFilterLevelBytes() { } } + public static final int IGNORE_RECS_DENYLIST_FIELD_NUMBER = 24; + private boolean ignoreRecsDenylist_ = false; + /** + * + * + *
+   * When the flag is enabled, the products in the denylist will not be filtered
+   * out in the recommendation filtering results.
+   * 
+ * + * bool ignore_recs_denylist = 24; + * + * @return The ignoreRecsDenylist. + */ + @java.lang.Override + public boolean getIgnoreRecsDenylist() { + return ignoreRecsDenylist_; + } + public static final int PERSONALIZATION_SPEC_FIELD_NUMBER = 21; private com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec personalizationSpec_; /** @@ -1987,6 +2006,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(21, getPersonalizationSpec()); } + if (ignoreRecsDenylist_ != false) { + output.writeBool(24, ignoreRecsDenylist_); + } getUnknownFields().writeTo(output); } @@ -2112,6 +2134,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getPersonalizationSpec()); } + if (ignoreRecsDenylist_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(24, ignoreRecsDenylist_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2151,6 +2176,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDiversityLevel().equals(other.getDiversityLevel())) return false; if (diversityType_ != other.diversityType_) return false; if (!getEnableCategoryFilterLevel().equals(other.getEnableCategoryFilterLevel())) return false; + if (getIgnoreRecsDenylist() != other.getIgnoreRecsDenylist()) return false; if (hasPersonalizationSpec() != other.hasPersonalizationSpec()) return false; if (hasPersonalizationSpec()) { if (!getPersonalizationSpec().equals(other.getPersonalizationSpec())) return false; @@ -2221,6 +2247,8 @@ public int hashCode() { hash = (53 * hash) + diversityType_; hash = (37 * hash) + ENABLE_CATEGORY_FILTER_LEVEL_FIELD_NUMBER; hash = (53 * hash) + getEnableCategoryFilterLevel().hashCode(); + hash = (37 * hash) + IGNORE_RECS_DENYLIST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreRecsDenylist()); if (hasPersonalizationSpec()) { hash = (37 * hash) + PERSONALIZATION_SPEC_FIELD_NUMBER; hash = (53 * hash) + getPersonalizationSpec().hashCode(); @@ -2400,13 +2428,14 @@ public Builder clear() { diversityLevel_ = ""; diversityType_ = 0; enableCategoryFilterLevel_ = ""; + ignoreRecsDenylist_ = false; personalizationSpec_ = null; if (personalizationSpecBuilder_ != null) { personalizationSpecBuilder_.dispose(); personalizationSpecBuilder_ = null; } solutionTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); return this; } @@ -2443,9 +2472,9 @@ public com.google.cloud.retail.v2alpha.ServingConfig buildPartial() { } private void buildPartialRepeatedFields(com.google.cloud.retail.v2alpha.ServingConfig result) { - if (((bitField0_ & 0x00040000) != 0)) { + if (((bitField0_ & 0x00080000) != 0)) { solutionTypes_ = java.util.Collections.unmodifiableList(solutionTypes_); - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); } result.solutionTypes_ = solutionTypes_; } @@ -2516,6 +2545,9 @@ private void buildPartial0(com.google.cloud.retail.v2alpha.ServingConfig result) result.enableCategoryFilterLevel_ = enableCategoryFilterLevel_; } if (((from_bitField0_ & 0x00020000) != 0)) { + result.ignoreRecsDenylist_ = ignoreRecsDenylist_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { result.personalizationSpec_ = personalizationSpecBuilder_ == null ? personalizationSpec_ @@ -2696,13 +2728,16 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ServingConfig other) { bitField0_ |= 0x00010000; onChanged(); } + if (other.getIgnoreRecsDenylist() != false) { + setIgnoreRecsDenylist(other.getIgnoreRecsDenylist()); + } if (other.hasPersonalizationSpec()) { mergePersonalizationSpec(other.getPersonalizationSpec()); } if (!other.solutionTypes_.isEmpty()) { if (solutionTypes_.isEmpty()) { solutionTypes_ = other.solutionTypes_; - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); } else { ensureSolutionTypesIsMutable(); solutionTypes_.addAll(other.solutionTypes_); @@ -2870,9 +2905,15 @@ public Builder mergeFrom( { input.readMessage( getPersonalizationSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; break; } // case 170 + case 192: + { + ignoreRecsDenylist_ = input.readBool(); + bitField0_ |= 0x00020000; + break; + } // case 192 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6522,6 +6563,62 @@ public Builder setEnableCategoryFilterLevelBytes(com.google.protobuf.ByteString return this; } + private boolean ignoreRecsDenylist_; + /** + * + * + *
+     * When the flag is enabled, the products in the denylist will not be filtered
+     * out in the recommendation filtering results.
+     * 
+ * + * bool ignore_recs_denylist = 24; + * + * @return The ignoreRecsDenylist. + */ + @java.lang.Override + public boolean getIgnoreRecsDenylist() { + return ignoreRecsDenylist_; + } + /** + * + * + *
+     * When the flag is enabled, the products in the denylist will not be filtered
+     * out in the recommendation filtering results.
+     * 
+ * + * bool ignore_recs_denylist = 24; + * + * @param value The ignoreRecsDenylist to set. + * @return This builder for chaining. + */ + public Builder setIgnoreRecsDenylist(boolean value) { + + ignoreRecsDenylist_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * When the flag is enabled, the products in the denylist will not be filtered
+     * out in the recommendation filtering results.
+     * 
+ * + * bool ignore_recs_denylist = 24; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreRecsDenylist() { + bitField0_ = (bitField0_ & ~0x00020000); + ignoreRecsDenylist_ = false; + onChanged(); + return this; + } + private com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec personalizationSpec_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec, @@ -6556,7 +6653,7 @@ public Builder setEnableCategoryFilterLevelBytes(com.google.protobuf.ByteString * @return Whether the personalizationSpec field is set. */ public boolean hasPersonalizationSpec() { - return ((bitField0_ & 0x00020000) != 0); + return ((bitField0_ & 0x00040000) != 0); } /** * @@ -6630,7 +6727,7 @@ public Builder setPersonalizationSpec( } else { personalizationSpecBuilder_.setMessage(value); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -6666,7 +6763,7 @@ public Builder setPersonalizationSpec( } else { personalizationSpecBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -6698,7 +6795,7 @@ public Builder setPersonalizationSpec( public Builder mergePersonalizationSpec( com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec value) { if (personalizationSpecBuilder_ == null) { - if (((bitField0_ & 0x00020000) != 0) + if (((bitField0_ & 0x00040000) != 0) && personalizationSpec_ != null && personalizationSpec_ != com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec @@ -6711,7 +6808,7 @@ public Builder mergePersonalizationSpec( personalizationSpecBuilder_.mergeFrom(value); } if (personalizationSpec_ != null) { - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); } return this; @@ -6742,7 +6839,7 @@ public Builder mergePersonalizationSpec( *
*/ public Builder clearPersonalizationSpec() { - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00040000); personalizationSpec_ = null; if (personalizationSpecBuilder_ != null) { personalizationSpecBuilder_.dispose(); @@ -6778,7 +6875,7 @@ public Builder clearPersonalizationSpec() { */ public com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec.Builder getPersonalizationSpecBuilder() { - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return getPersonalizationSpecFieldBuilder().getBuilder(); } @@ -6862,9 +6959,9 @@ public Builder clearPersonalizationSpec() { private java.util.List solutionTypes_ = java.util.Collections.emptyList(); private void ensureSolutionTypesIsMutable() { - if (!((bitField0_ & 0x00040000) != 0)) { + if (!((bitField0_ & 0x00080000) != 0)) { solutionTypes_ = new java.util.ArrayList(solutionTypes_); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; } } /** @@ -7010,7 +7107,7 @@ public Builder addAllSolutionTypes( */ public Builder clearSolutionTypes() { solutionTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); onChanged(); return this; } diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigOrBuilder.java index b1820080cd98..898d43b1d3fc 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigOrBuilder.java @@ -1179,6 +1179,20 @@ public interface ServingConfigOrBuilder */ com.google.protobuf.ByteString getEnableCategoryFilterLevelBytes(); + /** + * + * + *
+   * When the flag is enabled, the products in the denylist will not be filtered
+   * out in the recommendation filtering results.
+   * 
+ * + * bool ignore_recs_denylist = 24; + * + * @return The ignoreRecsDenylist. + */ + boolean getIgnoreRecsDenylist(); + /** * * diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigProto.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigProto.java index 6527edad43ce..5ee7554d733c 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigProto.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigProto.java @@ -46,7 +46,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\037google/api/field_behavior.proto\032\031google" + "/api/resource.proto\032(google/cloud/retail" + "/v2alpha/common.proto\0320google/cloud/reta" - + "il/v2alpha/search_service.proto\"\214\010\n\rServ" + + "il/v2alpha/search_service.proto\"\252\010\n\rServ" + "ingConfig\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\031\n\014display_" + "name\030\002 \001(\tB\003\340A\002\022\020\n\010model_id\030\003 \001(\t\022\035\n\025pri" + "ce_reranking_level\030\004 \001(\t\022\031\n\021facet_contro" @@ -62,23 +62,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\n\017diversity_level\030\010 \001(\t\022P\n\016diversity_typ" + "e\030\024 \001(\01628.google.cloud.retail.v2alpha.Se" + "rvingConfig.DiversityType\022$\n\034enable_cate" - + "gory_filter_level\030\020 \001(\t\022\\\n\024personalizati" - + "on_spec\030\025 \001(\0132>.google.cloud.retail.v2al" - + "pha.SearchRequest.PersonalizationSpec\022I\n" - + "\016solution_types\030\023 \003(\0162).google.cloud.ret" - + "ail.v2alpha.SolutionTypeB\006\340A\002\340A\005\"d\n\rDive" - + "rsityType\022\036\n\032DIVERSITY_TYPE_UNSPECIFIED\020" - + "\000\022\030\n\024RULE_BASED_DIVERSITY\020\002\022\031\n\025DATA_DRIV" - + "EN_DIVERSITY\020\003:\205\001\352A\201\001\n#retail.googleapis" - + ".com/ServingConfig\022Zprojects/{project}/l" - + "ocations/{location}/catalogs/{catalog}/s" - + "ervingConfigs/{serving_config}B\326\001\n\037com.g" - + "oogle.cloud.retail.v2alphaB\022ServingConfi" - + "gProtoP\001Z7cloud.google.com/go/retail/api" - + "v2alpha/retailpb;retailpb\242\002\006RETAIL\252\002\033Goo" - + "gle.Cloud.Retail.V2Alpha\312\002\033Google\\Cloud\\" - + "Retail\\V2alpha\352\002\036Google::Cloud::Retail::" - + "V2alphab\006proto3" + + "gory_filter_level\030\020 \001(\t\022\034\n\024ignore_recs_d" + + "enylist\030\030 \001(\010\022\\\n\024personalization_spec\030\025 " + + "\001(\0132>.google.cloud.retail.v2alpha.Search" + + "Request.PersonalizationSpec\022I\n\016solution_" + + "types\030\023 \003(\0162).google.cloud.retail.v2alph" + + "a.SolutionTypeB\006\340A\002\340A\005\"d\n\rDiversityType\022" + + "\036\n\032DIVERSITY_TYPE_UNSPECIFIED\020\000\022\030\n\024RULE_" + + "BASED_DIVERSITY\020\002\022\031\n\025DATA_DRIVEN_DIVERSI" + + "TY\020\003:\205\001\352A\201\001\n#retail.googleapis.com/Servi" + + "ngConfig\022Zprojects/{project}/locations/{" + + "location}/catalogs/{catalog}/servingConf" + + "igs/{serving_config}B\326\001\n\037com.google.clou" + + "d.retail.v2alphaB\022ServingConfigProtoP\001Z7" + + "cloud.google.com/go/retail/apiv2alpha/re" + + "tailpb;retailpb\242\002\006RETAIL\252\002\033Google.Cloud." + + "Retail.V2Alpha\312\002\033Google\\Cloud\\Retail\\V2a" + + "lpha\352\002\036Google::Cloud::Retail::V2alphab\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -112,6 +113,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DiversityLevel", "DiversityType", "EnableCategoryFilterLevel", + "IgnoreRecsDenylist", "PersonalizationSpec", "SolutionTypes", }); diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateAlertConfigRequest.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateAlertConfigRequest.java new file mode 100644 index 000000000000..2dfc013bbccf --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateAlertConfigRequest.java @@ -0,0 +1,1136 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * Request for
+ * [ProjectService.UpdateAlertConfig][google.cloud.retail.v2alpha.ProjectService.UpdateAlertConfig]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.UpdateAlertConfigRequest} + */ +public final class UpdateAlertConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.UpdateAlertConfigRequest) + UpdateAlertConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateAlertConfigRequest.newBuilder() to construct. + private UpdateAlertConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateAlertConfigRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateAlertConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_UpdateAlertConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_UpdateAlertConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest.class, + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest.Builder.class); + } + + private int bitField0_; + public static final int ALERT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.retail.v2alpha.AlertConfig alertConfig_; + /** + * + * + *
+   * Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to
+   * update.
+   *
+   * If the caller does not have permission to update the
+   * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a
+   * PERMISSION_DENIED error is returned.
+   *
+   * If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update
+   * does not exist, a NOT_FOUND error is returned.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.AlertConfig alert_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the alertConfig field is set. + */ + @java.lang.Override + public boolean hasAlertConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to
+   * update.
+   *
+   * If the caller does not have permission to update the
+   * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a
+   * PERMISSION_DENIED error is returned.
+   *
+   * If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update
+   * does not exist, a NOT_FOUND error is returned.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.AlertConfig alert_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The alertConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfig getAlertConfig() { + return alertConfig_ == null + ? com.google.cloud.retail.v2alpha.AlertConfig.getDefaultInstance() + : alertConfig_; + } + /** + * + * + *
+   * Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to
+   * update.
+   *
+   * If the caller does not have permission to update the
+   * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a
+   * PERMISSION_DENIED error is returned.
+   *
+   * If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update
+   * does not exist, a NOT_FOUND error is returned.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.AlertConfig alert_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.AlertConfigOrBuilder getAlertConfigOrBuilder() { + return alertConfig_ == null + ? com.google.cloud.retail.v2alpha.AlertConfig.getDefaultInstance() + : alertConfig_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Indicates which fields in the provided
+   * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not
+   * set, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Indicates which fields in the provided
+   * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not
+   * set, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Indicates which fields in the provided
+   * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not
+   * set, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAlertConfig()); + } + 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, getAlertConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest other = + (com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest) obj; + + if (hasAlertConfig() != other.hasAlertConfig()) return false; + if (hasAlertConfig()) { + if (!getAlertConfig().equals(other.getAlertConfig())) 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 (hasAlertConfig()) { + hash = (37 * hash) + ALERT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAlertConfig().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.UpdateAlertConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for
+   * [ProjectService.UpdateAlertConfig][google.cloud.retail.v2alpha.ProjectService.UpdateAlertConfig]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.UpdateAlertConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.UpdateAlertConfigRequest) + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_UpdateAlertConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_UpdateAlertConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest.class, + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAlertConfigFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + alertConfig_ = null; + if (alertConfigBuilder_ != null) { + alertConfigBuilder_.dispose(); + alertConfigBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_UpdateAlertConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest build() { + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest buildPartial() { + com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest result = + new com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.alertConfig_ = + alertConfigBuilder_ == null ? alertConfig_ : alertConfigBuilder_.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest other) { + if (other == com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest.getDefaultInstance()) + return this; + if (other.hasAlertConfig()) { + mergeAlertConfig(other.getAlertConfig()); + } + 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(getAlertConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.retail.v2alpha.AlertConfig alertConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.AlertConfig, + com.google.cloud.retail.v2alpha.AlertConfig.Builder, + com.google.cloud.retail.v2alpha.AlertConfigOrBuilder> + alertConfigBuilder_; + /** + * + * + *
+     * Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.AlertConfig alert_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the alertConfig field is set. + */ + public boolean hasAlertConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.AlertConfig alert_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The alertConfig. + */ + public com.google.cloud.retail.v2alpha.AlertConfig getAlertConfig() { + if (alertConfigBuilder_ == null) { + return alertConfig_ == null + ? com.google.cloud.retail.v2alpha.AlertConfig.getDefaultInstance() + : alertConfig_; + } else { + return alertConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.AlertConfig alert_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAlertConfig(com.google.cloud.retail.v2alpha.AlertConfig value) { + if (alertConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + alertConfig_ = value; + } else { + alertConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.AlertConfig alert_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAlertConfig( + com.google.cloud.retail.v2alpha.AlertConfig.Builder builderForValue) { + if (alertConfigBuilder_ == null) { + alertConfig_ = builderForValue.build(); + } else { + alertConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.AlertConfig alert_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAlertConfig(com.google.cloud.retail.v2alpha.AlertConfig value) { + if (alertConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && alertConfig_ != null + && alertConfig_ != com.google.cloud.retail.v2alpha.AlertConfig.getDefaultInstance()) { + getAlertConfigBuilder().mergeFrom(value); + } else { + alertConfig_ = value; + } + } else { + alertConfigBuilder_.mergeFrom(value); + } + if (alertConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.AlertConfig alert_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAlertConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + alertConfig_ = null; + if (alertConfigBuilder_ != null) { + alertConfigBuilder_.dispose(); + alertConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.AlertConfig alert_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.AlertConfig.Builder getAlertConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAlertConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.AlertConfig alert_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.AlertConfigOrBuilder getAlertConfigOrBuilder() { + if (alertConfigBuilder_ != null) { + return alertConfigBuilder_.getMessageOrBuilder(); + } else { + return alertConfig_ == null + ? com.google.cloud.retail.v2alpha.AlertConfig.getDefaultInstance() + : alertConfig_; + } + } + /** + * + * + *
+     * Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.AlertConfig alert_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.AlertConfig, + com.google.cloud.retail.v2alpha.AlertConfig.Builder, + com.google.cloud.retail.v2alpha.AlertConfigOrBuilder> + getAlertConfigFieldBuilder() { + if (alertConfigBuilder_ == null) { + alertConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.AlertConfig, + com.google.cloud.retail.v2alpha.AlertConfig.Builder, + com.google.cloud.retail.v2alpha.AlertConfigOrBuilder>( + getAlertConfig(), getParentForChildren(), isClean()); + alertConfig_ = null; + } + return alertConfigBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Indicates which fields in the provided
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not
+     * set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not
+     * set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not
+     * set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not
+     * set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not
+     * set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not
+     * set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not
+     * set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not
+     * set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not
+     * set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.UpdateAlertConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.UpdateAlertConfigRequest) + private static final com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest(); + } + + public static com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAlertConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.UpdateAlertConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateAlertConfigRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateAlertConfigRequestOrBuilder.java new file mode 100644 index 000000000000..815d9a946c6f --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateAlertConfigRequestOrBuilder.java @@ -0,0 +1,132 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface UpdateAlertConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.UpdateAlertConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to
+   * update.
+   *
+   * If the caller does not have permission to update the
+   * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a
+   * PERMISSION_DENIED error is returned.
+   *
+   * If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update
+   * does not exist, a NOT_FOUND error is returned.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.AlertConfig alert_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the alertConfig field is set. + */ + boolean hasAlertConfig(); + /** + * + * + *
+   * Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to
+   * update.
+   *
+   * If the caller does not have permission to update the
+   * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a
+   * PERMISSION_DENIED error is returned.
+   *
+   * If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update
+   * does not exist, a NOT_FOUND error is returned.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.AlertConfig alert_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The alertConfig. + */ + com.google.cloud.retail.v2alpha.AlertConfig getAlertConfig(); + /** + * + * + *
+   * Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to
+   * update.
+   *
+   * If the caller does not have permission to update the
+   * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a
+   * PERMISSION_DENIED error is returned.
+   *
+   * If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update
+   * does not exist, a NOT_FOUND error is returned.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.AlertConfig alert_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.retail.v2alpha.AlertConfigOrBuilder getAlertConfigOrBuilder(); + + /** + * + * + *
+   * Indicates which fields in the provided
+   * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not
+   * set, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Indicates which fields in the provided
+   * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not
+   * set, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Indicates which fields in the provided
+   * [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not
+   * set, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateLoggingConfigRequest.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateLoggingConfigRequest.java new file mode 100644 index 000000000000..feae96ac00f3 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateLoggingConfigRequest.java @@ -0,0 +1,1197 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
+ * Request for
+ * [ProjectService.UpdateLoggingConfig][google.cloud.retail.v2alpha.ProjectService.UpdateLoggingConfig]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.UpdateLoggingConfigRequest} + */ +public final class UpdateLoggingConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.UpdateLoggingConfigRequest) + UpdateLoggingConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateLoggingConfigRequest.newBuilder() to construct. + private UpdateLoggingConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateLoggingConfigRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateLoggingConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_UpdateLoggingConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_UpdateLoggingConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest.class, + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest.Builder.class); + } + + private int bitField0_; + public static final int LOGGING_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.retail.v2alpha.LoggingConfig loggingConfig_; + /** + * + * + *
+   * Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to
+   * update.
+   *
+   * If the caller does not have permission to update the
+   * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a
+   * PERMISSION_DENIED error is returned.
+   *
+   * If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update
+   * does not exist, a NOT_FOUND error is returned.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig logging_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the loggingConfig field is set. + */ + @java.lang.Override + public boolean hasLoggingConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to
+   * update.
+   *
+   * If the caller does not have permission to update the
+   * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a
+   * PERMISSION_DENIED error is returned.
+   *
+   * If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update
+   * does not exist, a NOT_FOUND error is returned.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig logging_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The loggingConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfig getLoggingConfig() { + return loggingConfig_ == null + ? com.google.cloud.retail.v2alpha.LoggingConfig.getDefaultInstance() + : loggingConfig_; + } + /** + * + * + *
+   * Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to
+   * update.
+   *
+   * If the caller does not have permission to update the
+   * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a
+   * PERMISSION_DENIED error is returned.
+   *
+   * If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update
+   * does not exist, a NOT_FOUND error is returned.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig logging_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { + return loggingConfig_ == null + ? com.google.cloud.retail.v2alpha.LoggingConfig.getDefaultInstance() + : loggingConfig_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Indicates which fields in the provided
+   * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The
+   * following are the only supported fields:
+   *
+   * * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules]
+   *
+   * If not set, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Indicates which fields in the provided
+   * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The
+   * following are the only supported fields:
+   *
+   * * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules]
+   *
+   * If not set, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Indicates which fields in the provided
+   * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The
+   * following are the only supported fields:
+   *
+   * * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules]
+   *
+   * If not set, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getLoggingConfig()); + } + 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, getLoggingConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest other = + (com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest) obj; + + if (hasLoggingConfig() != other.hasLoggingConfig()) return false; + if (hasLoggingConfig()) { + if (!getLoggingConfig().equals(other.getLoggingConfig())) 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 (hasLoggingConfig()) { + hash = (37 * hash) + LOGGING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLoggingConfig().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2alpha.UpdateLoggingConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for
+   * [ProjectService.UpdateLoggingConfig][google.cloud.retail.v2alpha.ProjectService.UpdateLoggingConfig]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2alpha.UpdateLoggingConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.UpdateLoggingConfigRequest) + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_UpdateLoggingConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_UpdateLoggingConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest.class, + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLoggingConfigFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + loggingConfig_ = null; + if (loggingConfigBuilder_ != null) { + loggingConfigBuilder_.dispose(); + loggingConfigBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ProjectServiceProto + .internal_static_google_cloud_retail_v2alpha_UpdateLoggingConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest build() { + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest buildPartial() { + com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest result = + new com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.loggingConfig_ = + loggingConfigBuilder_ == null ? loggingConfig_ : loggingConfigBuilder_.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest other) { + if (other == com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest.getDefaultInstance()) + return this; + if (other.hasLoggingConfig()) { + mergeLoggingConfig(other.getLoggingConfig()); + } + 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(getLoggingConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.retail.v2alpha.LoggingConfig loggingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.LoggingConfig, + com.google.cloud.retail.v2alpha.LoggingConfig.Builder, + com.google.cloud.retail.v2alpha.LoggingConfigOrBuilder> + loggingConfigBuilder_; + /** + * + * + *
+     * Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig logging_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the loggingConfig field is set. + */ + public boolean hasLoggingConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig logging_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The loggingConfig. + */ + public com.google.cloud.retail.v2alpha.LoggingConfig getLoggingConfig() { + if (loggingConfigBuilder_ == null) { + return loggingConfig_ == null + ? com.google.cloud.retail.v2alpha.LoggingConfig.getDefaultInstance() + : loggingConfig_; + } else { + return loggingConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig logging_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLoggingConfig(com.google.cloud.retail.v2alpha.LoggingConfig value) { + if (loggingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + loggingConfig_ = value; + } else { + loggingConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig logging_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLoggingConfig( + com.google.cloud.retail.v2alpha.LoggingConfig.Builder builderForValue) { + if (loggingConfigBuilder_ == null) { + loggingConfig_ = builderForValue.build(); + } else { + loggingConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig logging_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeLoggingConfig(com.google.cloud.retail.v2alpha.LoggingConfig value) { + if (loggingConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && loggingConfig_ != null + && loggingConfig_ + != com.google.cloud.retail.v2alpha.LoggingConfig.getDefaultInstance()) { + getLoggingConfigBuilder().mergeFrom(value); + } else { + loggingConfig_ = value; + } + } else { + loggingConfigBuilder_.mergeFrom(value); + } + if (loggingConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig logging_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearLoggingConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + loggingConfig_ = null; + if (loggingConfigBuilder_ != null) { + loggingConfigBuilder_.dispose(); + loggingConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig logging_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.LoggingConfig.Builder getLoggingConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLoggingConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig logging_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { + if (loggingConfigBuilder_ != null) { + return loggingConfigBuilder_.getMessageOrBuilder(); + } else { + return loggingConfig_ == null + ? com.google.cloud.retail.v2alpha.LoggingConfig.getDefaultInstance() + : loggingConfig_; + } + } + /** + * + * + *
+     * Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to
+     * update.
+     *
+     * If the caller does not have permission to update the
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a
+     * PERMISSION_DENIED error is returned.
+     *
+     * If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig logging_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.LoggingConfig, + com.google.cloud.retail.v2alpha.LoggingConfig.Builder, + com.google.cloud.retail.v2alpha.LoggingConfigOrBuilder> + getLoggingConfigFieldBuilder() { + if (loggingConfigBuilder_ == null) { + loggingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.LoggingConfig, + com.google.cloud.retail.v2alpha.LoggingConfig.Builder, + com.google.cloud.retail.v2alpha.LoggingConfigOrBuilder>( + getLoggingConfig(), getParentForChildren(), isClean()); + loggingConfig_ = null; + } + return loggingConfigBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Indicates which fields in the provided
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The
+     * following are the only supported fields:
+     *
+     * * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules]
+     *
+     * If not set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The
+     * following are the only supported fields:
+     *
+     * * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules]
+     *
+     * If not set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The
+     * following are the only supported fields:
+     *
+     * * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules]
+     *
+     * If not set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The
+     * following are the only supported fields:
+     *
+     * * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules]
+     *
+     * If not set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The
+     * following are the only supported fields:
+     *
+     * * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules]
+     *
+     * If not set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The
+     * following are the only supported fields:
+     *
+     * * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules]
+     *
+     * If not set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The
+     * following are the only supported fields:
+     *
+     * * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules]
+     *
+     * If not set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The
+     * following are the only supported fields:
+     *
+     * * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules]
+     *
+     * If not set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The
+     * following are the only supported fields:
+     *
+     * * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+     * * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules]
+     *
+     * If not set, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.UpdateLoggingConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.UpdateLoggingConfigRequest) + private static final com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest(); + } + + public static com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateLoggingConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2alpha.UpdateLoggingConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateLoggingConfigRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateLoggingConfigRequestOrBuilder.java new file mode 100644 index 000000000000..dc588eab4bd9 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateLoggingConfigRequestOrBuilder.java @@ -0,0 +1,147 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/project_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2alpha; + +public interface UpdateLoggingConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.UpdateLoggingConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to
+   * update.
+   *
+   * If the caller does not have permission to update the
+   * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a
+   * PERMISSION_DENIED error is returned.
+   *
+   * If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update
+   * does not exist, a NOT_FOUND error is returned.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig logging_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the loggingConfig field is set. + */ + boolean hasLoggingConfig(); + /** + * + * + *
+   * Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to
+   * update.
+   *
+   * If the caller does not have permission to update the
+   * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a
+   * PERMISSION_DENIED error is returned.
+   *
+   * If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update
+   * does not exist, a NOT_FOUND error is returned.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig logging_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The loggingConfig. + */ + com.google.cloud.retail.v2alpha.LoggingConfig getLoggingConfig(); + /** + * + * + *
+   * Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to
+   * update.
+   *
+   * If the caller does not have permission to update the
+   * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a
+   * PERMISSION_DENIED error is returned.
+   *
+   * If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update
+   * does not exist, a NOT_FOUND error is returned.
+   * 
+ * + * + * .google.cloud.retail.v2alpha.LoggingConfig logging_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.retail.v2alpha.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); + + /** + * + * + *
+   * Indicates which fields in the provided
+   * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The
+   * following are the only supported fields:
+   *
+   * * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules]
+   *
+   * If not set, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Indicates which fields in the provided
+   * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The
+   * following are the only supported fields:
+   *
+   * * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules]
+   *
+   * If not set, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Indicates which fields in the provided
+   * [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The
+   * following are the only supported fields:
+   *
+   * * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule]
+   * * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules]
+   *
+   * If not set, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEvent.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEvent.java index 88d1c9e3ed91..13bad0f314dd 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEvent.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEvent.java @@ -102,6 +102,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -136,6 +137,7 @@ public java.lang.String getEventType() { * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -1665,8 +1667,8 @@ public com.google.protobuf.ByteString getPageViewIdBytes() { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; @@ -1692,8 +1694,8 @@ public java.lang.String getEntity() { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; @@ -2707,6 +2709,7 @@ public Builder mergeFrom( * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -2740,6 +2743,7 @@ public java.lang.String getEventType() { * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -2773,6 +2777,7 @@ public com.google.protobuf.ByteString getEventTypeBytes() { * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -2805,6 +2810,7 @@ public Builder setEventType(java.lang.String value) { * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -2833,6 +2839,7 @@ public Builder clearEventType() { * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -6827,8 +6834,8 @@ public Builder setPageViewIdBytes(com.google.protobuf.ByteString value) { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; @@ -6853,8 +6860,8 @@ public java.lang.String getEntity() { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; @@ -6879,8 +6886,8 @@ public com.google.protobuf.ByteString getEntityBytes() { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; @@ -6904,8 +6911,8 @@ public Builder setEntity(java.lang.String value) { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; @@ -6925,8 +6932,8 @@ public Builder clearEntity() { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventOrBuilder.java b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventOrBuilder.java index d96228e4e51d..120bcf3e3a71 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventOrBuilder.java @@ -31,6 +31,7 @@ public interface UserEventOrBuilder * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -54,6 +55,7 @@ public interface UserEventOrBuilder * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -1166,8 +1168,8 @@ com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault( * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; @@ -1182,8 +1184,8 @@ com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault( * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/branch.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/branch.proto new file mode 100644 index 000000000000..9667eae96749 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/branch.proto @@ -0,0 +1,245 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.retail.v2alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/retail/v2alpha/product.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Retail.V2Alpha"; +option go_package = "cloud.google.com/go/retail/apiv2alpha/retailpb;retailpb"; +option java_multiple_files = true; +option java_outer_classname = "BranchProto"; +option java_package = "com.google.cloud.retail.v2alpha"; +option objc_class_prefix = "RETAIL"; +option php_namespace = "Google\\Cloud\\Retail\\V2alpha"; +option ruby_package = "Google::Cloud::Retail::V2alpha"; + +// A view that specifies different level of fields of a +// [Branch][google.cloud.retail.v2alpha.Branch] to show in responses. +enum BranchView { + // The value when it's unspecified. This defaults to the BASIC view. + BRANCH_VIEW_UNSPECIFIED = 0; + + // Includes basic metadata about the branch, but not statistical fields. + // See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch] + // to find what fields are excluded from BASIC view. + BRANCH_VIEW_BASIC = 1; + + // Includes all fields of a [Branch][google.cloud.retail.v2alpha.Branch]. + BRANCH_VIEW_FULL = 2; +} + +// A data branch that stores [Product][google.cloud.retail.v2alpha.Product]s. +message Branch { + option (google.api.resource) = { + type: "retail.googleapis.com/Branch" + pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/branches/{branch}" + }; + + // A statistic about the number of products in a branch. + message ProductCountStatistic { + // Scope of what products are included for this count. + enum ProductCountScope { + // Default value for enum. This value is not used in the API response. + PRODUCT_COUNT_SCOPE_UNSPECIFIED = 0; + + // Scope for all existing products in the branch. Useful for understanding + // how many products there are in a branch. + ALL_PRODUCTS = 1; + + // Scope for products created or updated in the last 24 hours. + LAST_24_HOUR_UPDATE = 2; + } + + // [ProductCountScope] of the [counts]. + ProductCountScope scope = 1; + + // The number of products in + // [scope][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.scope] + // broken down into different groups. + // + // The key is a group representing a set of products, and the value is the + // number of products in that group. + // Note: keys in this map may change over time. + // + // Possible keys: + // * "primary-in-stock", products have + // [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] + // type and + // [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK] + // availability. + // + // * "primary-out-of-stock", products have + // [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] + // type and + // [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK] + // availability. + // + // * "primary-preorder", products have + // [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] + // type and + // [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER] + // availability. + // + // * "primary-backorder", products have + // [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] + // type and + // [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER] + // availability. + // + // * "variant-in-stock", products have + // [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] + // type and + // [Product.Availability.IN_STOCK][google.cloud.retail.v2alpha.Product.Availability.IN_STOCK] + // availability. + // + // * "variant-out-of-stock", products have + // [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] + // type and + // [Product.Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.Product.Availability.OUT_OF_STOCK] + // availability. + // + // * "variant-preorder", products have + // [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] + // type and + // [Product.Availability.PREORDER][google.cloud.retail.v2alpha.Product.Availability.PREORDER] + // availability. + // + // * "variant-backorder", products have + // [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] + // type and + // [Product.Availability.BACKORDER][google.cloud.retail.v2alpha.Product.Availability.BACKORDER] + // availability. + // + // * "price-discounted", products have [Product.price_info.price] < + // [Product.price_info.original_price]. + map counts = 2; + } + + // Metric measured on a group of + // [Product][google.cloud.retail.v2alpha.Product]s against a certain quality + // requirement. Contains the number of products that pass the check and the + // number of products that don't. + message QualityMetric { + // The key that represents a quality requirement rule. + // + // Supported keys: + // * "has-valid-uri": product has a valid and accessible + // [uri][google.cloud.retail.v2alpha.Product.uri]. + // + // * "available-expire-time-conformance": + // [Product.available_time][google.cloud.retail.v2alpha.Product.available_time] + // is early than "now", and + // [Product.expire_time][google.cloud.retail.v2alpha.Product.expire_time] is + // greater than "now". + // + // * "has-searchable-attributes": product has at least one + // [attribute][google.cloud.retail.v2alpha.Product.attributes] set to + // searchable. + // + // * "has-description": product has non-empty + // [description][google.cloud.retail.v2alpha.Product.description]. + // + // * "has-at-least-bigram-title": Product + // [title][google.cloud.retail.v2alpha.Product.title] has at least two + // words. A comprehensive title helps to improve search quality. + // + // * "variant-has-image": the + // [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has + // at least one [image][google.cloud.retail.v2alpha.Product.images]. You may + // ignore this metric if all your products are at + // [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level. + // + // * "variant-has-price-info": the + // [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has + // [price_info][google.cloud.retail.v2alpha.Product.price_info] set. You may + // ignore this metric if all your products are at + // [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level. + // + // * "has-publish-time": product has non-empty + // [publish_time][google.cloud.retail.v2alpha.Product.publish_time]. + string requirement_key = 1; + + // Number of products passing the quality requirement check. We only check + // searchable products. + int32 qualified_product_count = 2; + + // Number of products failing the quality requirement check. We only check + // searchable products. + int32 unqualified_product_count = 3; + + // Value from 0 to 100 representing the suggested percentage of products + // that meet the quality requirements to get good search and recommendation + // performance. 100 * (qualified_product_count) / + // (qualified_product_count + unqualified_product_count) should be greater + // or equal to this suggestion. + double suggested_quality_percent_threshold = 4; + + // A list of a maximum of 100 sample products that do not qualify for + // this requirement. + // + // This field is only populated in the response to + // [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch] + // API, and is always empty for + // [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches]. + // + // Only the following fields are set in the + // [Product][google.cloud.retail.v2alpha.Product]. + // + // * [Product.name][google.cloud.retail.v2alpha.Product.name] + // * [Product.id][google.cloud.retail.v2alpha.Product.id] + // * [Product.title][google.cloud.retail.v2alpha.Product.title] + repeated Product unqualified_sample_products = 5; + } + + // Immutable. Full resource name of the branch, such as + // `projects/*/locations/global/catalogs/default_catalog/branches/branch_id`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Human readable name of the branch to display in the UI. + string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether this branch is set as the default branch of + // its parent catalog. + bool is_default = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of last import through + // [ProductService.ImportProducts][google.cloud.retail.v2alpha.ProductService.ImportProducts]. + // Empty value means no import has been made to this branch. + google.protobuf.Timestamp last_product_import_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Statistics for number of products in the branch, provided for + // different + // [scopes][google.cloud.retail.v2alpha.Branch.ProductCountStatistic.ProductCountScope]. + // + // This field is not populated in [BranchView.BASIC][] view. + repeated ProductCountStatistic product_count_stats = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The quality metrics measured among products of this branch. + // + // See + // [QualityMetric.requirement_key][google.cloud.retail.v2alpha.Branch.QualityMetric.requirement_key] + // for supported metrics. Metrics could be missing if failed to retrieve. + // + // This field is not populated in [BranchView.BASIC][] view. + repeated QualityMetric quality_metrics = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/branch_service.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/branch_service.proto new file mode 100644 index 000000000000..79f95c361f6a --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/branch_service.proto @@ -0,0 +1,111 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.retail.v2alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/retail/v2alpha/branch.proto"; + +option csharp_namespace = "Google.Cloud.Retail.V2Alpha"; +option go_package = "cloud.google.com/go/retail/apiv2alpha/retailpb;retailpb"; +option java_multiple_files = true; +option java_outer_classname = "BranchServiceProto"; +option java_package = "com.google.cloud.retail.v2alpha"; +option objc_class_prefix = "RETAIL"; +option php_namespace = "Google\\Cloud\\Retail\\V2alpha"; +option ruby_package = "Google::Cloud::Retail::V2alpha"; + +// Service for [Branch][google.cloud.retail.v2alpha.Branch] Management +// +// [Branch][google.cloud.retail.v2alpha.Branch]es are automatically created when +// a [Catalog][google.cloud.retail.v2alpha.Catalog] is created. There are fixed +// three branches in each catalog, and may use +// [ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches] method +// to get the details of all branches. +service BranchService { + option (google.api.default_host) = "retail.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists all [Branch][google.cloud.retail.v2alpha.Branch]s under the specified + // parent [Catalog][google.cloud.retail.v2alpha.Catalog]. + rpc ListBranches(ListBranchesRequest) returns (ListBranchesResponse) { + option (google.api.http) = { + get: "/v2alpha/{parent=projects/*/locations/*/catalogs/*}/branches" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves a [Branch][google.cloud.retail.v2alpha.Branch]. + rpc GetBranch(GetBranchRequest) returns (Branch) { + option (google.api.http) = { + get: "/v2alpha/{name=projects/*/locations/*/catalogs/*/branches/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request for +// [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches] +// method. +message ListBranchesRequest { + // Required. The parent catalog resource name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" } + ]; + + // The view to apply to the returned + // [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to + // [Branch.BranchView.BASIC] if unspecified. + // See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch] + // to find what fields are excluded from BASIC view. + BranchView view = 2; +} + +// Response for +// [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches] +// method. +message ListBranchesResponse { + // The Branches. + repeated Branch branches = 1; +} + +// Request for +// [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch] +// method. +message GetBranchRequest { + // Required. The name of the branch to retrieve. + // Format: + // `projects/*/locations/global/catalogs/default_catalog/branches/some_branch_id`. + // + // "default_branch" can be used as a special branch_id, it returns the + // default branch that has been set for the catalog. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "retail.googleapis.com/Branch" } + ]; + + // The view to apply to the returned + // [Branch][google.cloud.retail.v2alpha.Branch]. Defaults to + // [Branch.BranchView.BASIC] if unspecified. + // See documentation of fields of [Branch][google.cloud.retail.v2alpha.Branch] + // to find what fields are excluded from BASIC view. + BranchView view = 2; +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/catalog.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/catalog.proto index 1f20308e7e3c..891b328e9c25 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/catalog.proto +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/catalog.proto @@ -20,6 +20,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/retail/v2alpha/common.proto"; import "google/cloud/retail/v2alpha/import_config.proto"; +import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Retail.V2Alpha"; option go_package = "cloud.google.com/go/retail/apiv2alpha/retailpb;retailpb"; @@ -87,6 +88,124 @@ message ProductLevelConfig { // Catalog level attribute config for an attribute. For example, if customers // want to enable/disable facet for a specific attribute. message CatalogAttribute { + // Possible options for the facet that corresponds to the current attribute + // config. + message FacetConfig { + // [Facet values][google.cloud.retail.v2alpha.SearchResponse.Facet.values] + // to ignore on [facets][google.cloud.retail.v2alpha.SearchResponse.Facet] + // during the specified time range for the given + // [SearchResponse.Facet.key][google.cloud.retail.v2alpha.SearchResponse.Facet.key] + // attribute. + message IgnoredFacetValues { + // List of facet values to ignore for the following time range. The facet + // values are the same as the attribute values. There is a limit of 10 + // values per instance of IgnoredFacetValues. Each value can have at most + // 128 characters. + repeated string values = 1; + + // Time range for the current list of facet values to ignore. + // If multiple time ranges are specified for an facet value for the + // current attribute, consider all of them. If both are empty, ignore + // always. If start time and end time are set, then start time + // must be before end time. + // If start time is not empty and end time is empty, then will ignore + // these facet values after the start time. + google.protobuf.Timestamp start_time = 2; + + // If start time is empty and end time is not empty, then ignore these + // facet values before end time. + google.protobuf.Timestamp end_time = 3; + } + + // Replaces a set of textual facet values by the same (possibly different) + // merged facet value. Each facet value should appear at most once as a + // value per + // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]. This + // feature is available only for textual custom attributes. + message MergedFacetValue { + // All the facet values that are replaces by the same + // [merged_value][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value] + // that follows. The maximum number of values per MergedFacetValue is 25. + // Each value can have up to 128 characters. + repeated string values = 1; + + // All the previous values are replaced by this merged facet value. + // This merged_value must be non-empty and can have up to 128 characters. + string merged_value = 2; + } + + // The current facet key (i.e. attribute config) maps into the + // [merged_facet_key][google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet.merged_facet_key]. + // A facet key can have at most one child. The current facet key and the + // merged facet key need both to be textual custom attributes or both + // numerical custom attributes (same type). + message MergedFacet { + // The merged facet key should be a valid facet key that is different than + // the facet key of the current catalog attribute. We refer this is + // merged facet key as the child of the current catalog attribute. This + // merged facet key can't be a parent of another facet key (i.e. no + // directed path of length 2). This merged facet key needs to be either a + // textual custom attribute or a numerical custom attribute. + string merged_facet_key = 1; + } + + // Options to rerank based on facet values engaged by the user for the + // current key. That key needs to be a custom textual key and facetable. + // To use this control, you also need to pass all the facet keys engaged by + // the user in the request using the field [SearchRequest.FacetSpec]. In + // particular, if you don't pass the facet keys engaged that you want to + // rerank on, this control won't be effective. Moreover, to obtain better + // results, the facet values that you want to rerank on should be close to + // English (ideally made of words, underscores, and spaces). + message RerankConfig { + // If set to true, then we also rerank the dynamic facets based on the + // facet values engaged by the user for the current attribute key during + // serving. + bool rerank_facet = 1; + + // If empty, rerank on all facet values for the current key. Otherwise, + // will rerank on the facet values from this list only. + repeated string facet_values = 2; + } + + // If you don't set the facet + // [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals] + // in the request to a numerical attribute, then we use the computed + // intervals with rounded bounds obtained from all its product numerical + // attribute values. The computed intervals might not be ideal for some + // attributes. Therefore, we give you the option to overwrite them with the + // facet_intervals field. The maximum of facet intervals per + // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40. + // Each interval must have a lower bound or an upper bound. If both bounds + // are provided, then the lower bound must be smaller or equal than the + // upper bound. + repeated Interval facet_intervals = 1; + + // Each instance represents a list of attribute values to ignore as facet + // values for a specific time range. The maximum number of instances per + // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25. + repeated IgnoredFacetValues ignored_facet_values = 2; + + // Each instance replaces a list of facet values by a merged facet + // value. If a facet value is not in any list, then it will stay the same. + // To avoid conflicts, only paths of length 1 are accepted. In other words, + // if "dark_blue" merged into "BLUE", then the latter can't merge into + // "blues" because this would create a path of length 2. The maximum number + // of instances of MergedFacetValue per + // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100. + // This feature is available only for textual custom attributes. + repeated MergedFacetValue merged_facet_values = 3; + + // Use this field only if you want to merge a facet key into another facet + // key. + MergedFacet merged_facet = 4; + + // Set this field only if you want to rerank based on facet values engaged + // by the user for the current key. This option is only possible for custom + // facetable textual keys. + RerankConfig rerank_config = 5; + } + // The type of an attribute. enum AttributeType { // The type of the attribute is unknown. @@ -211,7 +330,9 @@ message CatalogAttribute { // are indexed so that it can be filtered, faceted, or boosted in // [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. // - // Must be specified, otherwise throws INVALID_FORMAT error. + // Must be specified when + // [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + // is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. IndexableOption indexable_option = 5; // If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic @@ -233,7 +354,9 @@ message CatalogAttribute { // [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search], // as there are no text values associated to numerical attributes. // - // Must be specified, otherwise throws INVALID_FORMAT error. + // Must be specified, when + // [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + // is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. SearchableOption searchable_option = 7; // When @@ -255,6 +378,9 @@ message CatalogAttribute { // results. If unset, the server behavior defaults to // [RETRIEVABLE_DISABLED][google.cloud.retail.v2alpha.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED]. RetrievableOption retrievable_option = 12; + + // Contains facet options. + FacetConfig facet_config = 13; } // Catalog level attribute config. @@ -344,8 +470,8 @@ message CompletionConfig { // Output only. Name of the LRO corresponding to the latest suggestion terms // list import. // - // Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - // retrieve the latest state of the Long Running Operation. + // Can use [GetOperation][google.longrunning.Operations.GetOperation] API + // method to retrieve the latest state of the Long Running Operation. string last_suggestions_import_operation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -375,10 +501,10 @@ message CompletionConfig { } // Represents a link between a Merchant Center account and a branch. -// Once a link is established, products from the linked merchant center account -// will be streamed to the linked branch. +// After a link is established, products from the linked Merchant Center account +// are streamed to the linked branch. message MerchantCenterLink { - // Required. The linked [Merchant center account + // Required. The linked [Merchant Center account // ID](https://developers.google.com/shopping-content/guides/accountstatuses). // The account must be a standalone account or a sub-account of a MCA. int64 merchant_center_account_id = 1 [(google.api.field_behavior) = REQUIRED]; @@ -388,7 +514,7 @@ message MerchantCenterLink { // empty value will use the currently configured default branch. However, // changing the default branch later on won't change the linked branch here. // - // A single branch ID can only have one linked merchant center account ID. + // A single branch ID can only have one linked Merchant Center account ID. string branch_id = 2; // String representing the destination to import for, all if left empty. @@ -470,8 +596,8 @@ message Catalog { [(google.api.field_behavior) = REQUIRED]; // The Merchant Center linking configuration. - // Once a link is added, the data stream from Merchant Center to Cloud Retail + // After a link is added, the data stream from Merchant Center to Cloud Retail // will be enabled automatically. The requester must have access to the - // merchant center account in order to make changes to this field. + // Merchant Center account in order to make changes to this field. MerchantCenterLinkingConfig merchant_center_linking_config = 6; } diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/common.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/common.proto index a112dcdebe4d..1b6da16d9378 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/common.proto +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/common.proto @@ -124,6 +124,12 @@ message Condition { // Range of time(s) specifying when Condition is active. // Condition true if any time range matches. repeated TimeRange active_time_range = 3; + + // Used to support browse uses cases. + // A list (up to 10 entries) of categories or departments. + // The format should be the same as + // [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories]; + repeated string page_categories = 4; } // A rule is a condition-action pair @@ -173,17 +179,19 @@ message Rule { } // * Rule Condition: - // - No - // [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms] - // provided is a global match. - // - 1 or more - // [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms] - // provided are combined with OR operator. + // - No + // [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms] + // provided is a global match. + // - 1 or more + // [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms] + // provided are combined with OR operator. + // // * Action Input: The request query and filter that are applied to the // retrieved products, in addition to any filters already provided with the // SearchRequest. The AND operator is used to combine the query's existing // filters with the filter rule(s). NOTE: May result in 0 results when // filters conflict. + // // * Action Result: Filters the returned objects to be ONLY those that passed // the filter. message FilterAction { @@ -193,9 +201,8 @@ message Rule { // set. // * Filter syntax is identical to // [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. - // See more - // details at the Retail Search - // [user guide](/retail/search/docs/filter-and-order#filter). + // For more + // information, see [Filter](/retail/docs/filter-and-order#filter). // * To filter products with product ID "product_1" or "product_2", and // color // "Red" or "Blue":
@@ -208,7 +215,7 @@ message Rule { // Redirects a shopper to a specific page. // // * Rule Condition: - // - Must specify + // Must specify // [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]. // * Action Input: Request Query // * Action Result: Redirects shopper to provided uri. @@ -290,6 +297,78 @@ message Rule { repeated string ignore_terms = 1; } + // Force returns an attribute/facet in the request around a certain position + // or above. + // + // * Rule Condition: + // Must specify non-empty + // [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms] + // (for search only) or + // [Condition.page_categories][google.cloud.retail.v2alpha.Condition.page_categories] + // (for browse only), but can't specify both. + // + // * Action Inputs: attribute name, position + // + // * Action Result: Will force return a facet key around a certain position + // or above if the condition is satisfied. + // + // Example: Suppose the query is "shoes", the + // [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms] + // is "shoes", the + // [ForceReturnFacetAction.FacetPositionAdjustment.attribute_name][google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment.attribute_name] + // is "size" and the + // [ForceReturnFacetAction.FacetPositionAdjustment.position][google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment.position] + // is 8. + // + // Two cases: a) The facet key "size" is not already in the top 8 slots, then + // the facet "size" will appear at a position close to 8. b) The facet key + // "size" in among the top 8 positions in the request, then it will stay at + // its current rank. + message ForceReturnFacetAction { + // Each facet position adjustment consists of a single attribute name (i.e. + // facet key) along with a specified position. + message FacetPositionAdjustment { + // The attribute name to force return as a facet. Each attribute name + // should be a valid attribute name, be non-empty and contain at most 80 + // characters long. + string attribute_name = 1; + + // This is the position in the request as explained above. It should be + // strictly positive be at most 100. + int32 position = 2; + } + + // Each instance corresponds to a force return attribute for the given + // condition. There can't be more 3 instances here. + repeated FacetPositionAdjustment facet_position_adjustments = 1; + } + + // Removes an attribute/facet in the request if is present. + // + // * Rule Condition: + // Must specify non-empty + // [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms] + // (for search only) or + // [Condition.page_categories][google.cloud.retail.v2alpha.Condition.page_categories] + // (for browse only), but can't specify both. + // + // * Action Input: attribute name + // + // * Action Result: Will remove the attribute (as a facet) from the request + // if it is present. + // + // Example: Suppose the query is "shoes", the + // [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms] + // is "shoes" and the attribute name "size", then facet key "size" will be + // removed from the request (if it is present). + message RemoveFacetAction { + // The attribute names (i.e. facet keys) to remove from the dynamic facets + // (if present in the request). There can't be more 3 attribute names. + // Each attribute name should be a valid attribute name, be non-empty and + // contain at most 80 characters. + repeated string attribute_names = 1; + } + // An action must be provided. oneof action { // A boost action. @@ -316,6 +395,12 @@ message Rule { // Treats a set of terms as synonyms of one another. TwowaySynonymsAction twoway_synonyms_action = 11; + + // Force returns an attribute as a facet in the request. + ForceReturnFacetAction force_return_facet_action = 12; + + // Remove an attribute as a facet in the request (if present). + RemoveFacetAction remove_facet_action = 13; } // Required. The condition that triggers the rule. diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/completion_service.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/completion_service.proto index 3b90365b05b2..13a7ce610776 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/completion_service.proto +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/completion_service.proto @@ -157,10 +157,10 @@ message CompleteQueryRequest { // This field is only available for "cloud-retail" dataset. bool enable_attribute_suggestions = 9; - // The entity for customers that may run multiple different entities, domains, - // sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, + // The entity for customers who run multiple entities, domains, sites, or + // regions, for example, `Google US`, `Google Ads`, `Waymo`, // `google.com`, `youtube.com`, etc. - // If this is set, it should be exactly matched with + // If this is set, it must be an exact match with // [UserEvent.entity][google.cloud.retail.v2alpha.UserEvent.entity] to get // per-entity autocomplete results. string entity = 10; @@ -187,19 +187,22 @@ message CompleteQueryResponse { // Facet information for the suggestion term. Gives the number of items // resulting from a search with this suggestion term for each facet. // - // This is an experimental feature for limited customers. Please reach out - // to the support team if you would like to receive this information. + // This is an experimental feature for limited customers. If you want to + // receive this facet information, reach out to the Retail support team. repeated SearchResponse.Facet facets = 3; // Total number of products associated with a search with this suggestion. // - // This is an experimental feature for limited customers. Please reach out - // to the support team if you would like to receive this information. + // This is an experimental feature for limited customers. If you want to + // receive this product count information, reach out to the Retail support + // team. int32 total_product_count = 4; } - // Recent search of this user. + // Deprecated: Recent search of this user. message RecentSearchResult { + option deprecated = true; + // The recent search query. string recent_search = 1; } @@ -220,9 +223,9 @@ message CompleteQueryResponse { // attribution of complete model performance. string attribution_token = 2; - // Matched recent searches of this user. The maximum number of recent searches - // is 10. This field is a restricted feature. Contact Retail Search support - // team if you are interested in enabling it. + // Deprecated. Matched recent searches of this user. The maximum number of + // recent searches is 10. This field is a restricted feature. If you want to + // enable it, contact Retail Search support. // // This feature is only available when // [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id] @@ -241,7 +244,7 @@ message CompleteQueryResponse { // // Recent searches are deduplicated. More recent searches will be reserved // when duplication happens. - repeated RecentSearchResult recent_search_results = 3; + repeated RecentSearchResult recent_search_results = 3 [deprecated = true]; // A map of matched attribute suggestions. This field is only available for // "cloud-retail" dataset. diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/import_config.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/import_config.proto index d0077e56865e..e82b7efb38d0 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/import_config.proto +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/import_config.proto @@ -196,7 +196,8 @@ message ImportProductsRequest { ImportErrorsConfig errors_config = 3; // Indicates which fields in the provided imported `products` to update. If - // not set, all fields are updated. + // not set, all fields are updated. If provided, only the existing product + // fields are updated. Missing products will not be created. google.protobuf.FieldMask update_mask = 4; // The mode of reconciliation between existing products and the products to be @@ -212,9 +213,14 @@ message ImportProductsRequest { // Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has // to be within the same project as // [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent]. - // Make sure that `service-@gcp-sa-retail.iam.gserviceaccount.com` has the - // `pubsub.topics.publish` IAM permission on the topic. + // Make sure that both + // `cloud-retail-customer-data-access@system.gserviceaccount.com` and + // `service-@gcp-sa-retail.iam.gserviceaccount.com` + // have the `pubsub.topics.publish` IAM permission on the topic. + // + // Only supported when + // [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode] + // is set to `FULL`. string notification_pubsub_topic = 7; // If true, this performs the FULL import even if it would delete a large diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/merchant_center_account_link.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/merchant_center_account_link.proto index 9135ab84388b..6a979bf27912 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/merchant_center_account_link.proto +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/merchant_center_account_link.proto @@ -30,8 +30,8 @@ option php_namespace = "Google\\Cloud\\Retail\\V2alpha"; option ruby_package = "Google::Cloud::Retail::V2alpha"; // Represents a link between a Merchant Center account and a branch. -// Once a link is established, products from the linked merchant center account -// will be streamed to the linked branch. +// After a link is established, products from the linked Merchant Center account +// are streamed to the linked branch. message MerchantCenterAccountLink { option (google.api.resource) = { type: "retail.googleapis.com/MerchantCenterAccountLink" @@ -88,12 +88,12 @@ message MerchantCenterAccountLink { // The account must be a standalone account or a sub-account of a MCA. int64 merchant_center_account_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The branch id (e.g. 0/1/2) within the catalog that products from + // Required. The branch ID (e.g. 0/1/2) within the catalog that products from // merchant_center_account_id are streamed to. When updating this field, an // empty value will use the currently configured default branch. However, // changing the default branch later on won't change the linked branch here. // - // A single branch id can only have one linked merchant center account id. + // A single branch ID can only have one linked Merchant Center account ID. string branch_id = 3 [(google.api.field_behavior) = REQUIRED]; // The FeedLabel used to perform filtering. @@ -122,8 +122,12 @@ message MerchantCenterAccountLink { // Output only. Represents the state of the link. State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. GCP project ID. + // Output only. Google Cloud project ID. string project_id = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. An optional arbitrary string that could be used as a tag for + // tracking link source. + string source = 10 [(google.api.field_behavior) = OPTIONAL]; } // Common metadata related to the progress of the operations. diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/merchant_center_account_link_service.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/merchant_center_account_link_service.proto index d79defdec39a..2decfde2e311 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/merchant_center_account_link_service.proto +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/merchant_center_account_link_service.proto @@ -86,7 +86,7 @@ service MerchantCenterAccountLinkService { message ListMerchantCenterAccountLinksRequest { // Required. The parent Catalog of the resource. // It must match this format: - // projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID} + // `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" } @@ -107,7 +107,7 @@ message ListMerchantCenterAccountLinksResponse { message CreateMerchantCenterAccountLinkRequest { // Required. The branch resource where this MerchantCenterAccountLink will be // created. Format: - // projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}} + // `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" } @@ -130,7 +130,7 @@ message CreateMerchantCenterAccountLinkRequest { // method. message DeleteMerchantCenterAccountLinkRequest { // Required. Full resource name. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/model.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/model.proto index 51d474797ef6..1a1791c7637c 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/model.proto +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/model.proto @@ -253,6 +253,25 @@ message Model { [(google.api.field_behavior) = OPTIONAL]; } + // Additional configs for the frequently-bought-together model type. + message FrequentlyBoughtTogetherFeaturesConfig { + // Optional. Specifies the context of the model when it is used in predict + // requests. Can only be set for the `frequently-bought-together` type. If + // it isn't specified, it defaults to + // [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2alpha.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS]. + ContextProductsType context_products_type = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Additional model features config. + message ModelFeaturesConfig { + oneof type_dedicated_config { + // Additional configs for frequently-bought-together models. + FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = + 1; + } + } + // The serving state of the model. enum ServingState { // Unspecified serving state. @@ -321,6 +340,22 @@ message Model { DATA_ERROR = 2; } + // Use single or multiple context products for recommendations. + enum ContextProductsType { + // Unspecified default value, should never be explicitly set. + // Defaults to + // [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2alpha.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS]. + CONTEXT_PRODUCTS_TYPE_UNSPECIFIED = 0; + + // Use only a single product as context for the recommendation. Typically + // used on pages like add-to-cart or product details. + SINGLE_CONTEXT_PRODUCT = 1; + + // Use one or multiple products as context for the recommendation. Typically + // used on shopping cart pages. + MULTIPLE_CONTEXT_PRODUCTS = 2; + } + // Training configuration specific to a // [Model.type][google.cloud.retail.v2alpha.Model.type] - currently, only for // page optimization. @@ -448,4 +483,8 @@ message Model { // PageOptimizationConfig. repeated ServingConfigList serving_config_lists = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Additional model features config. + ModelFeaturesConfig model_features_config = 22 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product.proto index 394f21912e76..88a391f1fe8f 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product.proto +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product.proto @@ -33,10 +33,6 @@ option java_package = "com.google.cloud.retail.v2alpha"; option objc_class_prefix = "RETAIL"; option php_namespace = "Google\\Cloud\\Retail\\V2alpha"; option ruby_package = "Google::Cloud::Retail::V2alpha"; -option (google.api.resource_definition) = { - type: "retail.googleapis.com/Branch" - pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/branches/{branch}" -}; // Product captures all metadata information of items to be recommended or // searched. @@ -103,24 +99,22 @@ message Product { } oneof expiration { - // The timestamp when this product becomes unavailable for - // [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. - // Note that this is only applicable to - // [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] and - // [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION], - // and ignored for - // [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]. In - // general, we suggest the users to delete the stale products explicitly, - // instead of using this field to determine staleness. + // Note that this field is applied in the following ways: // - // If it is set, the [Product][google.cloud.retail.v2alpha.Product] is not - // available for - // [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search] - // after [expire_time][google.cloud.retail.v2alpha.Product.expire_time]. - // However, the product can still be retrieved by - // [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] - // and - // [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + // * If the [Product][google.cloud.retail.v2alpha.Product] is already + // expired when it is uploaded, this product + // is not indexed for search. + // + // * If the [Product][google.cloud.retail.v2alpha.Product] is not expired + // when it is uploaded, only the + // [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY]'s and + // [Type.COLLECTION][google.cloud.retail.v2alpha.Product.Type.COLLECTION]'s + // expireTime is respected, and + // [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT]'s + // expireTime is not used. + // + // In general, we suggest the users to delete the stale + // products explicitly, instead of using this field to determine staleness. // // [expire_time][google.cloud.retail.v2alpha.Product.expire_time] must be // later than @@ -264,9 +258,10 @@ message Product { // INVALID_ARGUMENT error is returned. // // At most 250 values are allowed per - // [Product][google.cloud.retail.v2alpha.Product]. Empty values are not - // allowed. Each value must be a UTF-8 encoded string with a length limit of - // 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. + // [Product][google.cloud.retail.v2alpha.Product] unless overridden through + // the Google Cloud console. Empty values are not allowed. Each value must be + // a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, + // an INVALID_ARGUMENT error is returned. // // Corresponding properties: Google Merchant Center property // [google_product_category][mc_google_product_category]. Schema.org property @@ -288,9 +283,10 @@ message Product { // The brands of the product. // - // A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded - // string with a length limit of 1,000 characters. Otherwise, an - // INVALID_ARGUMENT error is returned. + // A maximum of 30 brands are allowed unless overridden through the Google + // Cloud console. Each + // brand must be a UTF-8 encoded string with a length limit of 1,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Corresponding properties: Google Merchant Center property // [brand](https://support.google.com/merchants/answer/6324351). Schema.org diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product_service.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product_service.proto index 85f442a3a458..72c1edecfb95 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product_service.proto +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product_service.proto @@ -196,10 +196,11 @@ service ProductService { }; } - // It is recommended to use the + // We recommend that you use the // [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] - // method instead of - // [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]. + // method instead of the + // [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces] + // method. // [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] // achieves the same results but provides more fine-grained control over // ingesting local inventory data. @@ -238,10 +239,11 @@ service ProductService { }; } - // It is recommended to use the + // We recommend that you use the // [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] - // method instead of - // [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. + // method instead of the + // [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces] + // method. // [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] // achieves the same results but provides more fine-grained control over // ingesting local inventory data. diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/project.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/project.proto new file mode 100644 index 000000000000..6b91fce278d8 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/project.proto @@ -0,0 +1,188 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.retail.v2alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/retail/v2alpha/common.proto"; + +option csharp_namespace = "Google.Cloud.Retail.V2Alpha"; +option go_package = "cloud.google.com/go/retail/apiv2alpha/retailpb;retailpb"; +option java_multiple_files = true; +option java_outer_classname = "ProjectProto"; +option java_package = "com.google.cloud.retail.v2alpha"; +option objc_class_prefix = "RETAIL"; +option php_namespace = "Google\\Cloud\\Retail\\V2alpha"; +option ruby_package = "Google::Cloud::Retail::V2alpha"; + +// Project level logging config to control what level of log will be generated +// and written to Cloud Logging. +message LoggingConfig { + option (google.api.resource) = { + type: "retail.googleapis.com/LoggingConfig" + pattern: "projects/{project}/loggingConfig" + }; + + // The logging configurations for services supporting log generation. + message LogGenerationRule { + // The logging level. + // + // By default it is set to `LOG_WARNINGS_AND_ABOVE`. + LoggingLevel logging_level = 1; + + // The log sample rate for INFO level log entries. You can use this to + // reduce the number of entries generated for INFO level logs. + // + // DO NOT set this field if the + // [logging_level][google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.logging_level] + // is not + // [LoggingLevel.LOG_ALL][google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOG_ALL]. + // Otherwise, an INVALID_ARGUMENT error is returned. + // + // Sample rate for INFO logs defaults to 1 when unset (generate and send all + // INFO logs to Cloud Logging). Its value must be greater than 0 and less + // than or equal to 1. + optional float info_log_sample_rate = 2; + } + + // The granular logging configurations for supported services. + message ServiceLogGenerationRule { + // Required. Supported service names: + // "CatalogService", + // "CompletionService", + // "ControlService", + // "MerchantCenterStreaming", + // "ModelService", + // "PredictionService", + // "ProductService", + // "ServingConfigService", + // "UserEventService", + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The log generation rule that applies to this service. + LogGenerationRule log_generation_rule = 3; + } + + // The setting to control log generation. + enum LoggingLevel { + // Default value. Defaults to `LOG_FOR_WARNINGS_AND_ABOVE` if unset. + LOGGING_LEVEL_UNSPECIFIED = 0; + + // No log will be generated and sent to Cloud Logging. + LOGGING_DISABLED = 1; + + // Log for operations resulted in fatal error. + LOG_ERRORS_AND_ABOVE = 2; + + // In addition to `LOG_ERRORS_AND_ABOVE`, also log for operations that have + // soft errors, quality suggestions. + LOG_WARNINGS_AND_ABOVE = 3; + + // Log all operations, including successful ones. + LOG_ALL = 4; + } + + // Required. Immutable. The name of the LoggingConfig singleton resource. + // Format: projects/*/loggingConfig + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // The log generation rule that applies by default to all services + // supporting log generation. It can be overridden by + // [ServiceLogGenerationRule][google.cloud.retail.v2alpha.LoggingConfig.ServiceLogGenerationRule] + // for service level control. + LogGenerationRule default_log_generation_rule = 2; + + // Controls logging configurations more granularly for each supported + // service. + // + // This overrides the + // [default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule] + // for the services specified. For those not mentioned, they will fallback to + // the default log generation rule. + repeated ServiceLogGenerationRule service_log_generation_rules = 4; +} + +// Metadata that describes a Cloud Retail Project. +message Project { + option (google.api.resource) = { + type: "retail.googleapis.com/RetailProject" + pattern: "projects/{project}/retailProject" + }; + + // Output only. Full resource name of the retail project, such as + // `projects/{project_id_or_number}/retailProject`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Retail API solutions that the project has enrolled. + repeated SolutionType enrolled_solutions = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Project level alert config. +message AlertConfig { + option (google.api.resource) = { + type: "retail.googleapis.com/AlertConfig" + pattern: "projects/{project}/alertConfig" + }; + + // Alert policy for a customer. + message AlertPolicy { + // Recipient contact information. + message Recipient { + // Email address of the recipient. + string email_address = 1; + } + + // The enrollment status enum for alert policy. + enum EnrollStatus { + // Default value. Used for customers who have not responded to the + // alert policy. + ENROLL_STATUS_UNSPECIFIED = 0; + + // Customer is enrolled in this policy. + ENROLLED = 1; + + // Customer declined this policy. + DECLINED = 2; + } + + // The feature that provides alerting capability. Supported value is + // only `search-data-quality` for now. + string alert_group = 1; + + // The enrollment status of a customer. + EnrollStatus enroll_status = 2; + + // Recipients for the alert policy. + // One alert policy should not exceed 20 recipients. + repeated Recipient recipients = 3; + } + + // Required. Immutable. The name of the AlertConfig singleton resource. + // Format: projects/*/alertConfig + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Alert policies for a customer. + // They must be unique by [AlertPolicy.alert_group] + repeated AlertPolicy alert_policies = 2; +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/project_service.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/project_service.proto new file mode 100644 index 000000000000..4e7959017372 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/project_service.proto @@ -0,0 +1,273 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.retail.v2alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/retail/v2alpha/common.proto"; +import "google/cloud/retail/v2alpha/project.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Retail.V2Alpha"; +option go_package = "cloud.google.com/go/retail/apiv2alpha/retailpb;retailpb"; +option java_multiple_files = true; +option java_outer_classname = "ProjectServiceProto"; +option java_package = "com.google.cloud.retail.v2alpha"; +option objc_class_prefix = "RETAIL"; +option php_namespace = "Google\\Cloud\\Retail\\V2alpha"; +option ruby_package = "Google::Cloud::Retail::V2alpha"; + +// Service for settings at Project level. +service ProjectService { + option (google.api.default_host) = "retail.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Gets the project. + // + // Throws `NOT_FOUND` if the project wasn't initialized for the Retail API + // service. + rpc GetProject(GetProjectRequest) returns (Project) { + option (google.api.http) = { + get: "/v2alpha/{name=projects/*/retailProject}" + }; + option (google.api.method_signature) = "name"; + } + + // Accepts service terms for this project. + // By making requests to this API, you agree to the terms of service linked + // below. + // https://cloud.google.com/retail/data-use-terms + rpc AcceptTerms(AcceptTermsRequest) returns (Project) { + option (google.api.http) = { + post: "/v2alpha/{project=projects/*/retailProject}:acceptTerms" + body: "*" + }; + option (google.api.method_signature) = "project"; + } + + // The method enrolls a solution of type [Retail + // Search][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_SEARCH] + // into a project. + // + // The [Recommendations AI solution + // type][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION] + // is enrolled by default when your project enables Retail API, so you don't + // need to call the enrollSolution method for recommendations. + rpc EnrollSolution(EnrollSolutionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2alpha/{project=projects/*}:enrollSolution" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.retail.v2alpha.EnrollSolutionResponse" + metadata_type: "google.cloud.retail.v2alpha.EnrollSolutionMetadata" + }; + } + + // Lists all the retail API solutions the project has enrolled. + rpc ListEnrolledSolutions(ListEnrolledSolutionsRequest) + returns (ListEnrolledSolutionsResponse) { + option (google.api.http) = { + get: "/v2alpha/{parent=projects/*}:enrolledSolutions" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of the + // requested project. + rpc GetLoggingConfig(GetLoggingConfigRequest) returns (LoggingConfig) { + option (google.api.http) = { + get: "/v2alpha/{name=projects/*/loggingConfig}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] of + // the requested project. + rpc UpdateLoggingConfig(UpdateLoggingConfigRequest) returns (LoggingConfig) { + option (google.api.http) = { + patch: "/v2alpha/{logging_config.name=projects/*/loggingConfig}" + body: "logging_config" + }; + option (google.api.method_signature) = "logging_config,update_mask"; + } + + // Get the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] of the + // requested project. + rpc GetAlertConfig(GetAlertConfigRequest) returns (AlertConfig) { + option (google.api.http) = { + get: "/v2alpha/{name=projects/*/alertConfig}" + }; + option (google.api.method_signature) = "name"; + } + + // Update the alert config of the requested project. + rpc UpdateAlertConfig(UpdateAlertConfigRequest) returns (AlertConfig) { + option (google.api.http) = { + patch: "/v2alpha/{alert_config.name=projects/*/alertConfig}" + body: "alert_config" + }; + option (google.api.method_signature) = "alert_config,update_mask"; + } +} + +// Request for GetProject method. +message GetProjectRequest { + // Required. Full resource name of the project. Format: + // `projects/{project_number_or_id}/retailProject` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "retail.googleapis.com/RetailProject" + } + ]; +} + +// Request for AcceptTerms method. +message AcceptTermsRequest { + // Required. Full resource name of the project. Format: + // `projects/{project_number_or_id}/retailProject` + string project = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "retail.googleapis.com/RetailProject" + } + ]; +} + +// Request for EnrollSolution method. +message EnrollSolutionRequest { + // Required. Full resource name of parent. Format: + // `projects/{project_number_or_id}` + string project = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. Solution to enroll. + SolutionType solution = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response for EnrollSolution method. +message EnrollSolutionResponse { + // Retail API solution that the project has enrolled. + SolutionType enrolled_solution = 1; +} + +// Metadata related to the EnrollSolution method. +// This will be returned by the google.longrunning.Operation.metadata field. +message EnrollSolutionMetadata {} + +// Request for ListEnrolledSolutions method. +message ListEnrolledSolutionsRequest { + // Required. Full resource name of parent. Format: + // `projects/{project_number_or_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; +} + +// Response for ListEnrolledSolutions method. +message ListEnrolledSolutionsResponse { + // Retail API solutions that the project has enrolled. + repeated SolutionType enrolled_solutions = 1; +} + +// Request for +// [ProjectService.GetLoggingConfig][google.cloud.retail.v2alpha.ProjectService.GetLoggingConfig] +// method. +message GetLoggingConfigRequest { + // Required. Full LoggingConfig resource name. Format: + // projects/{project_number}/loggingConfig + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "retail.googleapis.com/LoggingConfig" + } + ]; +} + +// Request for +// [ProjectService.UpdateLoggingConfig][google.cloud.retail.v2alpha.ProjectService.UpdateLoggingConfig] +// method. +message UpdateLoggingConfigRequest { + // Required. The [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to + // update. + // + // If the caller does not have permission to update the + // [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig], then a + // PERMISSION_DENIED error is returned. + // + // If the [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update + // does not exist, a NOT_FOUND error is returned. + LoggingConfig logging_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Indicates which fields in the provided + // [LoggingConfig][google.cloud.retail.v2alpha.LoggingConfig] to update. The + // following are the only supported fields: + // + // * [LoggingConfig.default_log_generation_rule][google.cloud.retail.v2alpha.LoggingConfig.default_log_generation_rule] + // * [LoggingConfig.service_log_generation_rules][google.cloud.retail.v2alpha.LoggingConfig.service_log_generation_rules] + // + // If not set, all supported fields are updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request for +// [ProjectService.GetAlertConfig][google.cloud.retail.v2alpha.ProjectService.GetAlertConfig] +// method. +message GetAlertConfigRequest { + // Required. Full AlertConfig resource name. Format: + // projects/{project_number}/alertConfig + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "retail.googleapis.com/AlertConfig" + } + ]; +} + +// Request for +// [ProjectService.UpdateAlertConfig][google.cloud.retail.v2alpha.ProjectService.UpdateAlertConfig] +// method. +message UpdateAlertConfigRequest { + // Required. The [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to + // update. + // + // If the caller does not have permission to update the + // [AlertConfig][google.cloud.retail.v2alpha.AlertConfig], then a + // PERMISSION_DENIED error is returned. + // + // If the [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update + // does not exist, a NOT_FOUND error is returned. + AlertConfig alert_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Indicates which fields in the provided + // [AlertConfig][google.cloud.retail.v2alpha.AlertConfig] to update. If not + // set, all supported fields are updated. + google.protobuf.FieldMask update_mask = 2; +} diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/promotion.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/promotion.proto index b458f4575fd3..b02a84e2117e 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/promotion.proto +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/promotion.proto @@ -34,7 +34,7 @@ message Promotion { // id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is // returned. // - // Google Merchant Center property - // [promotion](https://support.google.com/merchants/answer/7050148). + // Corresponds to Google Merchant Center property + // [promotion_id](https://support.google.com/merchants/answer/7050148). string promotion_id = 1; } diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/search_service.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/search_service.proto index fed0832394f6..bced414d8f6a 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/search_service.proto +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/search_service.proto @@ -119,13 +119,13 @@ message SearchRequest { // values. Maximum number of intervals is 40. // // For all numerical facet keys that appear in the list of products from - // the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + // the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are // computed from their distribution weekly. If the model assigns a high // score to a numerical facet key and its intervals are not specified in - // the search request, these percentiles will become the bounds - // for its intervals and will be returned in the response. If the + // the search request, these percentiles become the bounds + // for its intervals and are returned in the response. If the // facet key intervals are specified in the request, then the specified - // intervals will be returned instead. + // intervals are returned instead. repeated Interval intervals = 2; // Only get facet for the given restricted values. For example, when using @@ -158,14 +158,14 @@ message SearchRequest { // Only get facet values that start with the given string prefix. For // example, suppose "categories" has three values "Women > Shoe", // "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - // "categories" facet will give only "Women > Shoe" and "Women > Dress". + // "categories" facet gives only "Women > Shoe" and "Women > Dress". // Only supported on textual fields. Maximum is 10. repeated string prefixes = 8; // Only get facet values that contains the given strings. For example, // suppose "categories" has three values "Women > Shoe", // "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - // "categories" facet will give only "Women > Shoe" and "Men > Shoe". + // "categories" facet gives only "Women > Shoe" and "Men > Shoe". // Only supported on textual fields. Maximum is 10. repeated string contains = 9; @@ -198,7 +198,7 @@ message SearchRequest { string order_by = 4; // The query that is used to compute facet for the given facet key. - // When provided, it will override the default behavior of facet + // When provided, it overrides the default behavior of facet // computation. The query syntax is the same as a filter expression. See // [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] // for detail syntax and limitations. Notice that there is no limitation @@ -208,9 +208,9 @@ message SearchRequest { // // In the response, // [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value] - // will be always "1" and + // is always "1" and // [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count] - // will be the number of results that match the query. + // is the number of results that match the query. // // For example, you can set a customized facet for "shipToStore", // where @@ -218,7 +218,7 @@ message SearchRequest { // is "customizedShipToStore", and // [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query] // is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")". - // Then the facet will count the products that are both in stock and ship + // Then the facet counts the products that are both in stock and ship // to store "123". string query = 5; @@ -269,15 +269,15 @@ message SearchRequest { // Enables dynamic position for this facet. If set to true, the position of // this facet among all facets in the response is determined by Google - // Retail Search. It will be ordered together with dynamic facets if dynamic + // Retail Search. It is ordered together with dynamic facets if dynamic // facets is enabled. If set to false, the position of this facet in the - // response will be the same as in the request, and it will be ranked before + // response is the same as in the request, and it is ranked before // the facets with dynamic position enable and all dynamic facets. // // For example, you may always want to have rating facet returned in // the response, but it's not necessarily to always display the rating facet // at the top. In that case, you can set enable_dynamic_position to true so - // that the position of rating facet in response will be determined by + // that the position of rating facet in response is determined by // Google Retail Search. // // Another example, assuming you have the following facets in the request: @@ -288,13 +288,13 @@ message SearchRequest { // // * "brands", enable_dynamic_position = false // - // And also you have a dynamic facets enable, which will generate a facet - // 'gender'. Then the final order of the facets in the response can be + // And also you have a dynamic facets enable, which generates a facet + // "gender". Then, the final order of the facets in the response can be // ("price", "brands", "rating", "gender") or ("price", "brands", "gender", // "rating") depends on how Google Retail Search orders "gender" and - // "rating" facets. However, notice that "price" and "brands" will always be - // ranked at 1st and 2nd position since their enable_dynamic_position are - // false. + // "rating" facets. However, notice that "price" and "brands" are always + // ranked at first and second position because their enable_dynamic_position + // values are false. bool enable_dynamic_position = 4; } @@ -513,7 +513,7 @@ message SearchRequest { // or the name of the legacy placement resource, such as // `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. // This field is used to identify the serving config name and the set - // of models that will be used to make the search. + // of models that are used to make the search. string placement = 1 [(google.api.field_behavior) = REQUIRED]; // The branch resource name, such as @@ -579,8 +579,8 @@ message SearchRequest { // The filter syntax consists of an expression language for constructing a // predicate from one or more fields of the products being filtered. Filter - // expression is case-sensitive. See more details at this [user - // guide](https://cloud.google.com/retail/docs/filter-and-order#filter). + // expression is case-sensitive. For more information, see + // [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter). // // If this field is unrecognizable, an INVALID_ARGUMENT is returned. string filter = 10; @@ -589,22 +589,21 @@ message SearchRequest { // checking any filters on the search page. // // The filter applied to every search request when quality improvement such as - // query expansion is needed. For example, if a query does not have enough - // results, an expanded query with - // [SearchRequest.canonical_filter][google.cloud.retail.v2alpha.SearchRequest.canonical_filter] - // will be returned as a supplement of the original query. This field is - // strongly recommended to achieve high search quality. + // query expansion is needed. In the case a query does not have a sufficient + // amount of results this filter will be used to determine whether or not to + // enable the query expansion flow. The original filter will still be used for + // the query expanded search. + // This field is strongly recommended to achieve high search quality. // - // See - // [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] - // for more details about filter syntax. + // For more information about filter syntax, see + // [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]. string canonical_filter = 28; // The order in which products are returned. Products can be ordered by // a field in an [Product][google.cloud.retail.v2alpha.Product] object. Leave - // it unset if ordered by relevance. OrderBy expression is case-sensitive. See - // more details at this [user - // guide](https://cloud.google.com/retail/docs/filter-and-order#order). + // it unset if ordered by relevance. OrderBy expression is case-sensitive. For + // more information, see + // [Order](https://cloud.google.com/retail/docs/filter-and-order#order). // // If this field is unrecognizable, an INVALID_ARGUMENT is returned. string order_by = 11; @@ -622,8 +621,8 @@ message SearchRequest { // textual facets can be dynamically generated. DynamicFacetSpec dynamic_facet_spec = 21 [deprecated = true]; - // Boost specification to boost certain products. See more details at this - // [user guide](https://cloud.google.com/retail/docs/boosting). + // Boost specification to boost certain products. For more information, see + // [Boost results](https://cloud.google.com/retail/docs/boosting). // // Notice that if both // [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] @@ -635,8 +634,8 @@ message SearchRequest { BoostSpec boost_spec = 13; // The query expansion specification that specifies the conditions under which - // query expansion will occur. See more details at this [user - // guide](https://cloud.google.com/retail/docs/result-size#query_expansion). + // query expansion occurs. For more information, see [Query + // expansion](https://cloud.google.com/retail/docs/result-size#query_expansion). QueryExpansionSpec query_expansion_spec = 14; // The relevance threshold of the search results. @@ -644,8 +643,8 @@ message SearchRequest { // Defaults to // [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH], // which means only the most relevant results are shown, and the least number - // of results are returned. See more details at this [user - // guide](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). + // of results are returned. For more information, see [Adjust result + // size](https://cloud.google.com/retail/docs/result-size#relevance_thresholding). RelevanceThreshold relevance_threshold = 15; // The keys to fetch and rollup the matching @@ -773,9 +772,9 @@ message SearchRequest { // key with multiple resources. // * Keys must start with a lowercase letter or international character. // - // See [Google Cloud - // Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - // for more details. + // For more information, see [Requirements for + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // in the Resource Manager documentation. map labels = 34; // The spell correction specification that specifies the mode under @@ -995,7 +994,8 @@ message SearchResponse { repeated ExperimentInfo experiment_info = 17; } -// Metadata for active A/B testing [Experiments][]. +// Metadata for active A/B testing +// [Experiment][google.cloud.retail.v2alpha.Experiment]. message ExperimentInfo { // Metadata for active serving config A/B tests. message ServingConfigExperiment { @@ -1008,8 +1008,8 @@ message ExperimentInfo { }]; // The fully qualified resource name of the serving config - // [VariantArm.serving_config_id][] responsible for generating the search - // response. For example: + // [Experiment.VariantArm.serving_config_id][google.cloud.retail.v2alpha.Experiment.VariantArm.serving_config_id] + // responsible for generating the search response. For example: // `projects/*/locations/*/catalogs/*/servingConfigs/*`. string experiment_serving_config = 2 [(google.api.resource_reference) = { type: "retail.googleapis.com/ServingConfig" diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/serving_config.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/serving_config.proto index 10f3121aaecd..d8dc67794303 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/serving_config.proto +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/serving_config.proto @@ -255,6 +255,10 @@ message ServingConfig { // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. string enable_category_filter_level = 16; + // When the flag is enabled, the products in the denylist will not be filtered + // out in the recommendation filtering results. + bool ignore_recs_denylist = 24; + // The specification for personalization spec. // // Can only be set if diff --git a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/user_event.proto b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/user_event.proto index 71d9f4d06e7d..1b810fbbf557 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/user_event.proto +++ b/java-retail/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/user_event.proto @@ -37,6 +37,7 @@ message UserEvent { // Required. User event type. Allowed values are: // // * `add-to-cart`: Products being added to cart. + // * `remove-from-cart`: Products being removed from cart. // * `category-page-view`: Special pages such as sale or promotion pages // viewed. // * `detail-page-view`: Products detail page viewed. @@ -274,8 +275,8 @@ message UserEvent { // The entity for customers that may run multiple different entities, domains, // sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, // `google.com`, `youtube.com`, etc. - // It is recommended to set this field to get better per-entity search, - // completion and prediction results. + // We recommend that you set this field to get better per-entity search, + // completion, and prediction results. string entity = 23; } diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Catalog.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Catalog.java index d8ef2b60f4ad..ed34d4ec1e57 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Catalog.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Catalog.java @@ -245,9 +245,9 @@ public com.google.cloud.retail.v2beta.ProductLevelConfig getProductLevelConfig() * *
    * The Merchant Center linking configuration.
-   * Once a link is added, the data stream from Merchant Center to Cloud Retail
+   * After a link is added, the data stream from Merchant Center to Cloud Retail
    * will be enabled automatically. The requester must have access to the
-   * merchant center account in order to make changes to this field.
+   * Merchant Center account in order to make changes to this field.
    * 
* * @@ -265,9 +265,9 @@ public boolean hasMerchantCenterLinkingConfig() { * *
    * The Merchant Center linking configuration.
-   * Once a link is added, the data stream from Merchant Center to Cloud Retail
+   * After a link is added, the data stream from Merchant Center to Cloud Retail
    * will be enabled automatically. The requester must have access to the
-   * merchant center account in order to make changes to this field.
+   * Merchant Center account in order to make changes to this field.
    * 
* * @@ -288,9 +288,9 @@ public boolean hasMerchantCenterLinkingConfig() { * *
    * The Merchant Center linking configuration.
-   * Once a link is added, the data stream from Merchant Center to Cloud Retail
+   * After a link is added, the data stream from Merchant Center to Cloud Retail
    * will be enabled automatically. The requester must have access to the
-   * merchant center account in order to make changes to this field.
+   * Merchant Center account in order to make changes to this field.
    * 
* * @@ -1222,9 +1222,9 @@ public Builder clearProductLevelConfig() { * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1241,9 +1241,9 @@ public boolean hasMerchantCenterLinkingConfig() { * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1267,9 +1267,9 @@ public boolean hasMerchantCenterLinkingConfig() { * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1295,9 +1295,9 @@ public Builder setMerchantCenterLinkingConfig( * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1320,9 +1320,9 @@ public Builder setMerchantCenterLinkingConfig( * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1355,9 +1355,9 @@ public Builder mergeMerchantCenterLinkingConfig( * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1379,9 +1379,9 @@ public Builder clearMerchantCenterLinkingConfig() { * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1399,9 +1399,9 @@ public Builder clearMerchantCenterLinkingConfig() { * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * @@ -1423,9 +1423,9 @@ public Builder clearMerchantCenterLinkingConfig() { * *
      * The Merchant Center linking configuration.
-     * Once a link is added, the data stream from Merchant Center to Cloud Retail
+     * After a link is added, the data stream from Merchant Center to Cloud Retail
      * will be enabled automatically. The requester must have access to the
-     * merchant center account in order to make changes to this field.
+     * Merchant Center account in order to make changes to this field.
      * 
* * diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttribute.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttribute.java index 001690839ee7..b79ff76d7cf3 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttribute.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttribute.java @@ -1032,6 +1032,7892 @@ private RetrievableOption(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption) } + public interface FacetConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + java.util.List getFacetIntervalsList(); + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + com.google.cloud.retail.v2beta.Interval getFacetIntervals(int index); + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + int getFacetIntervalsCount(); + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + java.util.List + getFacetIntervalsOrBuilderList(); + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + com.google.cloud.retail.v2beta.IntervalOrBuilder getFacetIntervalsOrBuilder(int index); + + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + java.util.List + getIgnoredFacetValuesList(); + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + getIgnoredFacetValues(int index); + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + int getIgnoredFacetValuesCount(); + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .IgnoredFacetValuesOrBuilder> + getIgnoredFacetValuesOrBuilderList(); + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder + getIgnoredFacetValuesOrBuilder(int index); + + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + java.util.List + getMergedFacetValuesList(); + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + getMergedFacetValues(int index); + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + int getMergedFacetValuesCount(); + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .MergedFacetValueOrBuilder> + getMergedFacetValuesOrBuilderList(); + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder + getMergedFacetValuesOrBuilder(int index); + + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return Whether the mergedFacet field is set. + */ + boolean hasMergedFacet(); + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return The mergedFacet. + */ + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet getMergedFacet(); + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetOrBuilder + getMergedFacetOrBuilder(); + + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return Whether the rerankConfig field is set. + */ + boolean hasRerankConfig(); + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return The rerankConfig. + */ + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig getRerankConfig(); + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfigOrBuilder + getRerankConfigOrBuilder(); + } + /** + * + * + *
+   * Possible options for the facet that corresponds to the current attribute
+   * config.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.CatalogAttribute.FacetConfig} + */ + public static final class FacetConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig) + FacetConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use FacetConfig.newBuilder() to construct. + private FacetConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FacetConfig() { + facetIntervals_ = java.util.Collections.emptyList(); + ignoredFacetValues_ = java.util.Collections.emptyList(); + mergedFacetValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FacetConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.class, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.Builder.class); + } + + public interface IgnoredFacetValuesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + int getValuesCount(); + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + java.lang.String getValues(int index); + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + com.google.protobuf.ByteString getValuesBytes(int index); + + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + } + /** + * + * + *
+     * [Facet values][google.cloud.retail.v2beta.SearchResponse.Facet.values] to
+     * ignore on [facets][google.cloud.retail.v2beta.SearchResponse.Facet]
+     * during the specified time range for the given
+     * [SearchResponse.Facet.key][google.cloud.retail.v2beta.SearchResponse.Facet.key]
+     * attribute.
+     * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues} + */ + public static final class IgnoredFacetValues extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues) + IgnoredFacetValuesOrBuilder { + private static final long serialVersionUID = 0L; + // Use IgnoredFacetValues.newBuilder() to construct. + private IgnoredFacetValues(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IgnoredFacetValues() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IgnoredFacetValues(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_IgnoredFacetValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + .class, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + .Builder.class); + } + + private int bitField0_; + public static final int VALUES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_; + } + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+       * List of facet values to ignore for the following time range. The facet
+       * values are the same as the attribute values. There is a limit of 10
+       * values per instance of IgnoredFacetValues. Each value can have at most
+       * 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+       * Time range for the current list of facet values to ignore.
+       * If multiple time ranges are specified for an facet value for the
+       * current attribute, consider all of them. If both are empty, ignore
+       * always. If start time and end time are set, then start time
+       * must be before end time.
+       * If start time is not empty and end time is empty, then will ignore
+       * these facet values after the start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+       * If start time is empty and end time is not empty, then ignore these
+       * facet values before end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 < values_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, values_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getEndTime()); + } + 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 < values_.size(); i++) { + dataSize += computeStringSizeNoTag(values_.getRaw(i)); + } + size += dataSize; + size += 1 * getValuesList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues other = + (com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues) obj; + + if (!getValuesList().equals(other.getValuesList())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) 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 (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * [Facet values][google.cloud.retail.v2beta.SearchResponse.Facet.values] to
+       * ignore on [facets][google.cloud.retail.v2beta.SearchResponse.Facet]
+       * during the specified time range for the given
+       * [SearchResponse.Facet.key][google.cloud.retail.v2beta.SearchResponse.Facet.key]
+       * attribute.
+       * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues) + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_IgnoredFacetValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + .class, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + .Builder.class); + } + + // Construct using + // com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + build() { + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + buildPartial() { + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues result = + new com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); + result.values_ = values_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues) { + return mergeFrom( + (com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues other) { + if (other + == com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + .getDefaultInstance()) return this; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ |= 0x00000001; + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(); + ensureValuesIsMutable(); + values_.add(s); + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureValuesIsMutable() { + if (!values_.isModifiable()) { + values_ = new com.google.protobuf.LazyStringArrayList(values_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + values_.makeImmutable(); + return values_; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * List of facet values to ignore for the following time range. The facet
+         * values are the same as the attribute values. There is a limit of 10
+         * values per instance of IgnoredFacetValues. Each value can have at most
+         * 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param value The bytes of the values to add. + * @return This builder for chaining. + */ + public Builder addValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } + } + /** + * + * + *
+         * Time range for the current list of facet values to ignore.
+         * If multiple time ranges are specified for an facet value for the
+         * current attribute, consider all of them. If both are empty, ignore
+         * always. If start time and end time are set, then start time
+         * must be before end time.
+         * If start time is not empty and end time is empty, then will ignore
+         * these facet values after the start time.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @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(); + } + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+         * If start time is empty and end time is not empty, then ignore these
+         * facet values before end time.
+         * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues) + private static final com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .IgnoredFacetValues + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues(); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IgnoredFacetValues parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MergedFacetValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + int getValuesCount(); + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + java.lang.String getValues(int index); + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + com.google.protobuf.ByteString getValuesBytes(int index); + + /** + * + * + *
+       * All the previous values are replaced by this merged facet value.
+       * This merged_value must be non-empty and can have up to 128 characters.
+       * 
+ * + * string merged_value = 2; + * + * @return The mergedValue. + */ + java.lang.String getMergedValue(); + /** + * + * + *
+       * All the previous values are replaced by this merged facet value.
+       * This merged_value must be non-empty and can have up to 128 characters.
+       * 
+ * + * string merged_value = 2; + * + * @return The bytes for mergedValue. + */ + com.google.protobuf.ByteString getMergedValueBytes(); + } + /** + * + * + *
+     * Replaces a set of textual facet values by the same (possibly different)
+     * merged facet value. Each facet value should appear at most once as a
+     * value per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]. This
+     * feature is available only for textual custom attributes.
+     * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue} + */ + public static final class MergedFacetValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue) + MergedFacetValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use MergedFacetValue.newBuilder() to construct. + private MergedFacetValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MergedFacetValue() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + mergedValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MergedFacetValue(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacetValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.class, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + .class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_; + } + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+       * All the facet values that are replaces by the same
+       * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+       * that follows. The maximum number of values per MergedFacetValue is 25.
+       * Each value can have up to 128 characters.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + public static final int MERGED_VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object mergedValue_ = ""; + /** + * + * + *
+       * All the previous values are replaced by this merged facet value.
+       * This merged_value must be non-empty and can have up to 128 characters.
+       * 
+ * + * string merged_value = 2; + * + * @return The mergedValue. + */ + @java.lang.Override + public java.lang.String getMergedValue() { + java.lang.Object ref = mergedValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergedValue_ = s; + return s; + } + } + /** + * + * + *
+       * All the previous values are replaced by this merged facet value.
+       * This merged_value must be non-empty and can have up to 128 characters.
+       * 
+ * + * string merged_value = 2; + * + * @return The bytes for mergedValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMergedValueBytes() { + java.lang.Object ref = mergedValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mergedValue_ = 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 < values_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, values_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mergedValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mergedValue_); + } + 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 < values_.size(); i++) { + dataSize += computeStringSizeNoTag(values_.getRaw(i)); + } + size += dataSize; + size += 1 * getValuesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mergedValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mergedValue_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue other = + (com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue) obj; + + if (!getValuesList().equals(other.getValuesList())) return false; + if (!getMergedValue().equals(other.getMergedValue())) 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 (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (37 * hash) + MERGED_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getMergedValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Replaces a set of textual facet values by the same (possibly different)
+       * merged facet value. Each facet value should appear at most once as a
+       * value per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]. This
+       * feature is available only for textual custom attributes.
+       * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue) + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacetValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + .class, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + .Builder.class); + } + + // Construct using + // com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + mergedValue_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + build() { + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + buildPartial() { + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue result = + new com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); + result.values_ = values_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.mergedValue_ = mergedValue_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue) { + return mergeFrom( + (com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue other) { + if (other + == com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + .getDefaultInstance()) return this; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ |= 0x00000001; + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + if (!other.getMergedValue().isEmpty()) { + mergedValue_ = other.mergedValue_; + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureValuesIsMutable(); + values_.add(s); + break; + } // case 10 + case 18: + { + mergedValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureValuesIsMutable() { + if (!values_.isModifiable()) { + values_ = new com.google.protobuf.LazyStringArrayList(values_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + values_.makeImmutable(); + return values_; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * All the facet values that are replaces by the same
+         * [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
+         * that follows. The maximum number of values per MergedFacetValue is 25.
+         * Each value can have up to 128 characters.
+         * 
+ * + * repeated string values = 1; + * + * @param value The bytes of the values to add. + * @return This builder for chaining. + */ + public Builder addValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object mergedValue_ = ""; + /** + * + * + *
+         * All the previous values are replaced by this merged facet value.
+         * This merged_value must be non-empty and can have up to 128 characters.
+         * 
+ * + * string merged_value = 2; + * + * @return The mergedValue. + */ + public java.lang.String getMergedValue() { + java.lang.Object ref = mergedValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergedValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * All the previous values are replaced by this merged facet value.
+         * This merged_value must be non-empty and can have up to 128 characters.
+         * 
+ * + * string merged_value = 2; + * + * @return The bytes for mergedValue. + */ + public com.google.protobuf.ByteString getMergedValueBytes() { + java.lang.Object ref = mergedValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mergedValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * All the previous values are replaced by this merged facet value.
+         * This merged_value must be non-empty and can have up to 128 characters.
+         * 
+ * + * string merged_value = 2; + * + * @param value The mergedValue to set. + * @return This builder for chaining. + */ + public Builder setMergedValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mergedValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * All the previous values are replaced by this merged facet value.
+         * This merged_value must be non-empty and can have up to 128 characters.
+         * 
+ * + * string merged_value = 2; + * + * @return This builder for chaining. + */ + public Builder clearMergedValue() { + mergedValue_ = getDefaultInstance().getMergedValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * All the previous values are replaced by this merged facet value.
+         * This merged_value must be non-empty and can have up to 128 characters.
+         * 
+ * + * string merged_value = 2; + * + * @param value The bytes for mergedValue to set. + * @return This builder for chaining. + */ + public Builder setMergedValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mergedValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue) + private static final com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .MergedFacetValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue(); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MergedFacetValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MergedFacetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The merged facet key should be a valid facet key that is different than
+       * the facet key of the current catalog attribute. We refer this is
+       * merged facet key as the child of the current catalog attribute. This
+       * merged facet key can't be a parent of another facet key (i.e. no
+       * directed path of length 2). This merged facet key needs to be either a
+       * textual custom attribute or a numerical custom attribute.
+       * 
+ * + * string merged_facet_key = 1; + * + * @return The mergedFacetKey. + */ + java.lang.String getMergedFacetKey(); + /** + * + * + *
+       * The merged facet key should be a valid facet key that is different than
+       * the facet key of the current catalog attribute. We refer this is
+       * merged facet key as the child of the current catalog attribute. This
+       * merged facet key can't be a parent of another facet key (i.e. no
+       * directed path of length 2). This merged facet key needs to be either a
+       * textual custom attribute or a numerical custom attribute.
+       * 
+ * + * string merged_facet_key = 1; + * + * @return The bytes for mergedFacetKey. + */ + com.google.protobuf.ByteString getMergedFacetKeyBytes(); + } + /** + * + * + *
+     * The current facet key (i.e. attribute config) maps into the
+     * [merged_facet_key][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet.merged_facet_key].
+     * A facet key can have at most one child. The current facet key and the
+     * merged facet key need both to be textual custom attributes or both
+     * numerical custom attributes (same type).
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet} + */ + public static final class MergedFacet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet) + MergedFacetOrBuilder { + private static final long serialVersionUID = 0L; + // Use MergedFacet.newBuilder() to construct. + private MergedFacet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MergedFacet() { + mergedFacetKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MergedFacet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet.class, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet.Builder + .class); + } + + public static final int MERGED_FACET_KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object mergedFacetKey_ = ""; + /** + * + * + *
+       * The merged facet key should be a valid facet key that is different than
+       * the facet key of the current catalog attribute. We refer this is
+       * merged facet key as the child of the current catalog attribute. This
+       * merged facet key can't be a parent of another facet key (i.e. no
+       * directed path of length 2). This merged facet key needs to be either a
+       * textual custom attribute or a numerical custom attribute.
+       * 
+ * + * string merged_facet_key = 1; + * + * @return The mergedFacetKey. + */ + @java.lang.Override + public java.lang.String getMergedFacetKey() { + java.lang.Object ref = mergedFacetKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergedFacetKey_ = s; + return s; + } + } + /** + * + * + *
+       * The merged facet key should be a valid facet key that is different than
+       * the facet key of the current catalog attribute. We refer this is
+       * merged facet key as the child of the current catalog attribute. This
+       * merged facet key can't be a parent of another facet key (i.e. no
+       * directed path of length 2). This merged facet key needs to be either a
+       * textual custom attribute or a numerical custom attribute.
+       * 
+ * + * string merged_facet_key = 1; + * + * @return The bytes for mergedFacetKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMergedFacetKeyBytes() { + java.lang.Object ref = mergedFacetKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mergedFacetKey_ = 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.GeneratedMessageV3.isStringEmpty(mergedFacetKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mergedFacetKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mergedFacetKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mergedFacetKey_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet other = + (com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet) obj; + + if (!getMergedFacetKey().equals(other.getMergedFacetKey())) 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) + MERGED_FACET_KEY_FIELD_NUMBER; + hash = (53 * hash) + getMergedFacetKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * The current facet key (i.e. attribute config) maps into the
+       * [merged_facet_key][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet.merged_facet_key].
+       * A facet key can have at most one child. The current facet key and the
+       * merged facet key need both to be textual custom attributes or both
+       * numerical custom attributes (same type).
+       * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet) + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet.class, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet.Builder + .class); + } + + // Construct using + // com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mergedFacetKey_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacet_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet build() { + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + buildPartial() { + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet result = + new com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mergedFacetKey_ = mergedFacetKey_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet) { + return mergeFrom( + (com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet other) { + if (other + == com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance()) return this; + if (!other.getMergedFacetKey().isEmpty()) { + mergedFacetKey_ = other.mergedFacetKey_; + 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: + { + mergedFacetKey_ = 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 mergedFacetKey_ = ""; + /** + * + * + *
+         * The merged facet key should be a valid facet key that is different than
+         * the facet key of the current catalog attribute. We refer this is
+         * merged facet key as the child of the current catalog attribute. This
+         * merged facet key can't be a parent of another facet key (i.e. no
+         * directed path of length 2). This merged facet key needs to be either a
+         * textual custom attribute or a numerical custom attribute.
+         * 
+ * + * string merged_facet_key = 1; + * + * @return The mergedFacetKey. + */ + public java.lang.String getMergedFacetKey() { + java.lang.Object ref = mergedFacetKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergedFacetKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The merged facet key should be a valid facet key that is different than
+         * the facet key of the current catalog attribute. We refer this is
+         * merged facet key as the child of the current catalog attribute. This
+         * merged facet key can't be a parent of another facet key (i.e. no
+         * directed path of length 2). This merged facet key needs to be either a
+         * textual custom attribute or a numerical custom attribute.
+         * 
+ * + * string merged_facet_key = 1; + * + * @return The bytes for mergedFacetKey. + */ + public com.google.protobuf.ByteString getMergedFacetKeyBytes() { + java.lang.Object ref = mergedFacetKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mergedFacetKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The merged facet key should be a valid facet key that is different than
+         * the facet key of the current catalog attribute. We refer this is
+         * merged facet key as the child of the current catalog attribute. This
+         * merged facet key can't be a parent of another facet key (i.e. no
+         * directed path of length 2). This merged facet key needs to be either a
+         * textual custom attribute or a numerical custom attribute.
+         * 
+ * + * string merged_facet_key = 1; + * + * @param value The mergedFacetKey to set. + * @return This builder for chaining. + */ + public Builder setMergedFacetKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mergedFacetKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The merged facet key should be a valid facet key that is different than
+         * the facet key of the current catalog attribute. We refer this is
+         * merged facet key as the child of the current catalog attribute. This
+         * merged facet key can't be a parent of another facet key (i.e. no
+         * directed path of length 2). This merged facet key needs to be either a
+         * textual custom attribute or a numerical custom attribute.
+         * 
+ * + * string merged_facet_key = 1; + * + * @return This builder for chaining. + */ + public Builder clearMergedFacetKey() { + mergedFacetKey_ = getDefaultInstance().getMergedFacetKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * The merged facet key should be a valid facet key that is different than
+         * the facet key of the current catalog attribute. We refer this is
+         * merged facet key as the child of the current catalog attribute. This
+         * merged facet key can't be a parent of another facet key (i.e. no
+         * directed path of length 2). This merged facet key needs to be either a
+         * textual custom attribute or a numerical custom attribute.
+         * 
+ * + * string merged_facet_key = 1; + * + * @param value The bytes for mergedFacetKey to set. + * @return This builder for chaining. + */ + public Builder setMergedFacetKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mergedFacetKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet) + private static final com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet(); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MergedFacet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RerankConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * If set to true, then we also rerank the dynamic facets based on the
+       * facet values engaged by the user for the current attribute key during
+       * serving.
+       * 
+ * + * bool rerank_facet = 1; + * + * @return The rerankFacet. + */ + boolean getRerankFacet(); + + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @return A list containing the facetValues. + */ + java.util.List getFacetValuesList(); + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @return The count of facetValues. + */ + int getFacetValuesCount(); + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the element to return. + * @return The facetValues at the given index. + */ + java.lang.String getFacetValues(int index); + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the value to return. + * @return The bytes of the facetValues at the given index. + */ + com.google.protobuf.ByteString getFacetValuesBytes(int index); + } + /** + * + * + *
+     * Options to rerank based on facet values engaged by the user for the
+     * current key. That key needs to be a custom textual key and facetable.
+     * To use this control, you also need to pass all the facet keys engaged by
+     * the user in the request using the field [SearchRequest.FacetSpec]. In
+     * particular, if you don't pass the facet keys engaged that you want to
+     * rerank on, this control won't be effective. Moreover, to obtain better
+     * results, the facet values that you want to rerank on should be close to
+     * English (ideally made of words, underscores, and spaces).
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig} + */ + public static final class RerankConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig) + RerankConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RerankConfig.newBuilder() to construct. + private RerankConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RerankConfig() { + facetValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RerankConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_RerankConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_RerankConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig.class, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig.Builder + .class); + } + + public static final int RERANK_FACET_FIELD_NUMBER = 1; + private boolean rerankFacet_ = false; + /** + * + * + *
+       * If set to true, then we also rerank the dynamic facets based on the
+       * facet values engaged by the user for the current attribute key during
+       * serving.
+       * 
+ * + * bool rerank_facet = 1; + * + * @return The rerankFacet. + */ + @java.lang.Override + public boolean getRerankFacet() { + return rerankFacet_; + } + + public static final int FACET_VALUES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList facetValues_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @return A list containing the facetValues. + */ + public com.google.protobuf.ProtocolStringList getFacetValuesList() { + return facetValues_; + } + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @return The count of facetValues. + */ + public int getFacetValuesCount() { + return facetValues_.size(); + } + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the element to return. + * @return The facetValues at the given index. + */ + public java.lang.String getFacetValues(int index) { + return facetValues_.get(index); + } + /** + * + * + *
+       * If empty, rerank on all facet values for the current key. Otherwise,
+       * will rerank on the facet values from this list only.
+       * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the value to return. + * @return The bytes of the facetValues at the given index. + */ + public com.google.protobuf.ByteString getFacetValuesBytes(int index) { + return facetValues_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (rerankFacet_ != false) { + output.writeBool(1, rerankFacet_); + } + for (int i = 0; i < facetValues_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, facetValues_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rerankFacet_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, rerankFacet_); + } + { + int dataSize = 0; + for (int i = 0; i < facetValues_.size(); i++) { + dataSize += computeStringSizeNoTag(facetValues_.getRaw(i)); + } + size += dataSize; + size += 1 * getFacetValuesList().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.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig other = + (com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig) obj; + + if (getRerankFacet() != other.getRerankFacet()) return false; + if (!getFacetValuesList().equals(other.getFacetValuesList())) 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) + RERANK_FACET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRerankFacet()); + if (getFacetValuesCount() > 0) { + hash = (37 * hash) + FACET_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getFacetValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Options to rerank based on facet values engaged by the user for the
+       * current key. That key needs to be a custom textual key and facetable.
+       * To use this control, you also need to pass all the facet keys engaged by
+       * the user in the request using the field [SearchRequest.FacetSpec]. In
+       * particular, if you don't pass the facet keys engaged that you want to
+       * rerank on, this control won't be effective. Moreover, to obtain better
+       * results, the facet values that you want to rerank on should be close to
+       * English (ideally made of words, underscores, and spaces).
+       * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig) + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_RerankConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_RerankConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig.class, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rerankFacet_ = false; + facetValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_RerankConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig build() { + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + buildPartial() { + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig result = + new com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rerankFacet_ = rerankFacet_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + facetValues_.makeImmutable(); + result.facetValues_ = facetValues_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig) { + return mergeFrom( + (com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig other) { + if (other + == com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance()) return this; + if (other.getRerankFacet() != false) { + setRerankFacet(other.getRerankFacet()); + } + if (!other.facetValues_.isEmpty()) { + if (facetValues_.isEmpty()) { + facetValues_ = other.facetValues_; + bitField0_ |= 0x00000002; + } else { + ensureFacetValuesIsMutable(); + facetValues_.addAll(other.facetValues_); + } + 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: + { + rerankFacet_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFacetValuesIsMutable(); + facetValues_.add(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 bitField0_; + + private boolean rerankFacet_; + /** + * + * + *
+         * If set to true, then we also rerank the dynamic facets based on the
+         * facet values engaged by the user for the current attribute key during
+         * serving.
+         * 
+ * + * bool rerank_facet = 1; + * + * @return The rerankFacet. + */ + @java.lang.Override + public boolean getRerankFacet() { + return rerankFacet_; + } + /** + * + * + *
+         * If set to true, then we also rerank the dynamic facets based on the
+         * facet values engaged by the user for the current attribute key during
+         * serving.
+         * 
+ * + * bool rerank_facet = 1; + * + * @param value The rerankFacet to set. + * @return This builder for chaining. + */ + public Builder setRerankFacet(boolean value) { + + rerankFacet_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * If set to true, then we also rerank the dynamic facets based on the
+         * facet values engaged by the user for the current attribute key during
+         * serving.
+         * 
+ * + * bool rerank_facet = 1; + * + * @return This builder for chaining. + */ + public Builder clearRerankFacet() { + bitField0_ = (bitField0_ & ~0x00000001); + rerankFacet_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList facetValues_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureFacetValuesIsMutable() { + if (!facetValues_.isModifiable()) { + facetValues_ = new com.google.protobuf.LazyStringArrayList(facetValues_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @return A list containing the facetValues. + */ + public com.google.protobuf.ProtocolStringList getFacetValuesList() { + facetValues_.makeImmutable(); + return facetValues_; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @return The count of facetValues. + */ + public int getFacetValuesCount() { + return facetValues_.size(); + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the element to return. + * @return The facetValues at the given index. + */ + public java.lang.String getFacetValues(int index) { + return facetValues_.get(index); + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param index The index of the value to return. + * @return The bytes of the facetValues at the given index. + */ + public com.google.protobuf.ByteString getFacetValuesBytes(int index) { + return facetValues_.getByteString(index); + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param index The index to set the value at. + * @param value The facetValues to set. + * @return This builder for chaining. + */ + public Builder setFacetValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetValuesIsMutable(); + facetValues_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param value The facetValues to add. + * @return This builder for chaining. + */ + public Builder addFacetValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetValuesIsMutable(); + facetValues_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param values The facetValues to add. + * @return This builder for chaining. + */ + public Builder addAllFacetValues(java.lang.Iterable values) { + ensureFacetValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, facetValues_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @return This builder for chaining. + */ + public Builder clearFacetValues() { + facetValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * If empty, rerank on all facet values for the current key. Otherwise,
+         * will rerank on the facet values from this list only.
+         * 
+ * + * repeated string facet_values = 2; + * + * @param value The bytes of the facetValues to add. + * @return This builder for chaining. + */ + public Builder addFacetValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFacetValuesIsMutable(); + facetValues_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig) + private static final com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig(); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RerankConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int FACET_INTERVALS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List facetIntervals_; + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + @java.lang.Override + public java.util.List getFacetIntervalsList() { + return facetIntervals_; + } + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + @java.lang.Override + public java.util.List + getFacetIntervalsOrBuilderList() { + return facetIntervals_; + } + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + @java.lang.Override + public int getFacetIntervalsCount() { + return facetIntervals_.size(); + } + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Interval getFacetIntervals(int index) { + return facetIntervals_.get(index); + } + /** + * + * + *
+     * If you don't set the facet
+     * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+     * in the request to a numerical attribute, then we use the computed
+     * intervals with rounded bounds obtained from all its product numerical
+     * attribute values. The computed intervals might not be ideal for some
+     * attributes. Therefore, we give you the option to overwrite them with the
+     * facet_intervals field. The maximum of facet intervals per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+     * Each interval must have a lower bound or an upper bound. If both bounds
+     * are provided, then the lower bound must be smaller or equal than the
+     * upper bound.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.IntervalOrBuilder getFacetIntervalsOrBuilder(int index) { + return facetIntervals_.get(index); + } + + public static final int IGNORED_FACET_VALUES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues> + ignoredFacetValues_; + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues> + getIgnoredFacetValuesList() { + return ignoredFacetValues_; + } + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .IgnoredFacetValuesOrBuilder> + getIgnoredFacetValuesOrBuilderList() { + return ignoredFacetValues_; + } + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + @java.lang.Override + public int getIgnoredFacetValuesCount() { + return ignoredFacetValues_.size(); + } + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + getIgnoredFacetValues(int index) { + return ignoredFacetValues_.get(index); + } + /** + * + * + *
+     * Each instance represents a list of attribute values to ignore as facet
+     * values for a specific time range. The maximum number of instances per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder + getIgnoredFacetValuesOrBuilder(int index) { + return ignoredFacetValues_.get(index); + } + + public static final int MERGED_FACET_VALUES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue> + mergedFacetValues_; + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue> + getMergedFacetValuesList() { + return mergedFacetValues_; + } + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .MergedFacetValueOrBuilder> + getMergedFacetValuesOrBuilderList() { + return mergedFacetValues_; + } + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + @java.lang.Override + public int getMergedFacetValuesCount() { + return mergedFacetValues_.size(); + } + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + getMergedFacetValues(int index) { + return mergedFacetValues_.get(index); + } + /** + * + * + *
+     * Each instance replaces a list of facet values by a merged facet
+     * value. If a facet value is not in any list, then it will stay the same.
+     * To avoid conflicts, only paths of length 1 are accepted. In other words,
+     * if "dark_blue" merged into "BLUE", then the latter can't merge into
+     * "blues" because this would create a path of length 2. The maximum number
+     * of instances of MergedFacetValue per
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+     * This feature is available only for textual custom attributes.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder + getMergedFacetValuesOrBuilder(int index) { + return mergedFacetValues_.get(index); + } + + public static final int MERGED_FACET_FIELD_NUMBER = 4; + private com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet mergedFacet_; + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return Whether the mergedFacet field is set. + */ + @java.lang.Override + public boolean hasMergedFacet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return The mergedFacet. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + getMergedFacet() { + return mergedFacet_ == null + ? com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance() + : mergedFacet_; + } + /** + * + * + *
+     * Use this field only if you want to merge a facet key into another facet
+     * key.
+     * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetOrBuilder + getMergedFacetOrBuilder() { + return mergedFacet_ == null + ? com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance() + : mergedFacet_; + } + + public static final int RERANK_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerankConfig_; + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return Whether the rerankConfig field is set. + */ + @java.lang.Override + public boolean hasRerankConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return The rerankConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + getRerankConfig() { + return rerankConfig_ == null + ? com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance() + : rerankConfig_; + } + /** + * + * + *
+     * Set this field only if you want to rerank based on facet values engaged
+     * by the user for the current key. This option is only possible for custom
+     * facetable textual keys.
+     * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfigOrBuilder + getRerankConfigOrBuilder() { + return rerankConfig_ == null + ? com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance() + : rerankConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 < facetIntervals_.size(); i++) { + output.writeMessage(1, facetIntervals_.get(i)); + } + for (int i = 0; i < ignoredFacetValues_.size(); i++) { + output.writeMessage(2, ignoredFacetValues_.get(i)); + } + for (int i = 0; i < mergedFacetValues_.size(); i++) { + output.writeMessage(3, mergedFacetValues_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getMergedFacet()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getRerankConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < facetIntervals_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, facetIntervals_.get(i)); + } + for (int i = 0; i < ignoredFacetValues_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, ignoredFacetValues_.get(i)); + } + for (int i = 0; i < mergedFacetValues_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, mergedFacetValues_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getMergedFacet()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRerankConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2beta.CatalogAttribute.FacetConfig)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig other = + (com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig) obj; + + if (!getFacetIntervalsList().equals(other.getFacetIntervalsList())) return false; + if (!getIgnoredFacetValuesList().equals(other.getIgnoredFacetValuesList())) return false; + if (!getMergedFacetValuesList().equals(other.getMergedFacetValuesList())) return false; + if (hasMergedFacet() != other.hasMergedFacet()) return false; + if (hasMergedFacet()) { + if (!getMergedFacet().equals(other.getMergedFacet())) return false; + } + if (hasRerankConfig() != other.hasRerankConfig()) return false; + if (hasRerankConfig()) { + if (!getRerankConfig().equals(other.getRerankConfig())) 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 (getFacetIntervalsCount() > 0) { + hash = (37 * hash) + FACET_INTERVALS_FIELD_NUMBER; + hash = (53 * hash) + getFacetIntervalsList().hashCode(); + } + if (getIgnoredFacetValuesCount() > 0) { + hash = (37 * hash) + IGNORED_FACET_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getIgnoredFacetValuesList().hashCode(); + } + if (getMergedFacetValuesCount() > 0) { + hash = (37 * hash) + MERGED_FACET_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getMergedFacetValuesList().hashCode(); + } + if (hasMergedFacet()) { + hash = (37 * hash) + MERGED_FACET_FIELD_NUMBER; + hash = (53 * hash) + getMergedFacet().hashCode(); + } + if (hasRerankConfig()) { + hash = (37 * hash) + RERANK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getRerankConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2beta.CatalogAttribute.FacetConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Possible options for the facet that corresponds to the current attribute
+     * config.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.CatalogAttribute.FacetConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig) + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.class, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFacetIntervalsFieldBuilder(); + getIgnoredFacetValuesFieldBuilder(); + getMergedFacetValuesFieldBuilder(); + getMergedFacetFieldBuilder(); + getRerankConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (facetIntervalsBuilder_ == null) { + facetIntervals_ = java.util.Collections.emptyList(); + } else { + facetIntervals_ = null; + facetIntervalsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (ignoredFacetValuesBuilder_ == null) { + ignoredFacetValues_ = java.util.Collections.emptyList(); + } else { + ignoredFacetValues_ = null; + ignoredFacetValuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (mergedFacetValuesBuilder_ == null) { + mergedFacetValues_ = java.util.Collections.emptyList(); + } else { + mergedFacetValues_ = null; + mergedFacetValuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + mergedFacet_ = null; + if (mergedFacetBuilder_ != null) { + mergedFacetBuilder_.dispose(); + mergedFacetBuilder_ = null; + } + rerankConfig_ = null; + if (rerankConfigBuilder_ != null) { + rerankConfigBuilder_.dispose(); + rerankConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.CatalogProto + .internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig build() { + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig buildPartial() { + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig result = + new com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig result) { + if (facetIntervalsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + facetIntervals_ = java.util.Collections.unmodifiableList(facetIntervals_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.facetIntervals_ = facetIntervals_; + } else { + result.facetIntervals_ = facetIntervalsBuilder_.build(); + } + if (ignoredFacetValuesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + ignoredFacetValues_ = java.util.Collections.unmodifiableList(ignoredFacetValues_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.ignoredFacetValues_ = ignoredFacetValues_; + } else { + result.ignoredFacetValues_ = ignoredFacetValuesBuilder_.build(); + } + if (mergedFacetValuesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + mergedFacetValues_ = java.util.Collections.unmodifiableList(mergedFacetValues_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.mergedFacetValues_ = mergedFacetValues_; + } else { + result.mergedFacetValues_ = mergedFacetValuesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.mergedFacet_ = + mergedFacetBuilder_ == null ? mergedFacet_ : mergedFacetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.rerankConfig_ = + rerankConfigBuilder_ == null ? rerankConfig_ : rerankConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig) { + return mergeFrom((com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig other) { + if (other + == com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.getDefaultInstance()) + return this; + if (facetIntervalsBuilder_ == null) { + if (!other.facetIntervals_.isEmpty()) { + if (facetIntervals_.isEmpty()) { + facetIntervals_ = other.facetIntervals_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFacetIntervalsIsMutable(); + facetIntervals_.addAll(other.facetIntervals_); + } + onChanged(); + } + } else { + if (!other.facetIntervals_.isEmpty()) { + if (facetIntervalsBuilder_.isEmpty()) { + facetIntervalsBuilder_.dispose(); + facetIntervalsBuilder_ = null; + facetIntervals_ = other.facetIntervals_; + bitField0_ = (bitField0_ & ~0x00000001); + facetIntervalsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFacetIntervalsFieldBuilder() + : null; + } else { + facetIntervalsBuilder_.addAllMessages(other.facetIntervals_); + } + } + } + if (ignoredFacetValuesBuilder_ == null) { + if (!other.ignoredFacetValues_.isEmpty()) { + if (ignoredFacetValues_.isEmpty()) { + ignoredFacetValues_ = other.ignoredFacetValues_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.addAll(other.ignoredFacetValues_); + } + onChanged(); + } + } else { + if (!other.ignoredFacetValues_.isEmpty()) { + if (ignoredFacetValuesBuilder_.isEmpty()) { + ignoredFacetValuesBuilder_.dispose(); + ignoredFacetValuesBuilder_ = null; + ignoredFacetValues_ = other.ignoredFacetValues_; + bitField0_ = (bitField0_ & ~0x00000002); + ignoredFacetValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIgnoredFacetValuesFieldBuilder() + : null; + } else { + ignoredFacetValuesBuilder_.addAllMessages(other.ignoredFacetValues_); + } + } + } + if (mergedFacetValuesBuilder_ == null) { + if (!other.mergedFacetValues_.isEmpty()) { + if (mergedFacetValues_.isEmpty()) { + mergedFacetValues_ = other.mergedFacetValues_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.addAll(other.mergedFacetValues_); + } + onChanged(); + } + } else { + if (!other.mergedFacetValues_.isEmpty()) { + if (mergedFacetValuesBuilder_.isEmpty()) { + mergedFacetValuesBuilder_.dispose(); + mergedFacetValuesBuilder_ = null; + mergedFacetValues_ = other.mergedFacetValues_; + bitField0_ = (bitField0_ & ~0x00000004); + mergedFacetValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMergedFacetValuesFieldBuilder() + : null; + } else { + mergedFacetValuesBuilder_.addAllMessages(other.mergedFacetValues_); + } + } + } + if (other.hasMergedFacet()) { + mergeMergedFacet(other.getMergedFacet()); + } + if (other.hasRerankConfig()) { + mergeRerankConfig(other.getRerankConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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.retail.v2beta.Interval m = + input.readMessage( + com.google.cloud.retail.v2beta.Interval.parser(), extensionRegistry); + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + facetIntervals_.add(m); + } else { + facetIntervalsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues m = + input.readMessage( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .IgnoredFacetValues.parser(), + extensionRegistry); + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.add(m); + } else { + ignoredFacetValuesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue m = + input.readMessage( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .MergedFacetValue.parser(), + extensionRegistry); + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.add(m); + } else { + mergedFacetValuesBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + input.readMessage(getMergedFacetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getRerankConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List facetIntervals_ = + java.util.Collections.emptyList(); + + private void ensureFacetIntervalsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + facetIntervals_ = + new java.util.ArrayList(facetIntervals_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.Interval, + com.google.cloud.retail.v2beta.Interval.Builder, + com.google.cloud.retail.v2beta.IntervalOrBuilder> + facetIntervalsBuilder_; + + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public java.util.List getFacetIntervalsList() { + if (facetIntervalsBuilder_ == null) { + return java.util.Collections.unmodifiableList(facetIntervals_); + } else { + return facetIntervalsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public int getFacetIntervalsCount() { + if (facetIntervalsBuilder_ == null) { + return facetIntervals_.size(); + } else { + return facetIntervalsBuilder_.getCount(); + } + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public com.google.cloud.retail.v2beta.Interval getFacetIntervals(int index) { + if (facetIntervalsBuilder_ == null) { + return facetIntervals_.get(index); + } else { + return facetIntervalsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public Builder setFacetIntervals(int index, com.google.cloud.retail.v2beta.Interval value) { + if (facetIntervalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetIntervalsIsMutable(); + facetIntervals_.set(index, value); + onChanged(); + } else { + facetIntervalsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public Builder setFacetIntervals( + int index, com.google.cloud.retail.v2beta.Interval.Builder builderForValue) { + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + facetIntervals_.set(index, builderForValue.build()); + onChanged(); + } else { + facetIntervalsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public Builder addFacetIntervals(com.google.cloud.retail.v2beta.Interval value) { + if (facetIntervalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetIntervalsIsMutable(); + facetIntervals_.add(value); + onChanged(); + } else { + facetIntervalsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public Builder addFacetIntervals(int index, com.google.cloud.retail.v2beta.Interval value) { + if (facetIntervalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetIntervalsIsMutable(); + facetIntervals_.add(index, value); + onChanged(); + } else { + facetIntervalsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public Builder addFacetIntervals( + com.google.cloud.retail.v2beta.Interval.Builder builderForValue) { + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + facetIntervals_.add(builderForValue.build()); + onChanged(); + } else { + facetIntervalsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public Builder addFacetIntervals( + int index, com.google.cloud.retail.v2beta.Interval.Builder builderForValue) { + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + facetIntervals_.add(index, builderForValue.build()); + onChanged(); + } else { + facetIntervalsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public Builder addAllFacetIntervals( + java.lang.Iterable values) { + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, facetIntervals_); + onChanged(); + } else { + facetIntervalsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public Builder clearFacetIntervals() { + if (facetIntervalsBuilder_ == null) { + facetIntervals_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + facetIntervalsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public Builder removeFacetIntervals(int index) { + if (facetIntervalsBuilder_ == null) { + ensureFacetIntervalsIsMutable(); + facetIntervals_.remove(index); + onChanged(); + } else { + facetIntervalsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public com.google.cloud.retail.v2beta.Interval.Builder getFacetIntervalsBuilder(int index) { + return getFacetIntervalsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public com.google.cloud.retail.v2beta.IntervalOrBuilder getFacetIntervalsOrBuilder( + int index) { + if (facetIntervalsBuilder_ == null) { + return facetIntervals_.get(index); + } else { + return facetIntervalsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public java.util.List + getFacetIntervalsOrBuilderList() { + if (facetIntervalsBuilder_ != null) { + return facetIntervalsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(facetIntervals_); + } + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public com.google.cloud.retail.v2beta.Interval.Builder addFacetIntervalsBuilder() { + return getFacetIntervalsFieldBuilder() + .addBuilder(com.google.cloud.retail.v2beta.Interval.getDefaultInstance()); + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public com.google.cloud.retail.v2beta.Interval.Builder addFacetIntervalsBuilder(int index) { + return getFacetIntervalsFieldBuilder() + .addBuilder(index, com.google.cloud.retail.v2beta.Interval.getDefaultInstance()); + } + /** + * + * + *
+       * If you don't set the facet
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
+       * in the request to a numerical attribute, then we use the computed
+       * intervals with rounded bounds obtained from all its product numerical
+       * attribute values. The computed intervals might not be ideal for some
+       * attributes. Therefore, we give you the option to overwrite them with the
+       * facet_intervals field. The maximum of facet intervals per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
+       * Each interval must have a lower bound or an upper bound. If both bounds
+       * are provided, then the lower bound must be smaller or equal than the
+       * upper bound.
+       * 
+ * + * repeated .google.cloud.retail.v2beta.Interval facet_intervals = 1; + */ + public java.util.List + getFacetIntervalsBuilderList() { + return getFacetIntervalsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.Interval, + com.google.cloud.retail.v2beta.Interval.Builder, + com.google.cloud.retail.v2beta.IntervalOrBuilder> + getFacetIntervalsFieldBuilder() { + if (facetIntervalsBuilder_ == null) { + facetIntervalsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.Interval, + com.google.cloud.retail.v2beta.Interval.Builder, + com.google.cloud.retail.v2beta.IntervalOrBuilder>( + facetIntervals_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + facetIntervals_ = null; + } + return facetIntervalsBuilder_; + } + + private java.util.List< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues> + ignoredFacetValues_ = java.util.Collections.emptyList(); + + private void ensureIgnoredFacetValuesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + ignoredFacetValues_ = + new java.util.ArrayList< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues>( + ignoredFacetValues_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + .Builder, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .IgnoredFacetValuesOrBuilder> + ignoredFacetValuesBuilder_; + + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public java.util.List< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues> + getIgnoredFacetValuesList() { + if (ignoredFacetValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(ignoredFacetValues_); + } else { + return ignoredFacetValuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public int getIgnoredFacetValuesCount() { + if (ignoredFacetValuesBuilder_ == null) { + return ignoredFacetValues_.size(); + } else { + return ignoredFacetValuesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + getIgnoredFacetValues(int index) { + if (ignoredFacetValuesBuilder_ == null) { + return ignoredFacetValues_.get(index); + } else { + return ignoredFacetValuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder setIgnoredFacetValues( + int index, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues value) { + if (ignoredFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.set(index, value); + onChanged(); + } else { + ignoredFacetValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder setIgnoredFacetValues( + int index, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + builderForValue) { + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.set(index, builderForValue.build()); + onChanged(); + } else { + ignoredFacetValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder addIgnoredFacetValues( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues value) { + if (ignoredFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.add(value); + onChanged(); + } else { + ignoredFacetValuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder addIgnoredFacetValues( + int index, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues value) { + if (ignoredFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.add(index, value); + onChanged(); + } else { + ignoredFacetValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder addIgnoredFacetValues( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + builderForValue) { + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.add(builderForValue.build()); + onChanged(); + } else { + ignoredFacetValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder addIgnoredFacetValues( + int index, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + builderForValue) { + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.add(index, builderForValue.build()); + onChanged(); + } else { + ignoredFacetValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder addAllIgnoredFacetValues( + java.lang.Iterable< + ? extends + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .IgnoredFacetValues> + values) { + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ignoredFacetValues_); + onChanged(); + } else { + ignoredFacetValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder clearIgnoredFacetValues() { + if (ignoredFacetValuesBuilder_ == null) { + ignoredFacetValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + ignoredFacetValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public Builder removeIgnoredFacetValues(int index) { + if (ignoredFacetValuesBuilder_ == null) { + ensureIgnoredFacetValuesIsMutable(); + ignoredFacetValues_.remove(index); + onChanged(); + } else { + ignoredFacetValuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + getIgnoredFacetValuesBuilder(int index) { + return getIgnoredFacetValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder + getIgnoredFacetValuesOrBuilder(int index) { + if (ignoredFacetValuesBuilder_ == null) { + return ignoredFacetValues_.get(index); + } else { + return ignoredFacetValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .IgnoredFacetValuesOrBuilder> + getIgnoredFacetValuesOrBuilderList() { + if (ignoredFacetValuesBuilder_ != null) { + return ignoredFacetValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ignoredFacetValues_); + } + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + addIgnoredFacetValuesBuilder() { + return getIgnoredFacetValuesFieldBuilder() + .addBuilder( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues.Builder + addIgnoredFacetValuesBuilder(int index) { + return getIgnoredFacetValuesFieldBuilder() + .addBuilder( + index, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance represents a list of attribute values to ignore as facet
+       * values for a specific time range. The maximum number of instances per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2; + * + */ + public java.util.List< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + .Builder> + getIgnoredFacetValuesBuilderList() { + return getIgnoredFacetValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + .Builder, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .IgnoredFacetValuesOrBuilder> + getIgnoredFacetValuesFieldBuilder() { + if (ignoredFacetValuesBuilder_ == null) { + ignoredFacetValuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IgnoredFacetValues + .Builder, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .IgnoredFacetValuesOrBuilder>( + ignoredFacetValues_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + ignoredFacetValues_ = null; + } + return ignoredFacetValuesBuilder_; + } + + private java.util.List< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue> + mergedFacetValues_ = java.util.Collections.emptyList(); + + private void ensureMergedFacetValuesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + mergedFacetValues_ = + new java.util.ArrayList< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue>( + mergedFacetValues_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.Builder, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder> + mergedFacetValuesBuilder_; + + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public java.util.List< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue> + getMergedFacetValuesList() { + if (mergedFacetValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(mergedFacetValues_); + } else { + return mergedFacetValuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public int getMergedFacetValuesCount() { + if (mergedFacetValuesBuilder_ == null) { + return mergedFacetValues_.size(); + } else { + return mergedFacetValuesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + getMergedFacetValues(int index) { + if (mergedFacetValuesBuilder_ == null) { + return mergedFacetValues_.get(index); + } else { + return mergedFacetValuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder setMergedFacetValues( + int index, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue value) { + if (mergedFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.set(index, value); + onChanged(); + } else { + mergedFacetValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder setMergedFacetValues( + int index, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + builderForValue) { + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.set(index, builderForValue.build()); + onChanged(); + } else { + mergedFacetValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder addMergedFacetValues( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue value) { + if (mergedFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.add(value); + onChanged(); + } else { + mergedFacetValuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder addMergedFacetValues( + int index, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue value) { + if (mergedFacetValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.add(index, value); + onChanged(); + } else { + mergedFacetValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder addMergedFacetValues( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + builderForValue) { + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.add(builderForValue.build()); + onChanged(); + } else { + mergedFacetValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder addMergedFacetValues( + int index, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + builderForValue) { + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.add(index, builderForValue.build()); + onChanged(); + } else { + mergedFacetValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder addAllMergedFacetValues( + java.lang.Iterable< + ? extends + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue> + values) { + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mergedFacetValues_); + onChanged(); + } else { + mergedFacetValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder clearMergedFacetValues() { + if (mergedFacetValuesBuilder_ == null) { + mergedFacetValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + mergedFacetValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public Builder removeMergedFacetValues(int index) { + if (mergedFacetValuesBuilder_ == null) { + ensureMergedFacetValuesIsMutable(); + mergedFacetValues_.remove(index); + onChanged(); + } else { + mergedFacetValuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + getMergedFacetValuesBuilder(int index) { + return getMergedFacetValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder + getMergedFacetValuesOrBuilder(int index) { + if (mergedFacetValuesBuilder_ == null) { + return mergedFacetValues_.get(index); + } else { + return mergedFacetValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .MergedFacetValueOrBuilder> + getMergedFacetValuesOrBuilderList() { + if (mergedFacetValuesBuilder_ != null) { + return mergedFacetValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(mergedFacetValues_); + } + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + addMergedFacetValuesBuilder() { + return getMergedFacetValuesFieldBuilder() + .addBuilder( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.Builder + addMergedFacetValuesBuilder(int index) { + return getMergedFacetValuesFieldBuilder() + .addBuilder( + index, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance replaces a list of facet values by a merged facet
+       * value. If a facet value is not in any list, then it will stay the same.
+       * To avoid conflicts, only paths of length 1 are accepted. In other words,
+       * if "dark_blue" merged into "BLUE", then the latter can't merge into
+       * "blues" because this would create a path of length 2. The maximum number
+       * of instances of MergedFacetValue per
+       * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
+       * This feature is available only for textual custom attributes.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3; + * + */ + public java.util.List< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.Builder> + getMergedFacetValuesBuilderList() { + return getMergedFacetValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.Builder, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder> + getMergedFacetValuesFieldBuilder() { + if (mergedFacetValuesBuilder_ == null) { + mergedFacetValuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue + .Builder, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .MergedFacetValueOrBuilder>( + mergedFacetValues_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + mergedFacetValues_ = null; + } + return mergedFacetValuesBuilder_; + } + + private com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet mergedFacet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet.Builder, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetOrBuilder> + mergedFacetBuilder_; + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return Whether the mergedFacet field is set. + */ + public boolean hasMergedFacet() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + * + * @return The mergedFacet. + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + getMergedFacet() { + if (mergedFacetBuilder_ == null) { + return mergedFacet_ == null + ? com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance() + : mergedFacet_; + } else { + return mergedFacetBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public Builder setMergedFacet( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet value) { + if (mergedFacetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mergedFacet_ = value; + } else { + mergedFacetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public Builder setMergedFacet( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet.Builder + builderForValue) { + if (mergedFacetBuilder_ == null) { + mergedFacet_ = builderForValue.build(); + } else { + mergedFacetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public Builder mergeMergedFacet( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet value) { + if (mergedFacetBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && mergedFacet_ != null + && mergedFacet_ + != com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance()) { + getMergedFacetBuilder().mergeFrom(value); + } else { + mergedFacet_ = value; + } + } else { + mergedFacetBuilder_.mergeFrom(value); + } + if (mergedFacet_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public Builder clearMergedFacet() { + bitField0_ = (bitField0_ & ~0x00000008); + mergedFacet_ = null; + if (mergedFacetBuilder_ != null) { + mergedFacetBuilder_.dispose(); + mergedFacetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet.Builder + getMergedFacetBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getMergedFacetFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetOrBuilder + getMergedFacetOrBuilder() { + if (mergedFacetBuilder_ != null) { + return mergedFacetBuilder_.getMessageOrBuilder(); + } else { + return mergedFacet_ == null + ? com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet + .getDefaultInstance() + : mergedFacet_; + } + } + /** + * + * + *
+       * Use this field only if you want to merge a facet key into another facet
+       * key.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet.Builder, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetOrBuilder> + getMergedFacetFieldBuilder() { + if (mergedFacetBuilder_ == null) { + mergedFacetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet.Builder, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetOrBuilder>( + getMergedFacet(), getParentForChildren(), isClean()); + mergedFacet_ = null; + } + return mergedFacetBuilder_; + } + + private com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + rerankConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig.Builder, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfigOrBuilder> + rerankConfigBuilder_; + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return Whether the rerankConfig field is set. + */ + public boolean hasRerankConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + * + * @return The rerankConfig. + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + getRerankConfig() { + if (rerankConfigBuilder_ == null) { + return rerankConfig_ == null + ? com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance() + : rerankConfig_; + } else { + return rerankConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public Builder setRerankConfig( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig value) { + if (rerankConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rerankConfig_ = value; + } else { + rerankConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public Builder setRerankConfig( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig.Builder + builderForValue) { + if (rerankConfigBuilder_ == null) { + rerankConfig_ = builderForValue.build(); + } else { + rerankConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public Builder mergeRerankConfig( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig value) { + if (rerankConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && rerankConfig_ != null + && rerankConfig_ + != com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance()) { + getRerankConfigBuilder().mergeFrom(value); + } else { + rerankConfig_ = value; + } + } else { + rerankConfigBuilder_.mergeFrom(value); + } + if (rerankConfig_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public Builder clearRerankConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + rerankConfig_ = null; + if (rerankConfigBuilder_ != null) { + rerankConfigBuilder_.dispose(); + rerankConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig.Builder + getRerankConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getRerankConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfigOrBuilder + getRerankConfigOrBuilder() { + if (rerankConfigBuilder_ != null) { + return rerankConfigBuilder_.getMessageOrBuilder(); + } else { + return rerankConfig_ == null + ? com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig + .getDefaultInstance() + : rerankConfig_; + } + } + /** + * + * + *
+       * Set this field only if you want to rerank based on facet values engaged
+       * by the user for the current key. This option is only possible for custom
+       * facetable textual keys.
+       * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig.Builder, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfigOrBuilder> + getRerankConfigFieldBuilder() { + if (rerankConfigBuilder_ == null) { + rerankConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.RerankConfig.Builder, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .RerankConfigOrBuilder>(getRerankConfig(), getParentForChildren(), isClean()); + rerankConfig_ = null; + } + return rerankConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.CatalogAttribute.FacetConfig) + private static final com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig(); + } + + public static com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FacetConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2beta.CatalogAttribute.FacetConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; public static final int KEY_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -1198,7 +9084,9 @@ public com.google.cloud.retail.v2beta.CatalogAttribute.AttributeType getType() { * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5; @@ -1219,7 +9107,9 @@ public int getIndexableOptionValue() { * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5; @@ -1305,7 +9195,9 @@ public int getDynamicFacetableOptionValue() { * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; @@ -1332,7 +9224,9 @@ public int getSearchableOptionValue() { * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; @@ -1498,6 +9392,57 @@ public com.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption getRetr : result; } + public static final int FACET_CONFIG_FIELD_NUMBER = 13; + private com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facetConfig_; + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return Whether the facetConfig field is set. + */ + @java.lang.Override + public boolean hasFacetConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return The facetConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig getFacetConfig() { + return facetConfig_ == null + ? com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.getDefaultInstance() + : facetConfig_; + } + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facet_config = 13; + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfigOrBuilder + getFacetConfigOrBuilder() { + return facetConfig_ == null + ? com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.getDefaultInstance() + : facetConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1558,6 +9503,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(12, retrievableOption_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(13, getFacetConfig()); + } getUnknownFields().writeTo(output); } @@ -1614,6 +9562,9 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, retrievableOption_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getFacetConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1639,6 +9590,10 @@ public boolean equals(final java.lang.Object obj) { if (recommendationsFilteringOption_ != other.recommendationsFilteringOption_) return false; if (exactSearchableOption_ != other.exactSearchableOption_) return false; if (retrievableOption_ != other.retrievableOption_) return false; + if (hasFacetConfig() != other.hasFacetConfig()) return false; + if (hasFacetConfig()) { + if (!getFacetConfig().equals(other.getFacetConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1668,6 +9623,10 @@ public int hashCode() { hash = (53 * hash) + exactSearchableOption_; hash = (37 * hash) + RETRIEVABLE_OPTION_FIELD_NUMBER; hash = (53 * hash) + retrievableOption_; + if (hasFacetConfig()) { + hash = (37 * hash) + FACET_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getFacetConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1798,10 +9757,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.CatalogAttribute.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFacetConfigFieldBuilder(); + } } @java.lang.Override @@ -1817,6 +9785,11 @@ public Builder clear() { recommendationsFilteringOption_ = 0; exactSearchableOption_ = 0; retrievableOption_ = 0; + facetConfig_ = null; + if (facetConfigBuilder_ != null) { + facetConfigBuilder_.dispose(); + facetConfigBuilder_ = null; + } return this; } @@ -1880,6 +9853,13 @@ private void buildPartial0(com.google.cloud.retail.v2beta.CatalogAttribute resul if (((from_bitField0_ & 0x00000100) != 0)) { result.retrievableOption_ = retrievableOption_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000200) != 0)) { + result.facetConfig_ = + facetConfigBuilder_ == null ? facetConfig_ : facetConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1957,6 +9937,9 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.CatalogAttribute other) if (other.retrievableOption_ != 0) { setRetrievableOptionValue(other.getRetrievableOptionValue()); } + if (other.hasFacetConfig()) { + mergeFacetConfig(other.getFacetConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2037,6 +10020,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000100; break; } // case 96 + case 106: + { + input.readMessage(getFacetConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2449,7 +10438,9 @@ public Builder clearType() { * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5; @@ -2471,7 +10462,9 @@ public int getIndexableOptionValue() { * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5; @@ -2496,7 +10489,9 @@ public Builder setIndexableOptionValue(int value) { * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5; @@ -2523,7 +10518,9 @@ public com.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption getIndexa * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5; @@ -2552,7 +10549,9 @@ public Builder setIndexableOption( * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5; @@ -2713,7 +10712,9 @@ public Builder clearDynamicFacetableOption() { * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; @@ -2740,7 +10741,9 @@ public int getSearchableOptionValue() { * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; @@ -2770,7 +10773,9 @@ public Builder setSearchableOptionValue(int value) { * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; @@ -2802,7 +10807,9 @@ public com.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption getSearc * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; @@ -2836,7 +10843,9 @@ public Builder setSearchableOption( * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; @@ -3216,6 +11225,198 @@ public Builder clearRetrievableOption() { return this; } + private com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facetConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.Builder, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfigOrBuilder> + facetConfigBuilder_; + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return Whether the facetConfig field is set. + */ + public boolean hasFacetConfig() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return The facetConfig. + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig getFacetConfig() { + if (facetConfigBuilder_ == null) { + return facetConfig_ == null + ? com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.getDefaultInstance() + : facetConfig_; + } else { + return facetConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facet_config = 13; + */ + public Builder setFacetConfig( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig value) { + if (facetConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + facetConfig_ = value; + } else { + facetConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facet_config = 13; + */ + public Builder setFacetConfig( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.Builder builderForValue) { + if (facetConfigBuilder_ == null) { + facetConfig_ = builderForValue.build(); + } else { + facetConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facet_config = 13; + */ + public Builder mergeFacetConfig( + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig value) { + if (facetConfigBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && facetConfig_ != null + && facetConfig_ + != com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig + .getDefaultInstance()) { + getFacetConfigBuilder().mergeFrom(value); + } else { + facetConfig_ = value; + } + } else { + facetConfigBuilder_.mergeFrom(value); + } + if (facetConfig_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facet_config = 13; + */ + public Builder clearFacetConfig() { + bitField0_ = (bitField0_ & ~0x00000200); + facetConfig_ = null; + if (facetConfigBuilder_ != null) { + facetConfigBuilder_.dispose(); + facetConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facet_config = 13; + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.Builder + getFacetConfigBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getFacetConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facet_config = 13; + */ + public com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfigOrBuilder + getFacetConfigOrBuilder() { + if (facetConfigBuilder_ != null) { + return facetConfigBuilder_.getMessageOrBuilder(); + } else { + return facetConfig_ == null + ? com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.getDefaultInstance() + : facetConfig_; + } + } + /** + * + * + *
+     * Contains facet options.
+     * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facet_config = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.Builder, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfigOrBuilder> + getFacetConfigFieldBuilder() { + if (facetConfigBuilder_ == null) { + facetConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.Builder, + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfigOrBuilder>( + getFacetConfig(), getParentForChildren(), isClean()); + facetConfig_ = null; + } + return facetConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttributeOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttributeOrBuilder.java index a4af2e1d79db..880d61b82f1a 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttributeOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttributeOrBuilder.java @@ -145,7 +145,9 @@ public interface CatalogAttributeOrBuilder * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5; @@ -163,7 +165,9 @@ public interface CatalogAttributeOrBuilder * are indexed so that it can be filtered, faceted, or boosted in * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5; @@ -227,7 +231,9 @@ public interface CatalogAttributeOrBuilder * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; @@ -251,7 +257,9 @@ public interface CatalogAttributeOrBuilder * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as * there are no text values associated to numerical attributes. * - * Must be specified, otherwise throws INVALID_FORMAT error. + * Must be specified, when + * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. * * * .google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; @@ -367,4 +375,39 @@ public interface CatalogAttributeOrBuilder * @return The retrievableOption. */ com.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption getRetrievableOption(); + + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return Whether the facetConfig field is set. + */ + boolean hasFacetConfig(); + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facet_config = 13; + * + * @return The facetConfig. + */ + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfig getFacetConfig(); + /** + * + * + *
+   * Contains facet options.
+   * 
+ * + * .google.cloud.retail.v2beta.CatalogAttribute.FacetConfig facet_config = 13; + */ + com.google.cloud.retail.v2beta.CatalogAttribute.FacetConfigOrBuilder getFacetConfigOrBuilder(); } diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogOrBuilder.java index 3f946c279076..dab45ef4886e 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogOrBuilder.java @@ -134,9 +134,9 @@ public interface CatalogOrBuilder * *
    * The Merchant Center linking configuration.
-   * Once a link is added, the data stream from Merchant Center to Cloud Retail
+   * After a link is added, the data stream from Merchant Center to Cloud Retail
    * will be enabled automatically. The requester must have access to the
-   * merchant center account in order to make changes to this field.
+   * Merchant Center account in order to make changes to this field.
    * 
* * @@ -151,9 +151,9 @@ public interface CatalogOrBuilder * *
    * The Merchant Center linking configuration.
-   * Once a link is added, the data stream from Merchant Center to Cloud Retail
+   * After a link is added, the data stream from Merchant Center to Cloud Retail
    * will be enabled automatically. The requester must have access to the
-   * merchant center account in order to make changes to this field.
+   * Merchant Center account in order to make changes to this field.
    * 
* * @@ -168,9 +168,9 @@ public interface CatalogOrBuilder * *
    * The Merchant Center linking configuration.
-   * Once a link is added, the data stream from Merchant Center to Cloud Retail
+   * After a link is added, the data stream from Merchant Center to Cloud Retail
    * will be enabled automatically. The requester must have access to the
-   * merchant center account in order to make changes to this field.
+   * Merchant Center account in order to make changes to this field.
    * 
* * diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogProto.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogProto.java index 66a3def9e2f2..77600423e5fe 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogProto.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogProto.java @@ -36,6 +36,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2beta_CatalogAttribute_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2beta_CatalogAttribute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_IgnoredFacetValues_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacetValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacet_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_RerankConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_RerankConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_retail_v2beta_AttributesConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -78,95 +98,117 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pi/field_behavior.proto\032\031google/api/reso" + "urce.proto\032\'google/cloud/retail/v2beta/c" + "ommon.proto\032.google/cloud/retail/v2beta/" - + "import_config.proto\"^\n\022ProductLevelConfi" - + "g\022\036\n\026ingestion_product_type\030\001 \001(\t\022(\n mer" - + "chant_center_product_id_field\030\002 \001(\t\"\275\n\n\020" - + "CatalogAttribute\022\020\n\003key\030\001 \001(\tB\003\340A\002\022\023\n\006in" - + "_use\030\t \001(\010B\003\340A\003\022M\n\004type\030\n \001(\0162:.google.c" - + "loud.retail.v2beta.CatalogAttribute.Attr" - + "ibuteTypeB\003\340A\003\022V\n\020indexable_option\030\005 \001(\016" - + "2<.google.cloud.retail.v2beta.CatalogAtt" - + "ribute.IndexableOption\022e\n\030dynamic_faceta" - + "ble_option\030\006 \001(\0162C.google.cloud.retail.v" - + "2beta.CatalogAttribute.DynamicFacetableO" - + "ption\022X\n\021searchable_option\030\007 \001(\0162=.googl" - + "e.cloud.retail.v2beta.CatalogAttribute.S" - + "earchableOption\022d\n recommendations_filte" - + "ring_option\030\010 \001(\0162:.google.cloud.retail." - + "v2beta.RecommendationsFilteringOption\022c\n" - + "\027exact_searchable_option\030\013 \001(\0162B.google." - + "cloud.retail.v2beta.CatalogAttribute.Exa" - + "ctSearchableOption\022Z\n\022retrievable_option" - + "\030\014 \001(\0162>.google.cloud.retail.v2beta.Cata" - + "logAttribute.RetrievableOption\"8\n\rAttrib" - + "uteType\022\013\n\007UNKNOWN\020\000\022\013\n\007TEXTUAL\020\001\022\r\n\tNUM" - + "ERICAL\020\002\"b\n\017IndexableOption\022 \n\034INDEXABLE" - + "_OPTION_UNSPECIFIED\020\000\022\025\n\021INDEXABLE_ENABL" - + "ED\020\001\022\026\n\022INDEXABLE_DISABLED\020\002\"\201\001\n\026Dynamic" - + "FacetableOption\022(\n$DYNAMIC_FACETABLE_OPT" - + "ION_UNSPECIFIED\020\000\022\035\n\031DYNAMIC_FACETABLE_E" - + "NABLED\020\001\022\036\n\032DYNAMIC_FACETABLE_DISABLED\020\002" - + "\"f\n\020SearchableOption\022!\n\035SEARCHABLE_OPTIO" - + "N_UNSPECIFIED\020\000\022\026\n\022SEARCHABLE_ENABLED\020\001\022" - + "\027\n\023SEARCHABLE_DISABLED\020\002\"}\n\025ExactSearcha" - + "bleOption\022\'\n#EXACT_SEARCHABLE_OPTION_UNS" - + "PECIFIED\020\000\022\034\n\030EXACT_SEARCHABLE_ENABLED\020\001" - + "\022\035\n\031EXACT_SEARCHABLE_DISABLED\020\002\"j\n\021Retri" - + "evableOption\022\"\n\036RETRIEVABLE_OPTION_UNSPE" - + "CIFIED\020\000\022\027\n\023RETRIEVABLE_ENABLED\020\001\022\030\n\024RET" - + "RIEVABLE_DISABLED\020\002\"\302\003\n\020AttributesConfig" - + "\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022_\n\022catalog_attrib" - + "utes\030\002 \003(\0132C.google.cloud.retail.v2beta." - + "AttributesConfig.CatalogAttributesEntry\022" - + "U\n\026attribute_config_level\030\003 \001(\01620.google" - + ".cloud.retail.v2beta.AttributeConfigLeve" - + "lB\003\340A\003\032f\n\026CatalogAttributesEntry\022\013\n\003key\030" - + "\001 \001(\t\022;\n\005value\030\002 \001(\0132,.google.cloud.reta" - + "il.v2beta.CatalogAttribute:\0028\001:x\352Au\n&ret" - + "ail.googleapis.com/AttributesConfig\022Kpro" - + "jects/{project}/locations/{location}/cat" - + "alogs/{catalog}/attributesConfig\"\245\005\n\020Com" - + "pletionConfig\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022\026\n\016m" - + "atching_order\030\002 \001(\t\022\027\n\017max_suggestions\030\003" - + " \001(\005\022\031\n\021min_prefix_length\030\004 \001(\005\022\025\n\rauto_" - + "learning\030\013 \001(\010\022\\\n\030suggestions_input_conf" - + "ig\030\005 \001(\01325.google.cloud.retail.v2beta.Co" - + "mpletionDataInputConfigB\003\340A\003\022.\n!last_sug" - + "gestions_import_operation\030\006 \001(\tB\003\340A\003\022Y\n\025" - + "denylist_input_config\030\007 \001(\01325.google.clo" - + "ud.retail.v2beta.CompletionDataInputConf" - + "igB\003\340A\003\022+\n\036last_denylist_import_operatio" - + "n\030\010 \001(\tB\003\340A\003\022Z\n\026allowlist_input_config\030\t" - + " \001(\01325.google.cloud.retail.v2beta.Comple" - + "tionDataInputConfigB\003\340A\003\022,\n\037last_allowli" - + "st_import_operation\030\n \001(\tB\003\340A\003:x\352Au\n&ret" - + "ail.googleapis.com/CompletionConfig\022Kpro" - + "jects/{project}/locations/{location}/cat" - + "alogs/{catalog}/completionConfig\"\327\001\n\022Mer" - + "chantCenterLink\022\'\n\032merchant_center_accou" - + "nt_id\030\001 \001(\003B\003\340A\002\022\021\n\tbranch_id\030\002 \001(\t\022\024\n\014d" - + "estinations\030\003 \003(\t\022\023\n\013region_code\030\004 \001(\t\022\025" - + "\n\rlanguage_code\030\005 \001(\t\022C\n\005feeds\030\006 \003(\01324.g" - + "oogle.cloud.retail.v2beta.MerchantCenter" - + "FeedFilter\"N\n\030MerchantCenterFeedFilter\022\027" - + "\n\017primary_feed_id\030\001 \001(\003\022\031\n\021primary_feed_" - + "name\030\002 \001(\t\"\\\n\033MerchantCenterLinkingConfi" - + "g\022=\n\005links\030\001 \003(\0132..google.cloud.retail.v" - + "2beta.MerchantCenterLink\"\321\002\n\007Catalog\022\024\n\004" - + "name\030\001 \001(\tB\006\340A\002\340A\005\022\034\n\014display_name\030\002 \001(\t" - + "B\006\340A\002\340A\005\022Q\n\024product_level_config\030\004 \001(\0132." - + ".google.cloud.retail.v2beta.ProductLevel" - + "ConfigB\003\340A\002\022_\n\036merchant_center_linking_c" - + "onfig\030\006 \001(\01327.google.cloud.retail.v2beta" - + ".MerchantCenterLinkingConfig:^\352A[\n\035retai" - + "l.googleapis.com/Catalog\022:projects/{proj" - + "ect}/locations/{location}/catalogs/{cata" - + "log}B\313\001\n\036com.google.cloud.retail.v2betaB" - + "\014CatalogProtoP\001Z6cloud.google.com/go/ret" - + "ail/apiv2beta/retailpb;retailpb\242\002\006RETAIL" - + "\252\002\032Google.Cloud.Retail.V2Beta\312\002\032Google\\C" - + "loud\\Retail\\V2beta\352\002\035Google::Cloud::Reta" - + "il::V2betab\006proto3" + + "import_config.proto\032\037google/protobuf/tim" + + "estamp.proto\"^\n\022ProductLevelConfig\022\036\n\026in" + + "gestion_product_type\030\001 \001(\t\022(\n merchant_c" + + "enter_product_id_field\030\002 \001(\t\"\215\021\n\020Catalog" + + "Attribute\022\020\n\003key\030\001 \001(\tB\003\340A\002\022\023\n\006in_use\030\t " + + "\001(\010B\003\340A\003\022M\n\004type\030\n \001(\0162:.google.cloud.re" + + "tail.v2beta.CatalogAttribute.AttributeTy" + + "peB\003\340A\003\022V\n\020indexable_option\030\005 \001(\0162<.goog" + + "le.cloud.retail.v2beta.CatalogAttribute." + + "IndexableOption\022e\n\030dynamic_facetable_opt" + + "ion\030\006 \001(\0162C.google.cloud.retail.v2beta.C" + + "atalogAttribute.DynamicFacetableOption\022X" + + "\n\021searchable_option\030\007 \001(\0162=.google.cloud" + + ".retail.v2beta.CatalogAttribute.Searchab" + + "leOption\022d\n recommendations_filtering_op" + + "tion\030\010 \001(\0162:.google.cloud.retail.v2beta." + + "RecommendationsFilteringOption\022c\n\027exact_" + + "searchable_option\030\013 \001(\0162B.google.cloud.r" + + "etail.v2beta.CatalogAttribute.ExactSearc" + + "hableOption\022Z\n\022retrievable_option\030\014 \001(\0162" + + ">.google.cloud.retail.v2beta.CatalogAttr" + + "ibute.RetrievableOption\022N\n\014facet_config\030" + + "\r \001(\01328.google.cloud.retail.v2beta.Catal" + + "ogAttribute.FacetConfig\032\375\005\n\013FacetConfig\022" + + "=\n\017facet_intervals\030\001 \003(\0132$.google.cloud." + + "retail.v2beta.Interval\022i\n\024ignored_facet_" + + "values\030\002 \003(\0132K.google.cloud.retail.v2bet" + + "a.CatalogAttribute.FacetConfig.IgnoredFa" + + "cetValues\022f\n\023merged_facet_values\030\003 \003(\0132I" + + ".google.cloud.retail.v2beta.CatalogAttri" + + "bute.FacetConfig.MergedFacetValue\022Z\n\014mer" + + "ged_facet\030\004 \001(\0132D.google.cloud.retail.v2" + + "beta.CatalogAttribute.FacetConfig.Merged" + + "Facet\022\\\n\rrerank_config\030\005 \001(\0132E.google.cl" + + "oud.retail.v2beta.CatalogAttribute.Facet" + + "Config.RerankConfig\032\202\001\n\022IgnoredFacetValu" + + "es\022\016\n\006values\030\001 \003(\t\022.\n\nstart_time\030\002 \001(\0132\032" + + ".google.protobuf.Timestamp\022,\n\010end_time\030\003" + + " \001(\0132\032.google.protobuf.Timestamp\0328\n\020Merg" + + "edFacetValue\022\016\n\006values\030\001 \003(\t\022\024\n\014merged_v" + + "alue\030\002 \001(\t\032\'\n\013MergedFacet\022\030\n\020merged_face" + + "t_key\030\001 \001(\t\032:\n\014RerankConfig\022\024\n\014rerank_fa" + + "cet\030\001 \001(\010\022\024\n\014facet_values\030\002 \003(\t\"8\n\rAttri" + + "buteType\022\013\n\007UNKNOWN\020\000\022\013\n\007TEXTUAL\020\001\022\r\n\tNU" + + "MERICAL\020\002\"b\n\017IndexableOption\022 \n\034INDEXABL" + + "E_OPTION_UNSPECIFIED\020\000\022\025\n\021INDEXABLE_ENAB" + + "LED\020\001\022\026\n\022INDEXABLE_DISABLED\020\002\"\201\001\n\026Dynami" + + "cFacetableOption\022(\n$DYNAMIC_FACETABLE_OP" + + "TION_UNSPECIFIED\020\000\022\035\n\031DYNAMIC_FACETABLE_" + + "ENABLED\020\001\022\036\n\032DYNAMIC_FACETABLE_DISABLED\020" + + "\002\"f\n\020SearchableOption\022!\n\035SEARCHABLE_OPTI" + + "ON_UNSPECIFIED\020\000\022\026\n\022SEARCHABLE_ENABLED\020\001" + + "\022\027\n\023SEARCHABLE_DISABLED\020\002\"}\n\025ExactSearch" + + "ableOption\022\'\n#EXACT_SEARCHABLE_OPTION_UN" + + "SPECIFIED\020\000\022\034\n\030EXACT_SEARCHABLE_ENABLED\020" + + "\001\022\035\n\031EXACT_SEARCHABLE_DISABLED\020\002\"j\n\021Retr" + + "ievableOption\022\"\n\036RETRIEVABLE_OPTION_UNSP" + + "ECIFIED\020\000\022\027\n\023RETRIEVABLE_ENABLED\020\001\022\030\n\024RE" + + "TRIEVABLE_DISABLED\020\002\"\302\003\n\020AttributesConfi" + + "g\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022_\n\022catalog_attri" + + "butes\030\002 \003(\0132C.google.cloud.retail.v2beta" + + ".AttributesConfig.CatalogAttributesEntry" + + "\022U\n\026attribute_config_level\030\003 \001(\01620.googl" + + "e.cloud.retail.v2beta.AttributeConfigLev" + + "elB\003\340A\003\032f\n\026CatalogAttributesEntry\022\013\n\003key" + + "\030\001 \001(\t\022;\n\005value\030\002 \001(\0132,.google.cloud.ret" + + "ail.v2beta.CatalogAttribute:\0028\001:x\352Au\n&re" + + "tail.googleapis.com/AttributesConfig\022Kpr" + + "ojects/{project}/locations/{location}/ca" + + "talogs/{catalog}/attributesConfig\"\245\005\n\020Co" + + "mpletionConfig\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022\026\n\016" + + "matching_order\030\002 \001(\t\022\027\n\017max_suggestions\030" + + "\003 \001(\005\022\031\n\021min_prefix_length\030\004 \001(\005\022\025\n\rauto" + + "_learning\030\013 \001(\010\022\\\n\030suggestions_input_con" + + "fig\030\005 \001(\01325.google.cloud.retail.v2beta.C" + + "ompletionDataInputConfigB\003\340A\003\022.\n!last_su" + + "ggestions_import_operation\030\006 \001(\tB\003\340A\003\022Y\n" + + "\025denylist_input_config\030\007 \001(\01325.google.cl" + + "oud.retail.v2beta.CompletionDataInputCon" + + "figB\003\340A\003\022+\n\036last_denylist_import_operati" + + "on\030\010 \001(\tB\003\340A\003\022Z\n\026allowlist_input_config\030" + + "\t \001(\01325.google.cloud.retail.v2beta.Compl" + + "etionDataInputConfigB\003\340A\003\022,\n\037last_allowl" + + "ist_import_operation\030\n \001(\tB\003\340A\003:x\352Au\n&re" + + "tail.googleapis.com/CompletionConfig\022Kpr" + + "ojects/{project}/locations/{location}/ca" + + "talogs/{catalog}/completionConfig\"\327\001\n\022Me" + + "rchantCenterLink\022\'\n\032merchant_center_acco" + + "unt_id\030\001 \001(\003B\003\340A\002\022\021\n\tbranch_id\030\002 \001(\t\022\024\n\014" + + "destinations\030\003 \003(\t\022\023\n\013region_code\030\004 \001(\t\022" + + "\025\n\rlanguage_code\030\005 \001(\t\022C\n\005feeds\030\006 \003(\01324." + + "google.cloud.retail.v2beta.MerchantCente" + + "rFeedFilter\"N\n\030MerchantCenterFeedFilter\022" + + "\027\n\017primary_feed_id\030\001 \001(\003\022\031\n\021primary_feed" + + "_name\030\002 \001(\t\"\\\n\033MerchantCenterLinkingConf" + + "ig\022=\n\005links\030\001 \003(\0132..google.cloud.retail." + + "v2beta.MerchantCenterLink\"\321\002\n\007Catalog\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\002\340A\005\022\034\n\014display_name\030\002 \001(" + + "\tB\006\340A\002\340A\005\022Q\n\024product_level_config\030\004 \001(\0132" + + "..google.cloud.retail.v2beta.ProductLeve" + + "lConfigB\003\340A\002\022_\n\036merchant_center_linking_" + + "config\030\006 \001(\01327.google.cloud.retail.v2bet" + + "a.MerchantCenterLinkingConfig:^\352A[\n\035reta" + + "il.googleapis.com/Catalog\022:projects/{pro" + + "ject}/locations/{location}/catalogs/{cat" + + "alog}B\313\001\n\036com.google.cloud.retail.v2beta" + + "B\014CatalogProtoP\001Z6cloud.google.com/go/re" + + "tail/apiv2beta/retailpb;retailpb\242\002\006RETAI" + + "L\252\002\032Google.Cloud.Retail.V2Beta\312\002\032Google\\" + + "Cloud\\Retail\\V2beta\352\002\035Google::Cloud::Ret" + + "ail::V2betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -176,6 +218,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.cloud.retail.v2beta.CommonProto.getDescriptor(), com.google.cloud.retail.v2beta.ImportConfigProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_retail_v2beta_ProductLevelConfig_descriptor = getDescriptor().getMessageTypes().get(0); @@ -200,6 +243,61 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RecommendationsFilteringOption", "ExactSearchableOption", "RetrievableOption", + "FacetConfig", + }); + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_descriptor = + internal_static_google_cloud_retail_v2beta_CatalogAttribute_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_descriptor, + new java.lang.String[] { + "FacetIntervals", + "IgnoredFacetValues", + "MergedFacetValues", + "MergedFacet", + "RerankConfig", + }); + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor = + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_IgnoredFacetValues_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_IgnoredFacetValues_descriptor, + new java.lang.String[] { + "Values", "StartTime", "EndTime", + }); + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor = + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacetValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacetValue_descriptor, + new java.lang.String[] { + "Values", "MergedValue", + }); + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacet_descriptor = + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_MergedFacet_descriptor, + new java.lang.String[] { + "MergedFacetKey", + }); + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_RerankConfig_descriptor = + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_RerankConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_CatalogAttribute_FacetConfig_RerankConfig_descriptor, + new java.lang.String[] { + "RerankFacet", "FacetValues", }); internal_static_google_cloud_retail_v2beta_AttributesConfig_descriptor = getDescriptor().getMessageTypes().get(2); @@ -284,6 +382,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.cloud.retail.v2beta.CommonProto.getDescriptor(); com.google.cloud.retail.v2beta.ImportConfigProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CommonProto.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CommonProto.java index 7ba2ad87f112..5145f854064f 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CommonProto.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CommonProto.java @@ -76,6 +76,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2beta_Rule_IgnoreAction_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2beta_Rule_IgnoreAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_FacetPositionAdjustment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_Rule_RemoveFacetAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_Rule_RemoveFacetAction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_retail_v2beta_Audience_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -136,98 +148,109 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n\'google/cloud/retail/v2beta/common.prot" + "o\022\032google.cloud.retail.v2beta\032\037google/ap" + "i/field_behavior.proto\032\037google/protobuf/" - + "timestamp.proto\"\270\002\n\tCondition\022D\n\013query_t" + + "timestamp.proto\"\321\002\n\tCondition\022D\n\013query_t" + "erms\030\001 \003(\0132/.google.cloud.retail.v2beta." + "Condition.QueryTerm\022J\n\021active_time_range" + "\030\003 \003(\0132/.google.cloud.retail.v2beta.Cond" - + "ition.TimeRange\032.\n\tQueryTerm\022\r\n\005value\030\001 " - + "\001(\t\022\022\n\nfull_match\030\002 \001(\010\032i\n\tTimeRange\022.\n\n" - + "start_time\030\001 \001(\0132\032.google.protobuf.Times" - + "tamp\022,\n\010end_time\030\002 \001(\0132\032.google.protobuf" - + ".Timestamp\"\241\t\n\004Rule\022D\n\014boost_action\030\002 \001(" - + "\0132,.google.cloud.retail.v2beta.Rule.Boos" - + "tActionH\000\022J\n\017redirect_action\030\003 \001(\0132/.goo" - + "gle.cloud.retail.v2beta.Rule.RedirectAct" - + "ionH\000\022W\n\026oneway_synonyms_action\030\006 \001(\01325." - + "google.cloud.retail.v2beta.Rule.OnewaySy" - + "nonymsActionH\000\022X\n\027do_not_associate_actio" - + "n\030\007 \001(\01325.google.cloud.retail.v2beta.Rul" - + "e.DoNotAssociateActionH\000\022P\n\022replacement_" - + "action\030\010 \001(\01322.google.cloud.retail.v2bet" - + "a.Rule.ReplacementActionH\000\022F\n\rignore_act" - + "ion\030\t \001(\0132-.google.cloud.retail.v2beta.R" - + "ule.IgnoreActionH\000\022F\n\rfilter_action\030\n \001(" - + "\0132-.google.cloud.retail.v2beta.Rule.Filt" - + "erActionH\000\022W\n\026twoway_synonyms_action\030\013 \001" - + "(\01325.google.cloud.retail.v2beta.Rule.Two" - + "waySynonymsActionH\000\022=\n\tcondition\030\001 \001(\0132%" - + ".google.cloud.retail.v2beta.ConditionB\003\340" - + "A\002\0325\n\013BoostAction\022\r\n\005boost\030\001 \001(\002\022\027\n\017prod" - + "ucts_filter\030\002 \001(\t\032\036\n\014FilterAction\022\016\n\006fil" - + "ter\030\001 \001(\t\032&\n\016RedirectAction\022\024\n\014redirect_" - + "uri\030\001 \001(\t\032(\n\024TwowaySynonymsAction\022\020\n\010syn" - + "onyms\030\001 \003(\t\032S\n\024OnewaySynonymsAction\022\023\n\013q" - + "uery_terms\030\003 \003(\t\022\020\n\010synonyms\030\004 \003(\t\022\024\n\014on" - + "eway_terms\030\002 \003(\t\032Z\n\024DoNotAssociateAction" - + "\022\023\n\013query_terms\030\002 \003(\t\022\036\n\026do_not_associat" - + "e_terms\030\003 \003(\t\022\r\n\005terms\030\001 \003(\t\032P\n\021Replacem" - + "entAction\022\023\n\013query_terms\030\002 \003(\t\022\030\n\020replac" - + "ement_term\030\003 \001(\t\022\014\n\004term\030\001 \001(\t\032$\n\014Ignore" - + "Action\022\024\n\014ignore_terms\030\001 \003(\tB\010\n\006action\"/" - + "\n\010Audience\022\017\n\007genders\030\001 \003(\t\022\022\n\nage_group" - + "s\030\002 \003(\t\"3\n\tColorInfo\022\026\n\016color_families\030\001" - + " \003(\t\022\016\n\006colors\030\002 \003(\t\"\206\001\n\017CustomAttribute" - + "\022\014\n\004text\030\001 \003(\t\022\017\n\007numbers\030\002 \003(\001\022\033\n\nsearc" - + "hable\030\003 \001(\010B\002\030\001H\000\210\001\001\022\032\n\tindexable\030\004 \001(\010B" - + "\002\030\001H\001\210\001\001B\r\n\013_searchableB\014\n\n_indexable\"2\n" - + "\017FulfillmentInfo\022\014\n\004type\030\001 \001(\t\022\021\n\tplace_" - + "ids\030\002 \003(\t\"8\n\005Image\022\020\n\003uri\030\001 \001(\tB\003\340A\002\022\016\n\006" - + "height\030\002 \001(\005\022\r\n\005width\030\003 \001(\005\"x\n\010Interval\022" - + "\021\n\007minimum\030\001 \001(\001H\000\022\033\n\021exclusive_minimum\030" - + "\002 \001(\001H\000\022\021\n\007maximum\030\003 \001(\001H\001\022\033\n\021exclusive_" - + "maximum\030\004 \001(\001H\001B\005\n\003minB\005\n\003max\"\225\003\n\tPriceI" - + "nfo\022\025\n\rcurrency_code\030\001 \001(\t\022\r\n\005price\030\002 \001(" - + "\002\022\026\n\016original_price\030\003 \001(\002\022\014\n\004cost\030\004 \001(\002\022" - + "8\n\024price_effective_time\030\005 \001(\0132\032.google.p" - + "rotobuf.Timestamp\0225\n\021price_expire_time\030\006" - + " \001(\0132\032.google.protobuf.Timestamp\022J\n\013pric" - + "e_range\030\007 \001(\01320.google.cloud.retail.v2be" - + "ta.PriceInfo.PriceRangeB\003\340A\003\032\177\n\nPriceRan" - + "ge\0223\n\005price\030\001 \001(\0132$.google.cloud.retail." - + "v2beta.Interval\022<\n\016original_price\030\002 \001(\0132" - + "$.google.cloud.retail.v2beta.Interval\"P\n" - + "\006Rating\022\024\n\014rating_count\030\001 \001(\005\022\026\n\016average" - + "_rating\030\002 \001(\002\022\030\n\020rating_histogram\030\003 \003(\005\"" - + "`\n\010UserInfo\022\017\n\007user_id\030\001 \001(\t\022\022\n\nip_addre" - + "ss\030\002 \001(\t\022\022\n\nuser_agent\030\003 \001(\t\022\033\n\023direct_u" - + "ser_request\030\004 \001(\010\"\255\002\n\016LocalInventory\022\020\n\010" - + "place_id\030\001 \001(\t\0229\n\nprice_info\030\002 \001(\0132%.goo" - + "gle.cloud.retail.v2beta.PriceInfo\022N\n\natt" - + "ributes\030\003 \003(\0132:.google.cloud.retail.v2be" - + "ta.LocalInventory.AttributesEntry\022\036\n\021ful" - + "fillment_types\030\004 \003(\tB\003\340A\004\032^\n\017AttributesE" - + "ntry\022\013\n\003key\030\001 \001(\t\022:\n\005value\030\002 \001(\0132+.googl" - + "e.cloud.retail.v2beta.CustomAttribute:\0028" - + "\001*\206\001\n\024AttributeConfigLevel\022&\n\"ATTRIBUTE_" - + "CONFIG_LEVEL_UNSPECIFIED\020\000\022\"\n\036PRODUCT_LE" - + "VEL_ATTRIBUTE_CONFIG\020\001\022\"\n\036CATALOG_LEVEL_" - + "ATTRIBUTE_CONFIG\020\002*i\n\014SolutionType\022\035\n\031SO" - + "LUTION_TYPE_UNSPECIFIED\020\000\022 \n\034SOLUTION_TY" - + "PE_RECOMMENDATION\020\001\022\030\n\024SOLUTION_TYPE_SEA" - + "RCH\020\002*\241\001\n\036RecommendationsFilteringOption" - + "\0220\n,RECOMMENDATIONS_FILTERING_OPTION_UNS" - + "PECIFIED\020\000\022&\n\"RECOMMENDATIONS_FILTERING_" - + "DISABLED\020\001\022%\n!RECOMMENDATIONS_FILTERING_" - + "ENABLED\020\003*\213\001\n\025SearchSolutionUseCase\022(\n$S" - + "EARCH_SOLUTION_USE_CASE_UNSPECIFIED\020\000\022#\n" - + "\037SEARCH_SOLUTION_USE_CASE_SEARCH\020\001\022#\n\037SE" - + "ARCH_SOLUTION_USE_CASE_BROWSE\020\002B\312\001\n\036com." - + "google.cloud.retail.v2betaB\013CommonProtoP" - + "\001Z6cloud.google.com/go/retail/apiv2beta/" - + "retailpb;retailpb\242\002\006RETAIL\252\002\032Google.Clou" - + "d.Retail.V2Beta\312\002\032Google\\Cloud\\Retail\\V2" - + "beta\352\002\035Google::Cloud::Retail::V2betab\006pr" - + "oto3" + + "ition.TimeRange\022\027\n\017page_categories\030\004 \003(\t" + + "\032.\n\tQueryTerm\022\r\n\005value\030\001 \001(\t\022\022\n\nfull_mat" + + "ch\030\002 \001(\010\032i\n\tTimeRange\022.\n\nstart_time\030\001 \001(" + + "\0132\032.google.protobuf.Timestamp\022,\n\010end_tim" + + "e\030\002 \001(\0132\032.google.protobuf.Timestamp\"\325\014\n\004" + + "Rule\022D\n\014boost_action\030\002 \001(\0132,.google.clou" + + "d.retail.v2beta.Rule.BoostActionH\000\022J\n\017re" + + "direct_action\030\003 \001(\0132/.google.cloud.retai" + + "l.v2beta.Rule.RedirectActionH\000\022W\n\026oneway" + + "_synonyms_action\030\006 \001(\01325.google.cloud.re" + + "tail.v2beta.Rule.OnewaySynonymsActionH\000\022" + + "X\n\027do_not_associate_action\030\007 \001(\01325.googl" + + "e.cloud.retail.v2beta.Rule.DoNotAssociat" + + "eActionH\000\022P\n\022replacement_action\030\010 \001(\01322." + + "google.cloud.retail.v2beta.Rule.Replacem" + + "entActionH\000\022F\n\rignore_action\030\t \001(\0132-.goo" + + "gle.cloud.retail.v2beta.Rule.IgnoreActio" + + "nH\000\022F\n\rfilter_action\030\n \001(\0132-.google.clou" + + "d.retail.v2beta.Rule.FilterActionH\000\022W\n\026t" + + "woway_synonyms_action\030\013 \001(\01325.google.clo" + + "ud.retail.v2beta.Rule.TwowaySynonymsActi" + + "onH\000\022\\\n\031force_return_facet_action\030\014 \001(\0132" + + "7.google.cloud.retail.v2beta.Rule.ForceR" + + "eturnFacetActionH\000\022Q\n\023remove_facet_actio" + + "n\030\r \001(\01322.google.cloud.retail.v2beta.Rul" + + "e.RemoveFacetActionH\000\022=\n\tcondition\030\001 \001(\013" + + "2%.google.cloud.retail.v2beta.ConditionB" + + "\003\340A\002\0325\n\013BoostAction\022\r\n\005boost\030\001 \001(\002\022\027\n\017pr" + + "oducts_filter\030\002 \001(\t\032\036\n\014FilterAction\022\016\n\006f" + + "ilter\030\001 \001(\t\032&\n\016RedirectAction\022\024\n\014redirec" + + "t_uri\030\001 \001(\t\032(\n\024TwowaySynonymsAction\022\020\n\010s" + + "ynonyms\030\001 \003(\t\032S\n\024OnewaySynonymsAction\022\023\n" + + "\013query_terms\030\003 \003(\t\022\020\n\010synonyms\030\004 \003(\t\022\024\n\014" + + "oneway_terms\030\002 \003(\t\032Z\n\024DoNotAssociateActi" + + "on\022\023\n\013query_terms\030\002 \003(\t\022\036\n\026do_not_associ" + + "ate_terms\030\003 \003(\t\022\r\n\005terms\030\001 \003(\t\032P\n\021Replac" + + "ementAction\022\023\n\013query_terms\030\002 \003(\t\022\030\n\020repl" + + "acement_term\030\003 \001(\t\022\014\n\004term\030\001 \001(\t\032$\n\014Igno" + + "reAction\022\024\n\014ignore_terms\030\001 \003(\t\032\322\001\n\026Force" + + "ReturnFacetAction\022s\n\032facet_position_adju" + + "stments\030\001 \003(\0132O.google.cloud.retail.v2be" + + "ta.Rule.ForceReturnFacetAction.FacetPosi" + + "tionAdjustment\032C\n\027FacetPositionAdjustmen" + + "t\022\026\n\016attribute_name\030\001 \001(\t\022\020\n\010position\030\002 " + + "\001(\005\032,\n\021RemoveFacetAction\022\027\n\017attribute_na" + + "mes\030\001 \003(\tB\010\n\006action\"/\n\010Audience\022\017\n\007gende" + + "rs\030\001 \003(\t\022\022\n\nage_groups\030\002 \003(\t\"3\n\tColorInf" + + "o\022\026\n\016color_families\030\001 \003(\t\022\016\n\006colors\030\002 \003(" + + "\t\"\206\001\n\017CustomAttribute\022\014\n\004text\030\001 \003(\t\022\017\n\007n" + + "umbers\030\002 \003(\001\022\033\n\nsearchable\030\003 \001(\010B\002\030\001H\000\210\001" + + "\001\022\032\n\tindexable\030\004 \001(\010B\002\030\001H\001\210\001\001B\r\n\013_search" + + "ableB\014\n\n_indexable\"2\n\017FulfillmentInfo\022\014\n" + + "\004type\030\001 \001(\t\022\021\n\tplace_ids\030\002 \003(\t\"8\n\005Image\022" + + "\020\n\003uri\030\001 \001(\tB\003\340A\002\022\016\n\006height\030\002 \001(\005\022\r\n\005wid" + + "th\030\003 \001(\005\"x\n\010Interval\022\021\n\007minimum\030\001 \001(\001H\000\022" + + "\033\n\021exclusive_minimum\030\002 \001(\001H\000\022\021\n\007maximum\030" + + "\003 \001(\001H\001\022\033\n\021exclusive_maximum\030\004 \001(\001H\001B\005\n\003" + + "minB\005\n\003max\"\225\003\n\tPriceInfo\022\025\n\rcurrency_cod" + + "e\030\001 \001(\t\022\r\n\005price\030\002 \001(\002\022\026\n\016original_price" + + "\030\003 \001(\002\022\014\n\004cost\030\004 \001(\002\0228\n\024price_effective_" + + "time\030\005 \001(\0132\032.google.protobuf.Timestamp\0225" + + "\n\021price_expire_time\030\006 \001(\0132\032.google.proto" + + "buf.Timestamp\022J\n\013price_range\030\007 \001(\01320.goo" + + "gle.cloud.retail.v2beta.PriceInfo.PriceR" + + "angeB\003\340A\003\032\177\n\nPriceRange\0223\n\005price\030\001 \001(\0132$" + + ".google.cloud.retail.v2beta.Interval\022<\n\016" + + "original_price\030\002 \001(\0132$.google.cloud.reta" + + "il.v2beta.Interval\"P\n\006Rating\022\024\n\014rating_c" + + "ount\030\001 \001(\005\022\026\n\016average_rating\030\002 \001(\002\022\030\n\020ra" + + "ting_histogram\030\003 \003(\005\"`\n\010UserInfo\022\017\n\007user" + + "_id\030\001 \001(\t\022\022\n\nip_address\030\002 \001(\t\022\022\n\nuser_ag" + + "ent\030\003 \001(\t\022\033\n\023direct_user_request\030\004 \001(\010\"\255" + + "\002\n\016LocalInventory\022\020\n\010place_id\030\001 \001(\t\0229\n\np" + + "rice_info\030\002 \001(\0132%.google.cloud.retail.v2" + + "beta.PriceInfo\022N\n\nattributes\030\003 \003(\0132:.goo" + + "gle.cloud.retail.v2beta.LocalInventory.A" + + "ttributesEntry\022\036\n\021fulfillment_types\030\004 \003(" + + "\tB\003\340A\004\032^\n\017AttributesEntry\022\013\n\003key\030\001 \001(\t\022:" + + "\n\005value\030\002 \001(\0132+.google.cloud.retail.v2be" + + "ta.CustomAttribute:\0028\001*\206\001\n\024AttributeConf" + + "igLevel\022&\n\"ATTRIBUTE_CONFIG_LEVEL_UNSPEC" + + "IFIED\020\000\022\"\n\036PRODUCT_LEVEL_ATTRIBUTE_CONFI" + + "G\020\001\022\"\n\036CATALOG_LEVEL_ATTRIBUTE_CONFIG\020\002*" + + "i\n\014SolutionType\022\035\n\031SOLUTION_TYPE_UNSPECI" + + "FIED\020\000\022 \n\034SOLUTION_TYPE_RECOMMENDATION\020\001" + + "\022\030\n\024SOLUTION_TYPE_SEARCH\020\002*\241\001\n\036Recommend" + + "ationsFilteringOption\0220\n,RECOMMENDATIONS" + + "_FILTERING_OPTION_UNSPECIFIED\020\000\022&\n\"RECOM" + + "MENDATIONS_FILTERING_DISABLED\020\001\022%\n!RECOM" + + "MENDATIONS_FILTERING_ENABLED\020\003*\213\001\n\025Searc" + + "hSolutionUseCase\022(\n$SEARCH_SOLUTION_USE_" + + "CASE_UNSPECIFIED\020\000\022#\n\037SEARCH_SOLUTION_US" + + "E_CASE_SEARCH\020\001\022#\n\037SEARCH_SOLUTION_USE_C" + + "ASE_BROWSE\020\002B\312\001\n\036com.google.cloud.retail" + + ".v2betaB\013CommonProtoP\001Z6cloud.google.com" + + "/go/retail/apiv2beta/retailpb;retailpb\242\002" + + "\006RETAIL\252\002\032Google.Cloud.Retail.V2Beta\312\002\032G" + + "oogle\\Cloud\\Retail\\V2beta\352\002\035Google::Clou" + + "d::Retail::V2betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -242,7 +265,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2beta_Condition_descriptor, new java.lang.String[] { - "QueryTerms", "ActiveTimeRange", + "QueryTerms", "ActiveTimeRange", "PageCategories", }); internal_static_google_cloud_retail_v2beta_Condition_QueryTerm_descriptor = internal_static_google_cloud_retail_v2beta_Condition_descriptor.getNestedTypes().get(0); @@ -274,6 +297,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "IgnoreAction", "FilterAction", "TwowaySynonymsAction", + "ForceReturnFacetAction", + "RemoveFacetAction", "Condition", "Action", }); @@ -341,6 +366,32 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "IgnoreTerms", }); + internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_descriptor = + internal_static_google_cloud_retail_v2beta_Rule_descriptor.getNestedTypes().get(8); + internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_descriptor, + new java.lang.String[] { + "FacetPositionAdjustments", + }); + internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor = + internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_FacetPositionAdjustment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor, + new java.lang.String[] { + "AttributeName", "Position", + }); + internal_static_google_cloud_retail_v2beta_Rule_RemoveFacetAction_descriptor = + internal_static_google_cloud_retail_v2beta_Rule_descriptor.getNestedTypes().get(9); + internal_static_google_cloud_retail_v2beta_Rule_RemoveFacetAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_Rule_RemoveFacetAction_descriptor, + new java.lang.String[] { + "AttributeNames", + }); internal_static_google_cloud_retail_v2beta_Audience_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_retail_v2beta_Audience_fieldAccessorTable = diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequest.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequest.java index 15da01ea9937..c7c2f109edaf 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequest.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequest.java @@ -523,6 +523,26 @@ public int getMaxSuggestions() { return maxSuggestions_; } + public static final int ENABLE_ATTRIBUTE_SUGGESTIONS_FIELD_NUMBER = 9; + private boolean enableAttributeSuggestions_ = false; + /** + * + * + *
+   * If true, attribute suggestions are enabled and provided in response.
+   *
+   * This field is only available for "cloud-retail" dataset.
+   * 
+ * + * bool enable_attribute_suggestions = 9; + * + * @return The enableAttributeSuggestions. + */ + @java.lang.Override + public boolean getEnableAttributeSuggestions() { + return enableAttributeSuggestions_; + } + public static final int ENTITY_FIELD_NUMBER = 10; @SuppressWarnings("serial") @@ -531,10 +551,10 @@ public int getMaxSuggestions() { * * *
-   * The entity for customers that may run multiple different entities, domains,
-   * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+   * The entity for customers who run multiple entities, domains, sites, or
+   * regions, for example, `Google US`, `Google Ads`, `Waymo`,
    * `google.com`, `youtube.com`, etc.
-   * If this is set, it should be exactly matched with
+   * If this is set, it must be an exact match with
    * [UserEvent.entity][google.cloud.retail.v2beta.UserEvent.entity] to get
    * per-entity autocomplete results.
    * 
@@ -559,10 +579,10 @@ public java.lang.String getEntity() { * * *
-   * The entity for customers that may run multiple different entities, domains,
-   * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+   * The entity for customers who run multiple entities, domains, sites, or
+   * regions, for example, `Google US`, `Google Ads`, `Waymo`,
    * `google.com`, `youtube.com`, etc.
-   * If this is set, it should be exactly matched with
+   * If this is set, it must be an exact match with
    * [UserEvent.entity][google.cloud.retail.v2beta.UserEvent.entity] to get
    * per-entity autocomplete results.
    * 
@@ -619,6 +639,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(visitorId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, visitorId_); } + if (enableAttributeSuggestions_ != false) { + output.writeBool(9, enableAttributeSuggestions_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entity_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, entity_); } @@ -657,6 +680,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(visitorId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, visitorId_); } + if (enableAttributeSuggestions_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, enableAttributeSuggestions_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entity_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, entity_); } @@ -683,6 +709,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDeviceType().equals(other.getDeviceType())) return false; if (!getDataset().equals(other.getDataset())) return false; if (getMaxSuggestions() != other.getMaxSuggestions()) return false; + if (getEnableAttributeSuggestions() != other.getEnableAttributeSuggestions()) return false; if (!getEntity().equals(other.getEntity())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -711,6 +738,8 @@ public int hashCode() { hash = (53 * hash) + getDataset().hashCode(); hash = (37 * hash) + MAX_SUGGESTIONS_FIELD_NUMBER; hash = (53 * hash) + getMaxSuggestions(); + hash = (37 * hash) + ENABLE_ATTRIBUTE_SUGGESTIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableAttributeSuggestions()); hash = (37 * hash) + ENTITY_FIELD_NUMBER; hash = (53 * hash) + getEntity().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); @@ -859,6 +888,7 @@ public Builder clear() { deviceType_ = ""; dataset_ = ""; maxSuggestions_ = 0; + enableAttributeSuggestions_ = false; entity_ = ""; return this; } @@ -919,6 +949,9 @@ private void buildPartial0(com.google.cloud.retail.v2beta.CompleteQueryRequest r result.maxSuggestions_ = maxSuggestions_; } if (((from_bitField0_ & 0x00000080) != 0)) { + result.enableAttributeSuggestions_ = enableAttributeSuggestions_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { result.entity_ = entity_; } } @@ -1007,9 +1040,12 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.CompleteQueryRequest oth if (other.getMaxSuggestions() != 0) { setMaxSuggestions(other.getMaxSuggestions()); } + if (other.getEnableAttributeSuggestions() != false) { + setEnableAttributeSuggestions(other.getEnableAttributeSuggestions()); + } if (!other.getEntity().isEmpty()) { entity_ = other.entity_; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -1081,10 +1117,16 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 58 + case 72: + { + enableAttributeSuggestions_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 72 case 82: { entity_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 82 default: @@ -2150,15 +2192,74 @@ public Builder clearMaxSuggestions() { return this; } + private boolean enableAttributeSuggestions_; + /** + * + * + *
+     * If true, attribute suggestions are enabled and provided in response.
+     *
+     * This field is only available for "cloud-retail" dataset.
+     * 
+ * + * bool enable_attribute_suggestions = 9; + * + * @return The enableAttributeSuggestions. + */ + @java.lang.Override + public boolean getEnableAttributeSuggestions() { + return enableAttributeSuggestions_; + } + /** + * + * + *
+     * If true, attribute suggestions are enabled and provided in response.
+     *
+     * This field is only available for "cloud-retail" dataset.
+     * 
+ * + * bool enable_attribute_suggestions = 9; + * + * @param value The enableAttributeSuggestions to set. + * @return This builder for chaining. + */ + public Builder setEnableAttributeSuggestions(boolean value) { + + enableAttributeSuggestions_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, attribute suggestions are enabled and provided in response.
+     *
+     * This field is only available for "cloud-retail" dataset.
+     * 
+ * + * bool enable_attribute_suggestions = 9; + * + * @return This builder for chaining. + */ + public Builder clearEnableAttributeSuggestions() { + bitField0_ = (bitField0_ & ~0x00000080); + enableAttributeSuggestions_ = false; + onChanged(); + return this; + } + private java.lang.Object entity_ = ""; /** * * *
-     * The entity for customers that may run multiple different entities, domains,
-     * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+     * The entity for customers who run multiple entities, domains, sites, or
+     * regions, for example, `Google US`, `Google Ads`, `Waymo`,
      * `google.com`, `youtube.com`, etc.
-     * If this is set, it should be exactly matched with
+     * If this is set, it must be an exact match with
      * [UserEvent.entity][google.cloud.retail.v2beta.UserEvent.entity] to get
      * per-entity autocomplete results.
      * 
@@ -2182,10 +2283,10 @@ public java.lang.String getEntity() { * * *
-     * The entity for customers that may run multiple different entities, domains,
-     * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+     * The entity for customers who run multiple entities, domains, sites, or
+     * regions, for example, `Google US`, `Google Ads`, `Waymo`,
      * `google.com`, `youtube.com`, etc.
-     * If this is set, it should be exactly matched with
+     * If this is set, it must be an exact match with
      * [UserEvent.entity][google.cloud.retail.v2beta.UserEvent.entity] to get
      * per-entity autocomplete results.
      * 
@@ -2209,10 +2310,10 @@ public com.google.protobuf.ByteString getEntityBytes() { * * *
-     * The entity for customers that may run multiple different entities, domains,
-     * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+     * The entity for customers who run multiple entities, domains, sites, or
+     * regions, for example, `Google US`, `Google Ads`, `Waymo`,
      * `google.com`, `youtube.com`, etc.
-     * If this is set, it should be exactly matched with
+     * If this is set, it must be an exact match with
      * [UserEvent.entity][google.cloud.retail.v2beta.UserEvent.entity] to get
      * per-entity autocomplete results.
      * 
@@ -2227,7 +2328,7 @@ public Builder setEntity(java.lang.String value) { throw new NullPointerException(); } entity_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -2235,10 +2336,10 @@ public Builder setEntity(java.lang.String value) { * * *
-     * The entity for customers that may run multiple different entities, domains,
-     * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+     * The entity for customers who run multiple entities, domains, sites, or
+     * regions, for example, `Google US`, `Google Ads`, `Waymo`,
      * `google.com`, `youtube.com`, etc.
-     * If this is set, it should be exactly matched with
+     * If this is set, it must be an exact match with
      * [UserEvent.entity][google.cloud.retail.v2beta.UserEvent.entity] to get
      * per-entity autocomplete results.
      * 
@@ -2249,7 +2350,7 @@ public Builder setEntity(java.lang.String value) { */ public Builder clearEntity() { entity_ = getDefaultInstance().getEntity(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -2257,10 +2358,10 @@ public Builder clearEntity() { * * *
-     * The entity for customers that may run multiple different entities, domains,
-     * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+     * The entity for customers who run multiple entities, domains, sites, or
+     * regions, for example, `Google US`, `Google Ads`, `Waymo`,
      * `google.com`, `youtube.com`, etc.
-     * If this is set, it should be exactly matched with
+     * If this is set, it must be an exact match with
      * [UserEvent.entity][google.cloud.retail.v2beta.UserEvent.entity] to get
      * per-entity autocomplete results.
      * 
@@ -2276,7 +2377,7 @@ public Builder setEntityBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); entity_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequestOrBuilder.java index eb344d9e5bcd..cb6621a8bae7 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequestOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequestOrBuilder.java @@ -334,10 +334,25 @@ public interface CompleteQueryRequestOrBuilder * * *
-   * The entity for customers that may run multiple different entities, domains,
-   * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+   * If true, attribute suggestions are enabled and provided in response.
+   *
+   * This field is only available for "cloud-retail" dataset.
+   * 
+ * + * bool enable_attribute_suggestions = 9; + * + * @return The enableAttributeSuggestions. + */ + boolean getEnableAttributeSuggestions(); + + /** + * + * + *
+   * The entity for customers who run multiple entities, domains, sites, or
+   * regions, for example, `Google US`, `Google Ads`, `Waymo`,
    * `google.com`, `youtube.com`, etc.
-   * If this is set, it should be exactly matched with
+   * If this is set, it must be an exact match with
    * [UserEvent.entity][google.cloud.retail.v2beta.UserEvent.entity] to get
    * per-entity autocomplete results.
    * 
@@ -351,10 +366,10 @@ public interface CompleteQueryRequestOrBuilder * * *
-   * The entity for customers that may run multiple different entities, domains,
-   * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
+   * The entity for customers who run multiple entities, domains, sites, or
+   * regions, for example, `Google US`, `Google Ads`, `Waymo`,
    * `google.com`, `youtube.com`, etc.
-   * If this is set, it should be exactly matched with
+   * If this is set, it must be an exact match with
    * [UserEvent.entity][google.cloud.retail.v2beta.UserEvent.entity] to get
    * per-entity autocomplete results.
    * 
diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponse.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponse.java index aca286170e7c..7137b2f7e11c 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponse.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponse.java @@ -1343,6 +1343,7 @@ public com.google.protobuf.Parser getParserForType() { } } + @java.lang.Deprecated public interface RecentSearchResultOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult) @@ -1377,11 +1378,12 @@ public interface RecentSearchResultOrBuilder * * *
-   * Recent search of this user.
+   * Deprecated: Recent search of this user.
    * 
* * Protobuf type {@code google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult} */ + @java.lang.Deprecated public static final class RecentSearchResult extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult) @@ -1636,7 +1638,7 @@ protected Builder newBuilderForType( * * *
-     * Recent search of this user.
+     * Deprecated: Recent search of this user.
      * 
* * Protobuf type {@code google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult} @@ -2160,9 +2162,9 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -2184,10 +2186,11 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() {
    * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public java.util.List getRecentSearchResultsList() { return recentSearchResults_; @@ -2196,9 +2199,9 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -2220,10 +2223,11 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() {
    * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public java.util.List< ? extends com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResultOrBuilder> @@ -2234,9 +2238,9 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -2258,10 +2262,11 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() {
    * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public int getRecentSearchResultsCount() { return recentSearchResults_.size(); } @@ -2269,9 +2274,9 @@ public int getRecentSearchResultsCount() { * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -2293,10 +2298,11 @@ public int getRecentSearchResultsCount() {
    * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult getRecentSearchResults(int index) { return recentSearchResults_.get(index); @@ -2305,9 +2311,9 @@ public int getRecentSearchResultsCount() { * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -2329,10 +2335,11 @@ public int getRecentSearchResultsCount() {
    * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResultOrBuilder getRecentSearchResultsOrBuilder(int index) { return recentSearchResults_.get(index); @@ -3403,9 +3410,9 @@ private void ensureRecentSearchResultsIsMutable() { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -3427,9 +3434,10 @@ private void ensureRecentSearchResultsIsMutable() {
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public java.util.List getRecentSearchResultsList() { if (recentSearchResultsBuilder_ == null) { @@ -3442,9 +3450,9 @@ private void ensureRecentSearchResultsIsMutable() { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -3466,9 +3474,10 @@ private void ensureRecentSearchResultsIsMutable() {
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public int getRecentSearchResultsCount() { if (recentSearchResultsBuilder_ == null) { return recentSearchResults_.size(); @@ -3480,9 +3489,9 @@ public int getRecentSearchResultsCount() { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -3504,9 +3513,10 @@ public int getRecentSearchResultsCount() {
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult getRecentSearchResults(int index) { if (recentSearchResultsBuilder_ == null) { @@ -3519,9 +3529,9 @@ public int getRecentSearchResultsCount() { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -3543,9 +3553,10 @@ public int getRecentSearchResultsCount() {
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder setRecentSearchResults( int index, com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult value) { if (recentSearchResultsBuilder_ == null) { @@ -3564,9 +3575,9 @@ public Builder setRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -3588,9 +3599,10 @@ public Builder setRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder setRecentSearchResults( int index, com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult.Builder @@ -3608,9 +3620,9 @@ public Builder setRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -3632,9 +3644,10 @@ public Builder setRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder addRecentSearchResults( com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult value) { if (recentSearchResultsBuilder_ == null) { @@ -3653,9 +3666,9 @@ public Builder addRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -3677,9 +3690,10 @@ public Builder addRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder addRecentSearchResults( int index, com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult value) { if (recentSearchResultsBuilder_ == null) { @@ -3698,9 +3712,9 @@ public Builder addRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -3722,9 +3736,10 @@ public Builder addRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder addRecentSearchResults( com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult.Builder builderForValue) { @@ -3741,9 +3756,9 @@ public Builder addRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -3765,9 +3780,10 @@ public Builder addRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder addRecentSearchResults( int index, com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult.Builder @@ -3785,9 +3801,9 @@ public Builder addRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -3809,9 +3825,10 @@ public Builder addRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder addAllRecentSearchResults( java.lang.Iterable< ? extends com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult> @@ -3829,9 +3846,9 @@ public Builder addAllRecentSearchResults( * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -3853,9 +3870,10 @@ public Builder addAllRecentSearchResults(
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder clearRecentSearchResults() { if (recentSearchResultsBuilder_ == null) { recentSearchResults_ = java.util.Collections.emptyList(); @@ -3870,9 +3888,9 @@ public Builder clearRecentSearchResults() { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -3894,9 +3912,10 @@ public Builder clearRecentSearchResults() {
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public Builder removeRecentSearchResults(int index) { if (recentSearchResultsBuilder_ == null) { ensureRecentSearchResultsIsMutable(); @@ -3911,9 +3930,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -3935,9 +3954,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult.Builder getRecentSearchResultsBuilder(int index) { return getRecentSearchResultsFieldBuilder().getBuilder(index); @@ -3946,9 +3966,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -3970,9 +3990,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResultOrBuilder getRecentSearchResultsOrBuilder(int index) { if (recentSearchResultsBuilder_ == null) { @@ -3985,9 +4006,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -4009,9 +4030,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public java.util.List< ? extends com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResultOrBuilder> @@ -4026,9 +4048,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -4050,9 +4072,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult.Builder addRecentSearchResultsBuilder() { return getRecentSearchResultsFieldBuilder() @@ -4064,9 +4087,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -4088,9 +4111,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult.Builder addRecentSearchResultsBuilder(int index) { return getRecentSearchResultsFieldBuilder() @@ -4103,9 +4127,9 @@ public Builder removeRecentSearchResults(int index) { * * *
-     * Matched recent searches of this user. The maximum number of recent searches
-     * is 10. This field is a restricted feature. Contact Retail Search support
-     * team if you are interested in enabling it.
+     * Deprecated. Matched recent searches of this user. The maximum number of
+     * recent searches is 10. This field is a restricted feature. If you want to
+     * enable it, contact Retail Search support.
      *
      * This feature is only available when
      * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -4127,9 +4151,10 @@ public Builder removeRecentSearchResults(int index) {
      * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated public java.util.List< com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult.Builder> getRecentSearchResultsBuilderList() { diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponseOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponseOrBuilder.java index 5a1df242a870..1d45d5d29f94 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponseOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponseOrBuilder.java @@ -130,9 +130,9 @@ com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult getComplet * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -154,18 +154,19 @@ com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult getComplet
    * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated java.util.List getRecentSearchResultsList(); /** * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -187,18 +188,19 @@ com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult getComplet
    * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult getRecentSearchResults( int index); /** * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -220,17 +222,18 @@ com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult getRecen
    * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated int getRecentSearchResultsCount(); /** * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -252,9 +255,10 @@ com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult getRecen
    * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated java.util.List< ? extends com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResultOrBuilder> @@ -263,9 +267,9 @@ com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult getRecen * * *
-   * Matched recent searches of this user. The maximum number of recent searches
-   * is 10. This field is a restricted feature. Contact Retail Search support
-   * team if you are interested in enabling it.
+   * Deprecated. Matched recent searches of this user. The maximum number of
+   * recent searches is 10. This field is a restricted feature. If you want to
+   * enable it, contact Retail Search support.
    *
    * This feature is only available when
    * [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]
@@ -287,9 +291,10 @@ com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult getRecen
    * 
* * - * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3; + * repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true]; * */ + @java.lang.Deprecated com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResultOrBuilder getRecentSearchResultsOrBuilder(int index); } diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfig.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfig.java index bdd1f7358710..86330d5589b2 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfig.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfig.java @@ -330,8 +330,8 @@ public com.google.cloud.retail.v2beta.CompletionDataInputConfig getSuggestionsIn * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * @@ -359,8 +359,8 @@ public java.lang.String getLastSuggestionsImportOperation() { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * @@ -1945,8 +1945,8 @@ public Builder clearSuggestionsInputConfig() { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * @@ -1973,8 +1973,8 @@ public java.lang.String getLastSuggestionsImportOperation() { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * @@ -2001,8 +2001,8 @@ public com.google.protobuf.ByteString getLastSuggestionsImportOperationBytes() { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * @@ -2028,8 +2028,8 @@ public Builder setLastSuggestionsImportOperation(java.lang.String value) { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * @@ -2051,8 +2051,8 @@ public Builder clearLastSuggestionsImportOperation() { * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfigOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfigOrBuilder.java index 9e463ae3dd2a..eef612d1dea4 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfigOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfigOrBuilder.java @@ -199,8 +199,8 @@ public interface CompletionConfigOrBuilder * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * @@ -217,8 +217,8 @@ public interface CompletionConfigOrBuilder * Output only. Name of the LRO corresponding to the latest suggestion terms * list import. * - * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - * retrieve the latest state of the Long Running Operation. + * Can use [GetOperation][google.longrunning.Operations.GetOperation] API + * method to retrieve the latest state of the Long Running Operation. * * * diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceProto.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceProto.java index 48364264f6d7..5918ce212208 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceProto.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceProto.java @@ -65,46 +65,47 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ogle/cloud/retail/v2beta/common.proto\032.g" + "oogle/cloud/retail/v2beta/import_config." + "proto\032#google/longrunning/operations.pro" - + "to\"\335\001\n\024CompleteQueryRequest\0226\n\007catalog\030\001" + + "to\"\203\002\n\024CompleteQueryRequest\0226\n\007catalog\030\001" + " \001(\tB%\340A\002\372A\037\n\035retail.googleapis.com/Cata" + "log\022\022\n\005query\030\002 \001(\tB\003\340A\002\022\022\n\nvisitor_id\030\007 " + "\001(\t\022\026\n\016language_codes\030\003 \003(\t\022\023\n\013device_ty" + "pe\030\004 \001(\t\022\017\n\007dataset\030\006 \001(\t\022\027\n\017max_suggest" - + "ions\030\005 \001(\005\022\016\n\006entity\030\n \001(\t\"\225\004\n\025CompleteQ" - + "ueryResponse\022^\n\022completion_results\030\001 \003(\013" - + "2B.google.cloud.retail.v2beta.CompleteQu" - + "eryResponse.CompletionResult\022\031\n\021attribut" - + "ion_token\030\002 \001(\t\022c\n\025recent_search_results" - + "\030\003 \003(\0132D.google.cloud.retail.v2beta.Comp" - + "leteQueryResponse.RecentSearchResult\032\356\001\n" - + "\020CompletionResult\022\022\n\nsuggestion\030\001 \001(\t\022f\n" - + "\nattributes\030\002 \003(\0132R.google.cloud.retail." - + "v2beta.CompleteQueryResponse.CompletionR" - + "esult.AttributesEntry\032^\n\017AttributesEntry" - + "\022\013\n\003key\030\001 \001(\t\022:\n\005value\030\002 \001(\0132+.google.cl" - + "oud.retail.v2beta.CustomAttribute:\0028\001\032+\n" - + "\022RecentSearchResult\022\025\n\rrecent_search\030\001 \001" - + "(\t2\316\004\n\021CompletionService\022\277\001\n\rCompleteQue" - + "ry\0220.google.cloud.retail.v2beta.Complete" - + "QueryRequest\0321.google.cloud.retail.v2bet" - + "a.CompleteQueryResponse\"I\202\323\344\223\002C\022A/v2beta" - + "/{catalog=projects/*/locations/*/catalog" - + "s/*}:completeQuery\022\253\002\n\024ImportCompletionD" - + "ata\0227.google.cloud.retail.v2beta.ImportC" - + "ompletionDataRequest\032\035.google.longrunnin" - + "g.Operation\"\272\001\312Ad\n7google.cloud.retail.v" - + "2beta.ImportCompletionDataResponse\022)goog" - + "le.cloud.retail.v2beta.ImportMetadata\202\323\344" - + "\223\002M\"H/v2beta/{parent=projects/*/location" - + "s/*/catalogs/*}/completionData:import:\001*" - + "\032I\312A\025retail.googleapis.com\322A.https://www" - + ".googleapis.com/auth/cloud-platformB\325\001\n\036" - + "com.google.cloud.retail.v2betaB\026Completi" - + "onServiceProtoP\001Z6cloud.google.com/go/re" - + "tail/apiv2beta/retailpb;retailpb\242\002\006RETAI" - + "L\252\002\032Google.Cloud.Retail.V2Beta\312\002\032Google\\" - + "Cloud\\Retail\\V2beta\352\002\035Google::Cloud::Ret" - + "ail::V2betab\006proto3" + + "ions\030\005 \001(\005\022$\n\034enable_attribute_suggestio" + + "ns\030\t \001(\010\022\016\n\006entity\030\n \001(\t\"\235\004\n\025CompleteQue" + + "ryResponse\022^\n\022completion_results\030\001 \003(\0132B" + + ".google.cloud.retail.v2beta.CompleteQuer" + + "yResponse.CompletionResult\022\031\n\021attributio" + + "n_token\030\002 \001(\t\022g\n\025recent_search_results\030\003" + + " \003(\0132D.google.cloud.retail.v2beta.Comple" + + "teQueryResponse.RecentSearchResultB\002\030\001\032\356" + + "\001\n\020CompletionResult\022\022\n\nsuggestion\030\001 \001(\t\022" + + "f\n\nattributes\030\002 \003(\0132R.google.cloud.retai" + + "l.v2beta.CompleteQueryResponse.Completio" + + "nResult.AttributesEntry\032^\n\017AttributesEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022:\n\005value\030\002 \001(\0132+.google." + + "cloud.retail.v2beta.CustomAttribute:\0028\001\032" + + "/\n\022RecentSearchResult\022\025\n\rrecent_search\030\001" + + " \001(\t:\002\030\0012\316\004\n\021CompletionService\022\277\001\n\rCompl" + + "eteQuery\0220.google.cloud.retail.v2beta.Co" + + "mpleteQueryRequest\0321.google.cloud.retail" + + ".v2beta.CompleteQueryResponse\"I\202\323\344\223\002C\022A/" + + "v2beta/{catalog=projects/*/locations/*/c" + + "atalogs/*}:completeQuery\022\253\002\n\024ImportCompl" + + "etionData\0227.google.cloud.retail.v2beta.I" + + "mportCompletionDataRequest\032\035.google.long" + + "running.Operation\"\272\001\312Ad\n7google.cloud.re" + + "tail.v2beta.ImportCompletionDataResponse" + + "\022)google.cloud.retail.v2beta.ImportMetad" + + "ata\202\323\344\223\002M\"H/v2beta/{parent=projects/*/lo" + + "cations/*/catalogs/*}/completionData:imp" + + "ort:\001*\032I\312A\025retail.googleapis.com\322A.https" + + "://www.googleapis.com/auth/cloud-platfor" + + "mB\325\001\n\036com.google.cloud.retail.v2betaB\026Co" + + "mpletionServiceProtoP\001Z6cloud.google.com" + + "/go/retail/apiv2beta/retailpb;retailpb\242\002" + + "\006RETAIL\252\002\032Google.Cloud.Retail.V2Beta\312\002\032G" + + "oogle\\Cloud\\Retail\\V2beta\352\002\035Google::Clou" + + "d::Retail::V2betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -131,6 +132,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DeviceType", "Dataset", "MaxSuggestions", + "EnableAttributeSuggestions", "Entity", }); internal_static_google_cloud_retail_v2beta_CompleteQueryResponse_descriptor = diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Condition.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Condition.java index d29e9538e6d9..60afc167677b 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Condition.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Condition.java @@ -46,6 +46,7 @@ private Condition(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Condition() { queryTerms_ = java.util.Collections.emptyList(); activeTimeRange_ = java.util.Collections.emptyList(); + pageCategories_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -2066,6 +2067,82 @@ public com.google.cloud.retail.v2beta.Condition.TimeRangeOrBuilder getActiveTime return activeTimeRange_.get(index); } + public static final int PAGE_CATEGORIES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList pageCategories_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @return A list containing the pageCategories. + */ + public com.google.protobuf.ProtocolStringList getPageCategoriesList() { + return pageCategories_; + } + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @return The count of pageCategories. + */ + public int getPageCategoriesCount() { + return pageCategories_.size(); + } + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the element to return. + * @return The pageCategories at the given index. + */ + public java.lang.String getPageCategories(int index) { + return pageCategories_.get(index); + } + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the value to return. + * @return The bytes of the pageCategories at the given index. + */ + public com.google.protobuf.ByteString getPageCategoriesBytes(int index) { + return pageCategories_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2086,6 +2163,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < activeTimeRange_.size(); i++) { output.writeMessage(3, activeTimeRange_.get(i)); } + for (int i = 0; i < pageCategories_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageCategories_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -2101,6 +2181,14 @@ public int getSerializedSize() { for (int i = 0; i < activeTimeRange_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, activeTimeRange_.get(i)); } + { + int dataSize = 0; + for (int i = 0; i < pageCategories_.size(); i++) { + dataSize += computeStringSizeNoTag(pageCategories_.getRaw(i)); + } + size += dataSize; + size += 1 * getPageCategoriesList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2118,6 +2206,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQueryTermsList().equals(other.getQueryTermsList())) return false; if (!getActiveTimeRangeList().equals(other.getActiveTimeRangeList())) return false; + if (!getPageCategoriesList().equals(other.getPageCategoriesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2137,6 +2226,10 @@ public int hashCode() { hash = (37 * hash) + ACTIVE_TIME_RANGE_FIELD_NUMBER; hash = (53 * hash) + getActiveTimeRangeList().hashCode(); } + if (getPageCategoriesCount() > 0) { + hash = (37 * hash) + PAGE_CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + getPageCategoriesList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2295,6 +2388,7 @@ public Builder clear() { activeTimeRangeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); + pageCategories_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @@ -2353,6 +2447,10 @@ private void buildPartialRepeatedFields(com.google.cloud.retail.v2beta.Condition private void buildPartial0(com.google.cloud.retail.v2beta.Condition result) { int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + pageCategories_.makeImmutable(); + result.pageCategories_ = pageCategories_; + } } @java.lang.Override @@ -2454,6 +2552,16 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Condition other) { } } } + if (!other.pageCategories_.isEmpty()) { + if (pageCategories_.isEmpty()) { + pageCategories_ = other.pageCategories_; + bitField0_ |= 0x00000004; + } else { + ensurePageCategoriesIsMutable(); + pageCategories_.addAll(other.pageCategories_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2508,6 +2616,13 @@ public Builder mergeFrom( } break; } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePageCategoriesIsMutable(); + pageCategories_.add(s); + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3319,6 +3434,207 @@ public com.google.cloud.retail.v2beta.Condition.TimeRange.Builder addActiveTimeR return activeTimeRangeBuilder_; } + private com.google.protobuf.LazyStringArrayList pageCategories_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePageCategoriesIsMutable() { + if (!pageCategories_.isModifiable()) { + pageCategories_ = new com.google.protobuf.LazyStringArrayList(pageCategories_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @return A list containing the pageCategories. + */ + public com.google.protobuf.ProtocolStringList getPageCategoriesList() { + pageCategories_.makeImmutable(); + return pageCategories_; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @return The count of pageCategories. + */ + public int getPageCategoriesCount() { + return pageCategories_.size(); + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the element to return. + * @return The pageCategories at the given index. + */ + public java.lang.String getPageCategories(int index) { + return pageCategories_.get(index); + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the value to return. + * @return The bytes of the pageCategories at the given index. + */ + public com.google.protobuf.ByteString getPageCategoriesBytes(int index) { + return pageCategories_.getByteString(index); + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param index The index to set the value at. + * @param value The pageCategories to set. + * @return This builder for chaining. + */ + public Builder setPageCategories(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageCategoriesIsMutable(); + pageCategories_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param value The pageCategories to add. + * @return This builder for chaining. + */ + public Builder addPageCategories(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageCategoriesIsMutable(); + pageCategories_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param values The pageCategories to add. + * @return This builder for chaining. + */ + public Builder addAllPageCategories(java.lang.Iterable values) { + ensurePageCategoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pageCategories_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageCategories() { + pageCategories_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to support browse uses cases.
+     * A list (up to 10 entries) of categories or departments.
+     * The format should be the same as
+     * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+     * 
+ * + * repeated string page_categories = 4; + * + * @param value The bytes of the pageCategories to add. + * @return This builder for chaining. + */ + public Builder addPageCategoriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePageCategoriesIsMutable(); + pageCategories_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ConditionOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ConditionOrBuilder.java index 03b479ee1b79..eec6972a11fb 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ConditionOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ConditionOrBuilder.java @@ -148,4 +148,67 @@ public interface ConditionOrBuilder */ com.google.cloud.retail.v2beta.Condition.TimeRangeOrBuilder getActiveTimeRangeOrBuilder( int index); + + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @return A list containing the pageCategories. + */ + java.util.List getPageCategoriesList(); + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @return The count of pageCategories. + */ + int getPageCategoriesCount(); + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the element to return. + * @return The pageCategories at the given index. + */ + java.lang.String getPageCategories(int index); + /** + * + * + *
+   * Used to support browse uses cases.
+   * A list (up to 10 entries) of categories or departments.
+   * The format should be the same as
+   * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
+   * 
+ * + * repeated string page_categories = 4; + * + * @param index The index of the value to return. + * @return The bytes of the pageCategories at the given index. + */ + com.google.protobuf.ByteString getPageCategoriesBytes(int index); } diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttribute.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttribute.java index f88c34bf7eec..2816c36a4304 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttribute.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttribute.java @@ -253,7 +253,7 @@ public double getNumbers(int index) { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=426 + * google/cloud/retail/v2beta/common.proto;l=511 * @return Whether the searchable field is set. */ @java.lang.Override @@ -284,7 +284,7 @@ public boolean hasSearchable() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=426 + * google/cloud/retail/v2beta/common.proto;l=511 * @return The searchable. */ @java.lang.Override @@ -323,7 +323,7 @@ public boolean getSearchable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=447 + * google/cloud/retail/v2beta/common.proto;l=532 * @return Whether the indexable field is set. */ @java.lang.Override @@ -359,7 +359,7 @@ public boolean hasIndexable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=447 + * google/cloud/retail/v2beta/common.proto;l=532 * @return The indexable. */ @java.lang.Override @@ -1282,7 +1282,7 @@ public Builder clearNumbers() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=426 + * google/cloud/retail/v2beta/common.proto;l=511 * @return Whether the searchable field is set. */ @java.lang.Override @@ -1313,7 +1313,7 @@ public boolean hasSearchable() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=426 + * google/cloud/retail/v2beta/common.proto;l=511 * @return The searchable. */ @java.lang.Override @@ -1344,7 +1344,7 @@ public boolean getSearchable() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=426 + * google/cloud/retail/v2beta/common.proto;l=511 * @param value The searchable to set. * @return This builder for chaining. */ @@ -1379,7 +1379,7 @@ public Builder setSearchable(boolean value) { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=426 + * google/cloud/retail/v2beta/common.proto;l=511 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1419,7 +1419,7 @@ public Builder clearSearchable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=447 + * google/cloud/retail/v2beta/common.proto;l=532 * @return Whether the indexable field is set. */ @java.lang.Override @@ -1455,7 +1455,7 @@ public boolean hasIndexable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=447 + * google/cloud/retail/v2beta/common.proto;l=532 * @return The indexable. */ @java.lang.Override @@ -1491,7 +1491,7 @@ public boolean getIndexable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=447 + * google/cloud/retail/v2beta/common.proto;l=532 * @param value The indexable to set. * @return This builder for chaining. */ @@ -1531,7 +1531,7 @@ public Builder setIndexable(boolean value) { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=447 + * google/cloud/retail/v2beta/common.proto;l=532 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttributeOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttributeOrBuilder.java index e9c1237ba8ce..f44d096ff263 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttributeOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttributeOrBuilder.java @@ -183,7 +183,7 @@ public interface CustomAttributeOrBuilder * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=426 + * google/cloud/retail/v2beta/common.proto;l=511 * @return Whether the searchable field is set. */ @java.lang.Deprecated @@ -211,7 +211,7 @@ public interface CustomAttributeOrBuilder * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=426 + * google/cloud/retail/v2beta/common.proto;l=511 * @return The searchable. */ @java.lang.Deprecated @@ -245,7 +245,7 @@ public interface CustomAttributeOrBuilder * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=447 + * google/cloud/retail/v2beta/common.proto;l=532 * @return Whether the indexable field is set. */ @java.lang.Deprecated @@ -278,7 +278,7 @@ public interface CustomAttributeOrBuilder * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=447 + * google/cloud/retail/v2beta/common.proto;l=532 * @return The indexable. */ @java.lang.Deprecated diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExperimentInfo.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExperimentInfo.java index 4da023e47e75..db12df228ddb 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExperimentInfo.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExperimentInfo.java @@ -23,7 +23,7 @@ * * *
- * Metadata for active A/B testing [Experiments][].
+ * Metadata for active A/B testing [Experiment][].
  * 
* * Protobuf type {@code google.cloud.retail.v2beta.ExperimentInfo} @@ -104,8 +104,8 @@ public interface ServingConfigExperimentOrBuilder * *
      * The fully qualified resource name of the serving config
-     * [VariantArm.serving_config_id][] responsible for generating the search
-     * response. For example:
+     * [Experiment.VariantArm.serving_config_id][] responsible for generating
+     * the search response. For example:
      * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
      * 
* @@ -119,8 +119,8 @@ public interface ServingConfigExperimentOrBuilder * *
      * The fully qualified resource name of the serving config
-     * [VariantArm.serving_config_id][] responsible for generating the search
-     * response. For example:
+     * [Experiment.VariantArm.serving_config_id][] responsible for generating
+     * the search response. For example:
      * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
      * 
* @@ -241,8 +241,8 @@ public com.google.protobuf.ByteString getOriginalServingConfigBytes() { * *
      * The fully qualified resource name of the serving config
-     * [VariantArm.serving_config_id][] responsible for generating the search
-     * response. For example:
+     * [Experiment.VariantArm.serving_config_id][] responsible for generating
+     * the search response. For example:
      * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
      * 
* @@ -267,8 +267,8 @@ public java.lang.String getExperimentServingConfig() { * *
      * The fully qualified resource name of the serving config
-     * [VariantArm.serving_config_id][] responsible for generating the search
-     * response. For example:
+     * [Experiment.VariantArm.serving_config_id][] responsible for generating
+     * the search response. For example:
      * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
      * 
* @@ -799,8 +799,8 @@ public Builder setOriginalServingConfigBytes(com.google.protobuf.ByteString valu * *
        * The fully qualified resource name of the serving config
-       * [VariantArm.serving_config_id][] responsible for generating the search
-       * response. For example:
+       * [Experiment.VariantArm.serving_config_id][] responsible for generating
+       * the search response. For example:
        * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        * 
* @@ -825,8 +825,8 @@ public java.lang.String getExperimentServingConfig() { * *
        * The fully qualified resource name of the serving config
-       * [VariantArm.serving_config_id][] responsible for generating the search
-       * response. For example:
+       * [Experiment.VariantArm.serving_config_id][] responsible for generating
+       * the search response. For example:
        * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        * 
* @@ -851,8 +851,8 @@ public com.google.protobuf.ByteString getExperimentServingConfigBytes() { * *
        * The fully qualified resource name of the serving config
-       * [VariantArm.serving_config_id][] responsible for generating the search
-       * response. For example:
+       * [Experiment.VariantArm.serving_config_id][] responsible for generating
+       * the search response. For example:
        * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        * 
* @@ -876,8 +876,8 @@ public Builder setExperimentServingConfig(java.lang.String value) { * *
        * The fully qualified resource name of the serving config
-       * [VariantArm.serving_config_id][] responsible for generating the search
-       * response. For example:
+       * [Experiment.VariantArm.serving_config_id][] responsible for generating
+       * the search response. For example:
        * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        * 
* @@ -897,8 +897,8 @@ public Builder clearExperimentServingConfig() { * *
        * The fully qualified resource name of the serving config
-       * [VariantArm.serving_config_id][] responsible for generating the search
-       * response. For example:
+       * [Experiment.VariantArm.serving_config_id][] responsible for generating
+       * the search response. For example:
        * `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        * 
* @@ -1346,7 +1346,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Metadata for active A/B testing [Experiments][].
+   * Metadata for active A/B testing [Experiment][].
    * 
* * Protobuf type {@code google.cloud.retail.v2beta.ExperimentInfo} diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadata.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadata.java index ccfcc05e8f18..76eb15bc464f 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadata.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadata.java @@ -211,7 +211,7 @@ public long getFailureCount() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=330 + * google/cloud/retail/v2beta/import_config.proto;l=336 * @return The requestId. */ @java.lang.Override @@ -237,7 +237,7 @@ public java.lang.String getRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=330 + * google/cloud/retail/v2beta/import_config.proto;l=336 * @return The bytes for requestId. */ @java.lang.Override @@ -1295,7 +1295,7 @@ public Builder clearFailureCount() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=330 + * google/cloud/retail/v2beta/import_config.proto;l=336 * @return The requestId. */ @java.lang.Deprecated @@ -1320,7 +1320,7 @@ public java.lang.String getRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=330 + * google/cloud/retail/v2beta/import_config.proto;l=336 * @return The bytes for requestId. */ @java.lang.Deprecated @@ -1345,7 +1345,7 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=330 + * google/cloud/retail/v2beta/import_config.proto;l=336 * @param value The requestId to set. * @return This builder for chaining. */ @@ -1369,7 +1369,7 @@ public Builder setRequestId(java.lang.String value) { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=330 + * google/cloud/retail/v2beta/import_config.proto;l=336 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1389,7 +1389,7 @@ public Builder clearRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=330 + * google/cloud/retail/v2beta/import_config.proto;l=336 * @param value The bytes for requestId to set. * @return This builder for chaining. */ diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadataOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadataOrBuilder.java index 6e555154c5d9..c6c8c266a248 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadataOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadataOrBuilder.java @@ -133,7 +133,7 @@ public interface ImportMetadataOrBuilder * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=330 + * google/cloud/retail/v2beta/import_config.proto;l=336 * @return The requestId. */ @java.lang.Deprecated @@ -148,7 +148,7 @@ public interface ImportMetadataOrBuilder * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=330 + * google/cloud/retail/v2beta/import_config.proto;l=336 * @return The bytes for requestId. */ @java.lang.Deprecated diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequest.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequest.java index 342feb8b5cc6..7127b2a3405c 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequest.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequest.java @@ -465,7 +465,8 @@ public com.google.cloud.retail.v2beta.ImportErrorsConfigOrBuilder getErrorsConfi * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -481,7 +482,8 @@ public boolean hasUpdateMask() { * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -497,7 +499,8 @@ public com.google.protobuf.FieldMask getUpdateMask() { * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -570,9 +573,14 @@ public int getReconciliationModeValue() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -603,9 +611,14 @@ public java.lang.String getNotificationPubsubTopic() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -1814,7 +1827,8 @@ public com.google.cloud.retail.v2beta.ImportErrorsConfigOrBuilder getErrorsConfi * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1829,7 +1843,8 @@ public boolean hasUpdateMask() { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1850,7 +1865,8 @@ public com.google.protobuf.FieldMask getUpdateMask() { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1873,7 +1889,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1893,7 +1910,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1921,7 +1939,8 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1941,7 +1960,8 @@ public Builder clearUpdateMask() { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1956,7 +1976,8 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1975,7 +1996,8 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * *
      * Indicates which fields in the provided imported `products` to update. If
-     * not set, all fields are updated.
+     * not set, all fields are updated. If provided, only the existing product
+     * fields are updated. Missing products will not be created.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -2125,9 +2147,14 @@ public Builder clearReconciliationMode() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -2157,9 +2184,14 @@ public java.lang.String getNotificationPubsubTopic() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -2189,9 +2221,14 @@ public com.google.protobuf.ByteString getNotificationPubsubTopicBytes() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -2220,9 +2257,14 @@ public Builder setNotificationPubsubTopic(java.lang.String value) { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -2247,9 +2289,14 @@ public Builder clearNotificationPubsubTopic() { * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequestOrBuilder.java index 4c1a47f37c7f..7cc27060c7d0 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequestOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequestOrBuilder.java @@ -173,7 +173,8 @@ public interface ImportProductsRequestOrBuilder * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -186,7 +187,8 @@ public interface ImportProductsRequestOrBuilder * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -199,7 +201,8 @@ public interface ImportProductsRequestOrBuilder * *
    * Indicates which fields in the provided imported `products` to update. If
-   * not set, all fields are updated.
+   * not set, all fields are updated. If provided, only the existing product
+   * fields are updated. Missing products will not be created.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -251,9 +254,14 @@ public interface ImportProductsRequestOrBuilder * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; @@ -273,9 +281,14 @@ public interface ImportProductsRequestOrBuilder * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has * to be within the same project as * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent]. - * Make sure that `service-<project - * number>@gcp-sa-retail.iam.gserviceaccount.com` has the - * `pubsub.topics.publish` IAM permission on the topic. + * Make sure that both + * `cloud-retail-customer-data-access@system.gserviceaccount.com` and + * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com` + * have the `pubsub.topics.publish` IAM permission on the topic. + * + * Only supported when + * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode] + * is set to `FULL`. * * * string notification_pubsub_topic = 7; diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLink.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLink.java index a20b6c5529a6..3e87a2b55a73 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLink.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLink.java @@ -24,8 +24,8 @@ * *
  * Represents a link between a Merchant Center account and a branch.
- * Once a link is established, products from the linked merchant center account
- * will be streamed to the linked branch.
+ * After a link is established, products from the linked Merchant Center account
+ * are streamed to the linked branch.
  * 
* * Protobuf type {@code google.cloud.retail.v2beta.MerchantCenterLink} @@ -75,7 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The linked [Merchant center account
+   * Required. The linked [Merchant Center account
    * ID](https://developers.google.com/shopping-content/guides/accountstatuses).
    * The account must be a standalone account or a sub-account of a MCA.
    * 
@@ -102,7 +102,7 @@ public long getMerchantCenterAccountId() { * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; @@ -130,7 +130,7 @@ public java.lang.String getBranchId() { * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; @@ -666,8 +666,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * Represents a link between a Merchant Center account and a branch.
-   * Once a link is established, products from the linked merchant center account
-   * will be streamed to the linked branch.
+   * After a link is established, products from the linked Merchant Center account
+   * are streamed to the linked branch.
    * 
* * Protobuf type {@code google.cloud.retail.v2beta.MerchantCenterLink} @@ -978,7 +978,7 @@ public Builder mergeFrom( * * *
-     * Required. The linked [Merchant center account
+     * Required. The linked [Merchant Center account
      * ID](https://developers.google.com/shopping-content/guides/accountstatuses).
      * The account must be a standalone account or a sub-account of a MCA.
      * 
@@ -995,7 +995,7 @@ public long getMerchantCenterAccountId() { * * *
-     * Required. The linked [Merchant center account
+     * Required. The linked [Merchant Center account
      * ID](https://developers.google.com/shopping-content/guides/accountstatuses).
      * The account must be a standalone account or a sub-account of a MCA.
      * 
@@ -1016,7 +1016,7 @@ public Builder setMerchantCenterAccountId(long value) { * * *
-     * Required. The linked [Merchant center account
+     * Required. The linked [Merchant Center account
      * ID](https://developers.google.com/shopping-content/guides/accountstatuses).
      * The account must be a standalone account or a sub-account of a MCA.
      * 
@@ -1042,7 +1042,7 @@ public Builder clearMerchantCenterAccountId() { * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; @@ -1069,7 +1069,7 @@ public java.lang.String getBranchId() { * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; @@ -1096,7 +1096,7 @@ public com.google.protobuf.ByteString getBranchIdBytes() { * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; @@ -1122,7 +1122,7 @@ public Builder setBranchId(java.lang.String value) { * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; @@ -1144,7 +1144,7 @@ public Builder clearBranchId() { * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLinkOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLinkOrBuilder.java index c53e9ce60043..30237e5ad4d1 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLinkOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLinkOrBuilder.java @@ -28,7 +28,7 @@ public interface MerchantCenterLinkOrBuilder * * *
-   * Required. The linked [Merchant center account
+   * Required. The linked [Merchant Center account
    * ID](https://developers.google.com/shopping-content/guides/accountstatuses).
    * The account must be a standalone account or a sub-account of a MCA.
    * 
@@ -48,7 +48,7 @@ public interface MerchantCenterLinkOrBuilder * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; @@ -65,7 +65,7 @@ public interface MerchantCenterLinkOrBuilder * empty value will use the currently configured default branch. However, * changing the default branch later on won't change the linked branch here. * - * A single branch ID can only have one linked merchant center account ID. + * A single branch ID can only have one linked Merchant Center account ID. * * * string branch_id = 2; diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Model.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Model.java index 72138a10505b..7e337bb447d6 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Model.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Model.java @@ -774,6 +774,174 @@ private DataState(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.Model.DataState) } + /** + * + * + *
+   * Use single or multiple context products for recommendations.
+   * 
+ * + * Protobuf enum {@code google.cloud.retail.v2beta.Model.ContextProductsType} + */ + public enum ContextProductsType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified default value, should never be explicitly set.
+     * Defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2beta.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * CONTEXT_PRODUCTS_TYPE_UNSPECIFIED = 0; + */ + CONTEXT_PRODUCTS_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Use only a single product as context for the recommendation. Typically
+     * used on pages like add-to-cart or product details.
+     * 
+ * + * SINGLE_CONTEXT_PRODUCT = 1; + */ + SINGLE_CONTEXT_PRODUCT(1), + /** + * + * + *
+     * Use one or multiple products as context for the recommendation. Typically
+     * used on shopping cart pages.
+     * 
+ * + * MULTIPLE_CONTEXT_PRODUCTS = 2; + */ + MULTIPLE_CONTEXT_PRODUCTS(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified default value, should never be explicitly set.
+     * Defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2beta.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * CONTEXT_PRODUCTS_TYPE_UNSPECIFIED = 0; + */ + public static final int CONTEXT_PRODUCTS_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Use only a single product as context for the recommendation. Typically
+     * used on pages like add-to-cart or product details.
+     * 
+ * + * SINGLE_CONTEXT_PRODUCT = 1; + */ + public static final int SINGLE_CONTEXT_PRODUCT_VALUE = 1; + /** + * + * + *
+     * Use one or multiple products as context for the recommendation. Typically
+     * used on shopping cart pages.
+     * 
+ * + * MULTIPLE_CONTEXT_PRODUCTS = 2; + */ + public static final int MULTIPLE_CONTEXT_PRODUCTS_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 ContextProductsType 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 ContextProductsType forNumber(int value) { + switch (value) { + case 0: + return CONTEXT_PRODUCTS_TYPE_UNSPECIFIED; + case 1: + return SINGLE_CONTEXT_PRODUCT; + case 2: + return MULTIPLE_CONTEXT_PRODUCTS; + 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 ContextProductsType findValueByNumber(int number) { + return ContextProductsType.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2beta.Model.getDescriptor().getEnumTypes().get(4); + } + + private static final ContextProductsType[] VALUES = values(); + + public static ContextProductsType 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 ContextProductsType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.Model.ContextProductsType) + } + public interface ServingConfigListOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.Model.ServingConfigList) @@ -1401,112 +1569,1718 @@ public com.google.protobuf.ByteString getServingConfigIdsBytes(int index) { * `PAGE_OPTIMIZATION`. * * - * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The servingConfigIds to set. + * @return This builder for chaining. + */ + public Builder setServingConfigIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingConfigIdsIsMutable(); + servingConfigIds_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The servingConfigIds to add. + * @return This builder for chaining. + */ + public Builder addServingConfigIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingConfigIdsIsMutable(); + servingConfigIds_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The servingConfigIds to add. + * @return This builder for chaining. + */ + public Builder addAllServingConfigIds(java.lang.Iterable values) { + ensureServingConfigIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, servingConfigIds_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearServingConfigIds() { + servingConfigIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the servingConfigIds to add. + * @return This builder for chaining. + */ + public Builder addServingConfigIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureServingConfigIdsIsMutable(); + servingConfigIds_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.Model.ServingConfigList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.Model.ServingConfigList) + private static final com.google.cloud.retail.v2beta.Model.ServingConfigList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.Model.ServingConfigList(); + } + + public static com.google.cloud.retail.v2beta.Model.ServingConfigList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServingConfigList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2beta.Model.ServingConfigList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FrequentlyBoughtTogetherFeaturesConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Specifies the context of the model when it is used in predict
+     * requests. Can only be set for the `frequently-bought-together` type. If
+     * it isn't specified, it defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2beta.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for contextProductsType. + */ + int getContextProductsTypeValue(); + /** + * + * + *
+     * Optional. Specifies the context of the model when it is used in predict
+     * requests. Can only be set for the `frequently-bought-together` type. If
+     * it isn't specified, it defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2beta.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The contextProductsType. + */ + com.google.cloud.retail.v2beta.Model.ContextProductsType getContextProductsType(); + } + /** + * + * + *
+   * Additional configs for the frequently-bought-together model type.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig} + */ + public static final class FrequentlyBoughtTogetherFeaturesConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig) + FrequentlyBoughtTogetherFeaturesConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use FrequentlyBoughtTogetherFeaturesConfig.newBuilder() to construct. + private FrequentlyBoughtTogetherFeaturesConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FrequentlyBoughtTogetherFeaturesConfig() { + contextProductsType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FrequentlyBoughtTogetherFeaturesConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_FrequentlyBoughtTogetherFeaturesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig.class, + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder + .class); + } + + public static final int CONTEXT_PRODUCTS_TYPE_FIELD_NUMBER = 2; + private int contextProductsType_ = 0; + /** + * + * + *
+     * Optional. Specifies the context of the model when it is used in predict
+     * requests. Can only be set for the `frequently-bought-together` type. If
+     * it isn't specified, it defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2beta.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for contextProductsType. + */ + @java.lang.Override + public int getContextProductsTypeValue() { + return contextProductsType_; + } + /** + * + * + *
+     * Optional. Specifies the context of the model when it is used in predict
+     * requests. Can only be set for the `frequently-bought-together` type. If
+     * it isn't specified, it defaults to
+     * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2beta.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The contextProductsType. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.ContextProductsType getContextProductsType() { + com.google.cloud.retail.v2beta.Model.ContextProductsType result = + com.google.cloud.retail.v2beta.Model.ContextProductsType.forNumber(contextProductsType_); + return result == null + ? com.google.cloud.retail.v2beta.Model.ContextProductsType.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 (contextProductsType_ + != com.google.cloud.retail.v2beta.Model.ContextProductsType + .CONTEXT_PRODUCTS_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, contextProductsType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (contextProductsType_ + != com.google.cloud.retail.v2beta.Model.ContextProductsType + .CONTEXT_PRODUCTS_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, contextProductsType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig other = + (com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig) obj; + + if (contextProductsType_ != other.contextProductsType_) 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_PRODUCTS_TYPE_FIELD_NUMBER; + hash = (53 * hash) + contextProductsType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Additional configs for the frequently-bought-together model type.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig) + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_FrequentlyBoughtTogetherFeaturesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig.class, + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + contextProductsType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig build() { + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + buildPartial() { + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig result = + new com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextProductsType_ = contextProductsType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig) { + return mergeFrom( + (com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig other) { + if (other + == com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance()) return this; + if (other.contextProductsType_ != 0) { + setContextProductsTypeValue(other.getContextProductsTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: + { + contextProductsType_ = input.readEnum(); + bitField0_ |= 0x00000001; + 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 contextProductsType_ = 0; + /** + * + * + *
+       * Optional. Specifies the context of the model when it is used in predict
+       * requests. Can only be set for the `frequently-bought-together` type. If
+       * it isn't specified, it defaults to
+       * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2beta.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+       * 
+ * + * + * .google.cloud.retail.v2beta.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for contextProductsType. + */ + @java.lang.Override + public int getContextProductsTypeValue() { + return contextProductsType_; + } + /** + * + * + *
+       * Optional. Specifies the context of the model when it is used in predict
+       * requests. Can only be set for the `frequently-bought-together` type. If
+       * it isn't specified, it defaults to
+       * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2beta.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+       * 
+ * + * + * .google.cloud.retail.v2beta.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for contextProductsType to set. + * @return This builder for chaining. + */ + public Builder setContextProductsTypeValue(int value) { + contextProductsType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Specifies the context of the model when it is used in predict
+       * requests. Can only be set for the `frequently-bought-together` type. If
+       * it isn't specified, it defaults to
+       * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2beta.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+       * 
+ * + * + * .google.cloud.retail.v2beta.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The contextProductsType. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.ContextProductsType getContextProductsType() { + com.google.cloud.retail.v2beta.Model.ContextProductsType result = + com.google.cloud.retail.v2beta.Model.ContextProductsType.forNumber( + contextProductsType_); + return result == null + ? com.google.cloud.retail.v2beta.Model.ContextProductsType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Optional. Specifies the context of the model when it is used in predict
+       * requests. Can only be set for the `frequently-bought-together` type. If
+       * it isn't specified, it defaults to
+       * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2beta.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+       * 
+ * + * + * .google.cloud.retail.v2beta.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The contextProductsType to set. + * @return This builder for chaining. + */ + public Builder setContextProductsType( + com.google.cloud.retail.v2beta.Model.ContextProductsType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + contextProductsType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Specifies the context of the model when it is used in predict
+       * requests. Can only be set for the `frequently-bought-together` type. If
+       * it isn't specified, it defaults to
+       * [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2beta.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS].
+       * 
+ * + * + * .google.cloud.retail.v2beta.Model.ContextProductsType context_products_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearContextProductsType() { + bitField0_ = (bitField0_ & ~0x00000001); + contextProductsType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig) + private static final com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig(); + } + + public static com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FrequentlyBoughtTogetherFeaturesConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ModelFeaturesConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.Model.ModelFeaturesConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return Whether the frequentlyBoughtTogetherConfig field is set. + */ + boolean hasFrequentlyBoughtTogetherConfig(); + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return The frequentlyBoughtTogetherConfig. + */ + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + getFrequentlyBoughtTogetherConfig(); + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder + getFrequentlyBoughtTogetherConfigOrBuilder(); + + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.TypeDedicatedConfigCase + getTypeDedicatedConfigCase(); + } + /** + * + * + *
+   * Additional model features config.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.Model.ModelFeaturesConfig} + */ + public static final class ModelFeaturesConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.Model.ModelFeaturesConfig) + ModelFeaturesConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ModelFeaturesConfig.newBuilder() to construct. + private ModelFeaturesConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ModelFeaturesConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ModelFeaturesConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_ModelFeaturesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_ModelFeaturesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.class, + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.Builder.class); + } + + private int typeDedicatedConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object typeDedicatedConfig_; + + public enum TypeDedicatedConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FREQUENTLY_BOUGHT_TOGETHER_CONFIG(1), + TYPEDEDICATEDCONFIG_NOT_SET(0); + private final int value; + + private TypeDedicatedConfigCase(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 TypeDedicatedConfigCase valueOf(int value) { + return forNumber(value); + } + + public static TypeDedicatedConfigCase forNumber(int value) { + switch (value) { + case 1: + return FREQUENTLY_BOUGHT_TOGETHER_CONFIG; + case 0: + return TYPEDEDICATEDCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeDedicatedConfigCase getTypeDedicatedConfigCase() { + return TypeDedicatedConfigCase.forNumber(typeDedicatedConfigCase_); + } + + public static final int FREQUENTLY_BOUGHT_TOGETHER_CONFIG_FIELD_NUMBER = 1; + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return Whether the frequentlyBoughtTogetherConfig field is set. + */ + @java.lang.Override + public boolean hasFrequentlyBoughtTogetherConfig() { + return typeDedicatedConfigCase_ == 1; + } + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return The frequentlyBoughtTogetherConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + getFrequentlyBoughtTogetherConfig() { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_; + } + return com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } + /** + * + * + *
+     * Additional configs for frequently-bought-together models.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder + getFrequentlyBoughtTogetherConfigOrBuilder() { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_; + } + return com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + .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 (typeDedicatedConfigCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeDedicatedConfigCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.retail.v2beta.Model.ModelFeaturesConfig)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig other = + (com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig) obj; + + if (!getTypeDedicatedConfigCase().equals(other.getTypeDedicatedConfigCase())) return false; + switch (typeDedicatedConfigCase_) { + case 1: + if (!getFrequentlyBoughtTogetherConfig() + .equals(other.getFrequentlyBoughtTogetherConfig())) 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 (typeDedicatedConfigCase_) { + case 1: + hash = (37 * hash) + FREQUENTLY_BOUGHT_TOGETHER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getFrequentlyBoughtTogetherConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2beta.Model.ModelFeaturesConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Additional model features config.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.Model.ModelFeaturesConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.Model.ModelFeaturesConfig) + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_ModelFeaturesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_ModelFeaturesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.class, + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (frequentlyBoughtTogetherConfigBuilder_ != null) { + frequentlyBoughtTogetherConfigBuilder_.clear(); + } + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_ModelFeaturesConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig build() { + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig buildPartial() { + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig result = + new com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig result) { + result.typeDedicatedConfigCase_ = typeDedicatedConfigCase_; + result.typeDedicatedConfig_ = this.typeDedicatedConfig_; + if (typeDedicatedConfigCase_ == 1 && frequentlyBoughtTogetherConfigBuilder_ != null) { + result.typeDedicatedConfig_ = frequentlyBoughtTogetherConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig) { + return mergeFrom((com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig other) { + if (other == com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.getDefaultInstance()) + return this; + switch (other.getTypeDedicatedConfigCase()) { + case FREQUENTLY_BOUGHT_TOGETHER_CONFIG: + { + mergeFrequentlyBoughtTogetherConfig(other.getFrequentlyBoughtTogetherConfig()); + break; + } + case TYPEDEDICATEDCONFIG_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( + getFrequentlyBoughtTogetherConfigFieldBuilder().getBuilder(), + extensionRegistry); + typeDedicatedConfigCase_ = 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 typeDedicatedConfigCase_ = 0; + private java.lang.Object typeDedicatedConfig_; + + public TypeDedicatedConfigCase getTypeDedicatedConfigCase() { + return TypeDedicatedConfigCase.forNumber(typeDedicatedConfigCase_); + } + + public Builder clearTypeDedicatedConfig() { + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig, + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder, + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder> + frequentlyBoughtTogetherConfigBuilder_; + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return Whether the frequentlyBoughtTogetherConfig field is set. + */ + @java.lang.Override + public boolean hasFrequentlyBoughtTogetherConfig() { + return typeDedicatedConfigCase_ == 1; + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + * + * @return The frequentlyBoughtTogetherConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + getFrequentlyBoughtTogetherConfig() { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_; + } + return com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } else { + if (typeDedicatedConfigCase_ == 1) { + return frequentlyBoughtTogetherConfigBuilder_.getMessage(); + } + return com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + public Builder setFrequentlyBoughtTogetherConfig( + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig value) { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeDedicatedConfig_ = value; + onChanged(); + } else { + frequentlyBoughtTogetherConfigBuilder_.setMessage(value); + } + typeDedicatedConfigCase_ = 1; + return this; + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; + * + */ + public Builder setFrequentlyBoughtTogetherConfig( + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder + builderForValue) { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + typeDedicatedConfig_ = builderForValue.build(); + onChanged(); + } else { + frequentlyBoughtTogetherConfigBuilder_.setMessage(builderForValue.build()); + } + typeDedicatedConfigCase_ = 1; + return this; + } + /** + * + * + *
+       * Additional configs for frequently-bought-together models.
+       * 
+ * + * + * .google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; * - * - * @param index The index to set the value at. - * @param value The servingConfigIds to set. - * @return This builder for chaining. */ - public Builder setServingConfigIds(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder mergeFrequentlyBoughtTogetherConfig( + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig value) { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + if (typeDedicatedConfigCase_ == 1 + && typeDedicatedConfig_ + != com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance()) { + typeDedicatedConfig_ = + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + .newBuilder( + (com.google.cloud.retail.v2beta.Model + .FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + typeDedicatedConfig_ = value; + } + onChanged(); + } else { + if (typeDedicatedConfigCase_ == 1) { + frequentlyBoughtTogetherConfigBuilder_.mergeFrom(value); + } else { + frequentlyBoughtTogetherConfigBuilder_.setMessage(value); + } } - ensureServingConfigIdsIsMutable(); - servingConfigIds_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); + typeDedicatedConfigCase_ = 1; return this; } /** * * *
-       * Optional. A set of valid serving configs that may be used for
-       * `PAGE_OPTIMIZATION`.
+       * Additional configs for frequently-bought-together models.
        * 
* - * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; * - * - * @param value The servingConfigIds to add. - * @return This builder for chaining. */ - public Builder addServingConfigIds(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearFrequentlyBoughtTogetherConfig() { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + if (typeDedicatedConfigCase_ == 1) { + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + onChanged(); + } + } else { + if (typeDedicatedConfigCase_ == 1) { + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + } + frequentlyBoughtTogetherConfigBuilder_.clear(); } - ensureServingConfigIdsIsMutable(); - servingConfigIds_.add(value); - bitField0_ |= 0x00000001; - onChanged(); return this; } /** * * *
-       * Optional. A set of valid serving configs that may be used for
-       * `PAGE_OPTIMIZATION`.
+       * Additional configs for frequently-bought-together models.
        * 
* - * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; * - * - * @param values The servingConfigIds to add. - * @return This builder for chaining. */ - public Builder addAllServingConfigIds(java.lang.Iterable values) { - ensureServingConfigIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, servingConfigIds_); - bitField0_ |= 0x00000001; - onChanged(); - return this; + public com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder + getFrequentlyBoughtTogetherConfigBuilder() { + return getFrequentlyBoughtTogetherConfigFieldBuilder().getBuilder(); } /** * * *
-       * Optional. A set of valid serving configs that may be used for
-       * `PAGE_OPTIMIZATION`.
+       * Additional configs for frequently-bought-together models.
        * 
* - * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; * - * - * @return This builder for chaining. */ - public Builder clearServingConfigIds() { - servingConfigIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - ; - onChanged(); - return this; + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder + getFrequentlyBoughtTogetherConfigOrBuilder() { + if ((typeDedicatedConfigCase_ == 1) && (frequentlyBoughtTogetherConfigBuilder_ != null)) { + return frequentlyBoughtTogetherConfigBuilder_.getMessageOrBuilder(); + } else { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_; + } + return com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } } /** * * *
-       * Optional. A set of valid serving configs that may be used for
-       * `PAGE_OPTIMIZATION`.
+       * Additional configs for frequently-bought-together models.
        * 
* - * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = 1; * - * - * @param value The bytes of the servingConfigIds to add. - * @return This builder for chaining. */ - public Builder addServingConfigIdsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig, + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig.Builder, + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfigOrBuilder> + getFrequentlyBoughtTogetherConfigFieldBuilder() { + if (frequentlyBoughtTogetherConfigBuilder_ == null) { + if (!(typeDedicatedConfigCase_ == 1)) { + typeDedicatedConfig_ = + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + .getDefaultInstance(); + } + frequentlyBoughtTogetherConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig, + com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig + .Builder, + com.google.cloud.retail.v2beta.Model + .FrequentlyBoughtTogetherFeaturesConfigOrBuilder>( + (com.google.cloud.retail.v2beta.Model.FrequentlyBoughtTogetherFeaturesConfig) + typeDedicatedConfig_, + getParentForChildren(), + isClean()); + typeDedicatedConfig_ = null; } - checkByteStringIsUtf8(value); - ensureServingConfigIdsIsMutable(); - servingConfigIds_.add(value); - bitField0_ |= 0x00000001; + typeDedicatedConfigCase_ = 1; onChanged(); - return this; + return frequentlyBoughtTogetherConfigBuilder_; } @java.lang.Override @@ -1521,24 +3295,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.Model.ServingConfigList) + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.Model.ModelFeaturesConfig) } - // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.Model.ServingConfigList) - private static final com.google.cloud.retail.v2beta.Model.ServingConfigList DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.Model.ModelFeaturesConfig) + private static final com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.Model.ServingConfigList(); + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig(); } - public static com.google.cloud.retail.v2beta.Model.ServingConfigList getDefaultInstance() { + public static com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig 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 ServingConfigList parsePartialFrom( + public ModelFeaturesConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1558,17 +3332,17 @@ public ServingConfigList 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.retail.v2beta.Model.ServingConfigList getDefaultInstanceForType() { + public com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } @@ -2415,6 +4189,63 @@ public com.google.cloud.retail.v2beta.Model.ServingConfigList getServingConfigLi return servingConfigLists_.get(index); } + public static final int MODEL_FEATURES_CONFIG_FIELD_NUMBER = 22; + private com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig modelFeaturesConfig_; + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the modelFeaturesConfig field is set. + */ + @java.lang.Override + public boolean hasModelFeaturesConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The modelFeaturesConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig getModelFeaturesConfig() { + return modelFeaturesConfig_ == null + ? com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.getDefaultInstance() + : modelFeaturesConfig_; + } + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.ModelFeaturesConfigOrBuilder + getModelFeaturesConfigOrBuilder() { + return modelFeaturesConfig_ == null + ? com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.getDefaultInstance() + : modelFeaturesConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2482,6 +4313,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < servingConfigLists_.size(); i++) { output.writeMessage(19, servingConfigLists_.get(i)); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(22, getModelFeaturesConfig()); + } getUnknownFields().writeTo(output); } @@ -2545,6 +4379,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, servingConfigLists_.get(i)); } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(22, getModelFeaturesConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2583,6 +4421,10 @@ public boolean equals(final java.lang.Object obj) { if (dataState_ != other.dataState_) return false; if (filteringOption_ != other.filteringOption_) return false; if (!getServingConfigListsList().equals(other.getServingConfigListsList())) return false; + if (hasModelFeaturesConfig() != other.hasModelFeaturesConfig()) return false; + if (hasModelFeaturesConfig()) { + if (!getModelFeaturesConfig().equals(other.getModelFeaturesConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2630,6 +4472,10 @@ public int hashCode() { hash = (37 * hash) + SERVING_CONFIG_LISTS_FIELD_NUMBER; hash = (53 * hash) + getServingConfigListsList().hashCode(); } + if (hasModelFeaturesConfig()) { + hash = (37 * hash) + MODEL_FEATURES_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getModelFeaturesConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2777,6 +4623,7 @@ private void maybeForceBuilderInitialization() { getUpdateTimeFieldBuilder(); getLastTuneTimeFieldBuilder(); getServingConfigListsFieldBuilder(); + getModelFeaturesConfigFieldBuilder(); } } @@ -2816,6 +4663,11 @@ public Builder clear() { servingConfigListsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00002000); + modelFeaturesConfig_ = null; + if (modelFeaturesConfigBuilder_ != null) { + modelFeaturesConfigBuilder_.dispose(); + modelFeaturesConfigBuilder_ = null; + } return this; } @@ -2908,6 +4760,13 @@ private void buildPartial0(com.google.cloud.retail.v2beta.Model result) { if (((from_bitField0_ & 0x00001000) != 0)) { result.filteringOption_ = filteringOption_; } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.modelFeaturesConfig_ = + modelFeaturesConfigBuilder_ == null + ? modelFeaturesConfig_ + : modelFeaturesConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -3032,6 +4891,9 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Model other) { } } } + if (other.hasModelFeaturesConfig()) { + mergeModelFeaturesConfig(other.getModelFeaturesConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3150,6 +5012,13 @@ public Builder mergeFrom( } break; } // case 154 + case 178: + { + input.readMessage( + getModelFeaturesConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 178 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5595,6 +7464,215 @@ public Builder removeServingConfigLists(int index) { return servingConfigListsBuilder_; } + private com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig modelFeaturesConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig, + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.Builder, + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfigOrBuilder> + modelFeaturesConfigBuilder_; + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the modelFeaturesConfig field is set. + */ + public boolean hasModelFeaturesConfig() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The modelFeaturesConfig. + */ + public com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig getModelFeaturesConfig() { + if (modelFeaturesConfigBuilder_ == null) { + return modelFeaturesConfig_ == null + ? com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.getDefaultInstance() + : modelFeaturesConfig_; + } else { + return modelFeaturesConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setModelFeaturesConfig( + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig value) { + if (modelFeaturesConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelFeaturesConfig_ = value; + } else { + modelFeaturesConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setModelFeaturesConfig( + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.Builder builderForValue) { + if (modelFeaturesConfigBuilder_ == null) { + modelFeaturesConfig_ = builderForValue.build(); + } else { + modelFeaturesConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeModelFeaturesConfig( + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig value) { + if (modelFeaturesConfigBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && modelFeaturesConfig_ != null + && modelFeaturesConfig_ + != com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.getDefaultInstance()) { + getModelFeaturesConfigBuilder().mergeFrom(value); + } else { + modelFeaturesConfig_ = value; + } + } else { + modelFeaturesConfigBuilder_.mergeFrom(value); + } + if (modelFeaturesConfig_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearModelFeaturesConfig() { + bitField0_ = (bitField0_ & ~0x00004000); + modelFeaturesConfig_ = null; + if (modelFeaturesConfigBuilder_ != null) { + modelFeaturesConfigBuilder_.dispose(); + modelFeaturesConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.Builder + getModelFeaturesConfigBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getModelFeaturesConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.retail.v2beta.Model.ModelFeaturesConfigOrBuilder + getModelFeaturesConfigOrBuilder() { + if (modelFeaturesConfigBuilder_ != null) { + return modelFeaturesConfigBuilder_.getMessageOrBuilder(); + } else { + return modelFeaturesConfig_ == null + ? com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.getDefaultInstance() + : modelFeaturesConfig_; + } + } + /** + * + * + *
+     * Optional. Additional model features config.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig, + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.Builder, + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfigOrBuilder> + getModelFeaturesConfigFieldBuilder() { + if (modelFeaturesConfigBuilder_ == null) { + modelFeaturesConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig, + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig.Builder, + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfigOrBuilder>( + getModelFeaturesConfig(), getParentForChildren(), isClean()); + modelFeaturesConfig_ = null; + } + return modelFeaturesConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelOrBuilder.java index e55b3299aa82..7589539e1aca 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelOrBuilder.java @@ -621,4 +621,46 @@ public interface ModelOrBuilder */ com.google.cloud.retail.v2beta.Model.ServingConfigListOrBuilder getServingConfigListsOrBuilder( int index); + + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the modelFeaturesConfig field is set. + */ + boolean hasModelFeaturesConfig(); + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The modelFeaturesConfig. + */ + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfig getModelFeaturesConfig(); + /** + * + * + *
+   * Optional. Additional model features config.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.ModelFeaturesConfig model_features_config = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.retail.v2beta.Model.ModelFeaturesConfigOrBuilder + getModelFeaturesConfigOrBuilder(); } diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelProto.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelProto.java index 55ab702d3db7..a1a09f59c4f1 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelProto.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelProto.java @@ -36,6 +36,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_Model_FrequentlyBoughtTogetherFeaturesConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_Model_ModelFeaturesConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_Model_ModelFeaturesConfig_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -50,7 +58,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/field_behavior.proto\032\031google/api/resour" + "ce.proto\032\'google/cloud/retail/v2beta/com" + "mon.proto\032\037google/protobuf/timestamp.pro" - + "to\"\272\n\n\005Model\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\031\n\014displ" + + "to\"\274\016\n\005Model\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\031\n\014displ" + "ay_name\030\002 \001(\tB\003\340A\002\022L\n\016training_state\030\003 \001" + "(\0162/.google.cloud.retail.v2beta.Model.Tr" + "ainingStateB\003\340A\001\022J\n\rserving_state\030\004 \001(\0162" @@ -70,25 +78,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".RecommendationsFilteringOptionB\003\340A\001\022V\n\024" + "serving_config_lists\030\023 \003(\01323.google.clou" + "d.retail.v2beta.Model.ServingConfigListB" - + "\003\340A\003\0324\n\021ServingConfigList\022\037\n\022serving_con" - + "fig_ids\030\001 \003(\tB\003\340A\001\"R\n\014ServingState\022\035\n\031SE" - + "RVING_STATE_UNSPECIFIED\020\000\022\014\n\010INACTIVE\020\001\022" - + "\n\n\006ACTIVE\020\002\022\t\n\005TUNED\020\003\"I\n\rTrainingState\022" - + "\036\n\032TRAINING_STATE_UNSPECIFIED\020\000\022\n\n\006PAUSE" - + "D\020\001\022\014\n\010TRAINING\020\002\"\220\001\n\023PeriodicTuningStat" - + "e\022%\n!PERIODIC_TUNING_STATE_UNSPECIFIED\020\000" - + "\022\034\n\030PERIODIC_TUNING_DISABLED\020\001\022\027\n\023ALL_TU" - + "NING_DISABLED\020\003\022\033\n\027PERIODIC_TUNING_ENABL" - + "ED\020\002\"D\n\tDataState\022\032\n\026DATA_STATE_UNSPECIF" - + "IED\020\000\022\013\n\007DATA_OK\020\001\022\016\n\nDATA_ERROR\020\002:k\352Ah\n" - + "\033retail.googleapis.com/Model\022Iprojects/{" - + "project}/locations/{location}/catalogs/{" - + "catalog}/models/{model}B\311\001\n\036com.google.c" - + "loud.retail.v2betaB\nModelProtoP\001Z6cloud." - + "google.com/go/retail/apiv2beta/retailpb;" - + "retailpb\242\002\006RETAIL\252\002\032Google.Cloud.Retail." - + "V2Beta\312\002\032Google\\Cloud\\Retail\\V2beta\352\002\035Go" - + "ogle::Cloud::Retail::V2betab\006proto3" + + "\003\340A\003\022Y\n\025model_features_config\030\026 \001(\01325.go" + + "ogle.cloud.retail.v2beta.Model.ModelFeat" + + "uresConfigB\003\340A\001\0324\n\021ServingConfigList\022\037\n\022" + + "serving_config_ids\030\001 \003(\tB\003\340A\001\032\203\001\n&Freque" + + "ntlyBoughtTogetherFeaturesConfig\022Y\n\025cont" + + "ext_products_type\030\002 \001(\01625.google.cloud.r" + + "etail.v2beta.Model.ContextProductsTypeB\003" + + "\340A\001\032\245\001\n\023ModelFeaturesConfig\022u\n!frequentl" + + "y_bought_together_config\030\001 \001(\0132H.google." + + "cloud.retail.v2beta.Model.FrequentlyBoug" + + "htTogetherFeaturesConfigH\000B\027\n\025type_dedic" + + "ated_config\"R\n\014ServingState\022\035\n\031SERVING_S" + + "TATE_UNSPECIFIED\020\000\022\014\n\010INACTIVE\020\001\022\n\n\006ACTI" + + "VE\020\002\022\t\n\005TUNED\020\003\"I\n\rTrainingState\022\036\n\032TRAI" + + "NING_STATE_UNSPECIFIED\020\000\022\n\n\006PAUSED\020\001\022\014\n\010" + + "TRAINING\020\002\"\220\001\n\023PeriodicTuningState\022%\n!PE" + + "RIODIC_TUNING_STATE_UNSPECIFIED\020\000\022\034\n\030PER" + + "IODIC_TUNING_DISABLED\020\001\022\027\n\023ALL_TUNING_DI" + + "SABLED\020\003\022\033\n\027PERIODIC_TUNING_ENABLED\020\002\"D\n" + + "\tDataState\022\032\n\026DATA_STATE_UNSPECIFIED\020\000\022\013" + + "\n\007DATA_OK\020\001\022\016\n\nDATA_ERROR\020\002\"w\n\023ContextPr" + + "oductsType\022%\n!CONTEXT_PRODUCTS_TYPE_UNSP" + + "ECIFIED\020\000\022\032\n\026SINGLE_CONTEXT_PRODUCT\020\001\022\035\n" + + "\031MULTIPLE_CONTEXT_PRODUCTS\020\002:k\352Ah\n\033retai" + + "l.googleapis.com/Model\022Iprojects/{projec" + + "t}/locations/{location}/catalogs/{catalo" + + "g}/models/{model}B\311\001\n\036com.google.cloud.r" + + "etail.v2betaB\nModelProtoP\001Z6cloud.google" + + ".com/go/retail/apiv2beta/retailpb;retail" + + "pb\242\002\006RETAIL\252\002\032Google.Cloud.Retail.V2Beta" + + "\312\002\032Google\\Cloud\\Retail\\V2beta\352\002\035Google::" + + "Cloud::Retail::V2betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -119,6 +140,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DataState", "FilteringOption", "ServingConfigLists", + "ModelFeaturesConfig", }); internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_descriptor = internal_static_google_cloud_retail_v2beta_Model_descriptor.getNestedTypes().get(0); @@ -128,6 +150,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ServingConfigIds", }); + internal_static_google_cloud_retail_v2beta_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor = + internal_static_google_cloud_retail_v2beta_Model_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_retail_v2beta_Model_FrequentlyBoughtTogetherFeaturesConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_Model_FrequentlyBoughtTogetherFeaturesConfig_descriptor, + new java.lang.String[] { + "ContextProductsType", + }); + internal_static_google_cloud_retail_v2beta_Model_ModelFeaturesConfig_descriptor = + internal_static_google_cloud_retail_v2beta_Model_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_retail_v2beta_Model_ModelFeaturesConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_Model_ModelFeaturesConfig_descriptor, + new java.lang.String[] { + "FrequentlyBoughtTogetherConfig", "TypeDedicatedConfig", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Product.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Product.java index 280723db98dd..7f599e57af28 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Product.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Product.java @@ -578,24 +578,22 @@ public ExpirationCase getExpirationCase() { * * *
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
-   * Note that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
-   * and ignored for
-   * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
-   * general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
-   * after [expire_time][google.cloud.retail.v2beta.Product.expire_time].
-   * However, the product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2beta.Product] is already expired
+   * when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2beta.Product] is not expired
+   * when it is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be
    * later than
@@ -619,24 +617,22 @@ public boolean hasExpireTime() {
    *
    *
    * 
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
-   * Note that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
-   * and ignored for
-   * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
-   * general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
-   * after [expire_time][google.cloud.retail.v2beta.Product.expire_time].
-   * However, the product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2beta.Product] is already expired
+   * when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2beta.Product] is not expired
+   * when it is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be
    * later than
@@ -663,24 +659,22 @@ public com.google.protobuf.Timestamp getExpireTime() {
    *
    *
    * 
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
-   * Note that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
-   * and ignored for
-   * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
-   * general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
-   * after [expire_time][google.cloud.retail.v2beta.Product.expire_time].
-   * However, the product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2beta.Product] is already expired
+   * when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2beta.Product] is not expired
+   * when it is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be
    * later than
@@ -1304,9 +1298,10 @@ public com.google.protobuf.ByteString getGtinBytes() {
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -1352,9 +1347,10 @@ public com.google.protobuf.ProtocolStringList getCategoriesList() {
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -1400,9 +1396,10 @@ public int getCategoriesCount() {
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -1449,9 +1446,10 @@ public java.lang.String getCategories(int index) {
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -1546,9 +1544,10 @@ public com.google.protobuf.ByteString getTitleBytes() {
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -1568,9 +1567,10 @@ public com.google.protobuf.ProtocolStringList getBrandsList() {
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -1590,9 +1590,10 @@ public int getBrandsCount() {
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -1613,9 +1614,10 @@ public java.lang.String getBrands(int index) {
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -5501,24 +5503,22 @@ public Builder clearExpiration() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2beta.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2beta.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2beta.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be
      * later than
@@ -5542,24 +5542,22 @@ public boolean hasExpireTime() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2beta.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2beta.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2beta.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be
      * later than
@@ -5593,24 +5591,22 @@ public com.google.protobuf.Timestamp getExpireTime() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2beta.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2beta.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2beta.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be
      * later than
@@ -5641,24 +5637,22 @@ public Builder setExpireTime(com.google.protobuf.Timestamp value) {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2beta.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2beta.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2beta.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be
      * later than
@@ -5686,24 +5680,22 @@ public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForVal
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2beta.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2beta.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2beta.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be
      * later than
@@ -5743,24 +5735,22 @@ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2beta.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2beta.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2beta.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be
      * later than
@@ -5794,24 +5784,22 @@ public Builder clearExpireTime() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2beta.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2beta.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2beta.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be
      * later than
@@ -5832,24 +5820,22 @@ public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2beta.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2beta.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2beta.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be
      * later than
@@ -5878,24 +5864,22 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
      *
      *
      * 
-     * The timestamp when this product becomes unavailable for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
-     * Note that this is only applicable to
-     * [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
-     * [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
-     * and ignored for
-     * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
-     * general, we suggest the users to delete the stale products explicitly,
-     * instead of using this field to determine staleness.
+     * Note that this field is applied in the following ways:
      *
-     * If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
-     * available for
-     * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
-     * after [expire_time][google.cloud.retail.v2beta.Product.expire_time].
-     * However, the product can still be retrieved by
-     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
-     * and
-     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+     * * If the [Product][google.cloud.retail.v2beta.Product] is already expired
+     * when it is uploaded, this product
+     *   is not indexed for search.
+     *
+     * * If the [Product][google.cloud.retail.v2beta.Product] is not expired
+     * when it is uploaded, only the
+     *   [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and
+     *   [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s
+     *   expireTime is respected, and
+     *   [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s
+     *   expireTime is not used.
+     *
+     * In general, we suggest the users to delete the stale
+     * products explicitly, instead of using this field to determine staleness.
      *
      * [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be
      * later than
@@ -7423,9 +7407,10 @@ private void ensureCategoriesIsMutable() {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7472,9 +7457,10 @@ public com.google.protobuf.ProtocolStringList getCategoriesList() {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7520,9 +7506,10 @@ public int getCategoriesCount() {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7569,9 +7556,10 @@ public java.lang.String getCategories(int index) {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7618,9 +7606,10 @@ public com.google.protobuf.ByteString getCategoriesBytes(int index) {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7675,9 +7664,10 @@ public Builder setCategories(int index, java.lang.String value) {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7731,9 +7721,10 @@ public Builder addCategories(java.lang.String value) {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7784,9 +7775,10 @@ public Builder addAllCategories(java.lang.Iterable values) {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -7836,9 +7828,10 @@ public Builder clearCategories() {
      * error is returned.
      *
      * At most 250 values are allowed per
-     * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-     * allowed. Each value must be a UTF-8 encoded string with a length limit of
-     * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+     * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+     * Google Cloud console. Empty values are not allowed. Each value must be a
+     * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+     * INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [google_product_category][mc_google_product_category]. Schema.org property
@@ -8021,9 +8014,10 @@ private void ensureBrandsIsMutable() {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8044,9 +8038,10 @@ public com.google.protobuf.ProtocolStringList getBrandsList() {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8066,9 +8061,10 @@ public int getBrandsCount() {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8089,9 +8085,10 @@ public java.lang.String getBrands(int index) {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8112,9 +8109,10 @@ public com.google.protobuf.ByteString getBrandsBytes(int index) {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8143,9 +8141,10 @@ public Builder setBrands(int index, java.lang.String value) {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8173,9 +8172,10 @@ public Builder addBrands(java.lang.String value) {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8200,9 +8200,10 @@ public Builder addAllBrands(java.lang.Iterable values) {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -8226,9 +8227,10 @@ public Builder clearBrands() {
      * 
      * The brands of the product.
      *
-     * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-     * string with a length limit of 1,000 characters. Otherwise, an
-     * INVALID_ARGUMENT error is returned.
+     * A maximum of 30 brands are allowed unless overridden through the Google
+     * Cloud console. Each
+     * brand must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
      *
      * Corresponding properties: Google Merchant Center property
      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductOrBuilder.java
index 0d32f2c745f2..b03b793fb459 100644
--- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductOrBuilder.java
+++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductOrBuilder.java
@@ -28,24 +28,22 @@ public interface ProductOrBuilder
    *
    *
    * 
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
-   * Note that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
-   * and ignored for
-   * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
-   * general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
-   * after [expire_time][google.cloud.retail.v2beta.Product.expire_time].
-   * However, the product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2beta.Product] is already expired
+   * when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2beta.Product] is not expired
+   * when it is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be
    * later than
@@ -66,24 +64,22 @@ public interface ProductOrBuilder
    *
    *
    * 
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
-   * Note that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
-   * and ignored for
-   * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
-   * general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
-   * after [expire_time][google.cloud.retail.v2beta.Product.expire_time].
-   * However, the product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2beta.Product] is already expired
+   * when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2beta.Product] is not expired
+   * when it is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be
    * later than
@@ -104,24 +100,22 @@ public interface ProductOrBuilder
    *
    *
    * 
-   * The timestamp when this product becomes unavailable for
-   * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
-   * Note that this is only applicable to
-   * [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
-   * [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
-   * and ignored for
-   * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
-   * general, we suggest the users to delete the stale products explicitly,
-   * instead of using this field to determine staleness.
+   * Note that this field is applied in the following ways:
    *
-   * If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
-   * available for
-   * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]
-   * after [expire_time][google.cloud.retail.v2beta.Product.expire_time].
-   * However, the product can still be retrieved by
-   * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
-   * and
-   * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
+   * * If the [Product][google.cloud.retail.v2beta.Product] is already expired
+   * when it is uploaded, this product
+   *   is not indexed for search.
+   *
+   * * If the [Product][google.cloud.retail.v2beta.Product] is not expired
+   * when it is uploaded, only the
+   *   [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and
+   *   [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s
+   *   expireTime is respected, and
+   *   [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s
+   *   expireTime is not used.
+   *
+   * In general, we suggest the users to delete the stale
+   * products explicitly, instead of using this field to determine staleness.
    *
    * [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be
    * later than
@@ -591,9 +585,10 @@ public interface ProductOrBuilder
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -637,9 +632,10 @@ public interface ProductOrBuilder
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -683,9 +679,10 @@ public interface ProductOrBuilder
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -730,9 +727,10 @@ public interface ProductOrBuilder
    * error is returned.
    *
    * At most 250 values are allowed per
-   * [Product][google.cloud.retail.v2beta.Product]. Empty values are not
-   * allowed. Each value must be a UTF-8 encoded string with a length limit of
-   * 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+   * [Product][google.cloud.retail.v2beta.Product] unless overridden through the
+   * Google Cloud console. Empty values are not allowed. Each value must be a
+   * UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
+   * INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [google_product_category][mc_google_product_category]. Schema.org property
@@ -794,9 +792,10 @@ public interface ProductOrBuilder
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -814,9 +813,10 @@ public interface ProductOrBuilder
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -834,9 +834,10 @@ public interface ProductOrBuilder
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -855,9 +856,10 @@ public interface ProductOrBuilder
    * 
    * The brands of the product.
    *
-   * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
-   * string with a length limit of 1,000 characters. Otherwise, an
-   * INVALID_ARGUMENT error is returned.
+   * A maximum of 30 brands are allowed unless overridden through the Google
+   * Cloud console. Each
+   * brand must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
    *
    * Corresponding properties: Google Merchant Center property
    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceProto.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceProto.java
index ee64becc4257..aca53228f7a3 100644
--- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceProto.java
+++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceProto.java
@@ -129,147 +129,156 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "e/cloud/retail/v2beta/common.proto\032.goog"
           + "le/cloud/retail/v2beta/import_config.pro"
           + "to\032(google/cloud/retail/v2beta/product.p"
-          + "roto\032#google/longrunning/operations.prot"
-          + "o\032\033google/protobuf/empty.proto\032 google/p"
-          + "rotobuf/field_mask.proto\032\037google/protobu"
-          + "f/timestamp.proto\"\240\001\n\024CreateProductReque"
-          + "st\0224\n\006parent\030\001 \001(\tB$\340A\002\372A\036\n\034retail.googl"
-          + "eapis.com/Branch\0229\n\007product\030\002 \001(\0132#.goog"
-          + "le.cloud.retail.v2beta.ProductB\003\340A\002\022\027\n\np"
-          + "roduct_id\030\003 \001(\tB\003\340A\002\"H\n\021GetProductReques"
+          + "roto\032-google/cloud/retail/v2beta/purge_c"
+          + "onfig.proto\032#google/longrunning/operatio"
+          + "ns.proto\032\033google/protobuf/empty.proto\032 g"
+          + "oogle/protobuf/field_mask.proto\032\037google/"
+          + "protobuf/timestamp.proto\"\240\001\n\024CreateProdu"
+          + "ctRequest\0224\n\006parent\030\001 \001(\tB$\340A\002\372A\036\n\034retai"
+          + "l.googleapis.com/Branch\0229\n\007product\030\002 \001(\013"
+          + "2#.google.cloud.retail.v2beta.ProductB\003\340"
+          + "A\002\022\027\n\nproduct_id\030\003 \001(\tB\003\340A\002\"H\n\021GetProduc"
+          + "tRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035retail.g"
+          + "oogleapis.com/Product\"\231\001\n\024UpdateProductR"
+          + "equest\0229\n\007product\030\001 \001(\0132#.google.cloud.r"
+          + "etail.v2beta.ProductB\003\340A\002\022/\n\013update_mask"
+          + "\030\002 \001(\0132\032.google.protobuf.FieldMask\022\025\n\ral"
+          + "low_missing\030\003 \001(\010\"K\n\024DeleteProductReques"
           + "t\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googleap"
-          + "is.com/Product\"\231\001\n\024UpdateProductRequest\022"
-          + "9\n\007product\030\001 \001(\0132#.google.cloud.retail.v"
-          + "2beta.ProductB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132"
-          + "\032.google.protobuf.FieldMask\022\025\n\rallow_mis"
-          + "sing\030\003 \001(\010\"K\n\024DeleteProductRequest\0223\n\004na"
-          + "me\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googleapis.com/"
-          + "Product\"\261\001\n\023ListProductsRequest\0224\n\006paren"
-          + "t\030\001 \001(\tB$\340A\002\372A\036\n\034retail.googleapis.com/B"
-          + "ranch\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003"
-          + " \001(\t\022\016\n\006filter\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132"
-          + "\032.google.protobuf.FieldMask\"f\n\024ListProdu"
-          + "ctsResponse\0225\n\010products\030\001 \003(\0132#.google.c"
-          + "loud.retail.v2beta.Product\022\027\n\017next_page_"
-          + "token\030\002 \001(\t\"\305\001\n\023SetInventoryRequest\022;\n\ti"
-          + "nventory\030\001 \001(\0132#.google.cloud.retail.v2b"
-          + "eta.ProductB\003\340A\002\022,\n\010set_mask\030\002 \001(\0132\032.goo"
-          + "gle.protobuf.FieldMask\022,\n\010set_time\030\003 \001(\013"
-          + "2\032.google.protobuf.Timestamp\022\025\n\rallow_mi"
-          + "ssing\030\004 \001(\010\"\026\n\024SetInventoryMetadata\"\026\n\024S"
-          + "etInventoryResponse\"\305\001\n\033AddFulfillmentPl"
-          + "acesRequest\0226\n\007product\030\001 \001(\tB%\340A\002\372A\037\n\035re"
-          + "tail.googleapis.com/Product\022\021\n\004type\030\002 \001("
-          + "\tB\003\340A\002\022\026\n\tplace_ids\030\003 \003(\tB\003\340A\002\022,\n\010add_ti"
-          + "me\030\004 \001(\0132\032.google.protobuf.Timestamp\022\025\n\r"
-          + "allow_missing\030\005 \001(\010\"\036\n\034AddFulfillmentPla"
-          + "cesMetadata\"\036\n\034AddFulfillmentPlacesRespo"
-          + "nse\"\223\002\n\032AddLocalInventoriesRequest\0226\n\007pr"
-          + "oduct\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googleapis.c"
-          + "om/Product\022J\n\021local_inventories\030\002 \003(\0132*."
-          + "google.cloud.retail.v2beta.LocalInventor"
-          + "yB\003\340A\002\022,\n\010add_mask\030\004 \001(\0132\032.google.protob"
-          + "uf.FieldMask\022,\n\010add_time\030\005 \001(\0132\032.google."
-          + "protobuf.Timestamp\022\025\n\rallow_missing\030\006 \001("
-          + "\010\"\035\n\033AddLocalInventoriesMetadata\"\035\n\033AddL"
-          + "ocalInventoriesResponse\"\267\001\n\035RemoveLocalI"
-          + "nventoriesRequest\0226\n\007product\030\001 \001(\tB%\340A\002\372"
-          + "A\037\n\035retail.googleapis.com/Product\022\026\n\tpla"
-          + "ce_ids\030\002 \003(\tB\003\340A\002\022/\n\013remove_time\030\005 \001(\0132\032"
-          + ".google.protobuf.Timestamp\022\025\n\rallow_miss"
-          + "ing\030\003 \001(\010\" \n\036RemoveLocalInventoriesMetad"
-          + "ata\" \n\036RemoveLocalInventoriesResponse\"\313\001"
-          + "\n\036RemoveFulfillmentPlacesRequest\0226\n\007prod"
-          + "uct\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googleapis.com"
-          + "/Product\022\021\n\004type\030\002 \001(\tB\003\340A\002\022\026\n\tplace_ids"
-          + "\030\003 \003(\tB\003\340A\002\022/\n\013remove_time\030\004 \001(\0132\032.googl"
-          + "e.protobuf.Timestamp\022\025\n\rallow_missing\030\005 "
-          + "\001(\010\"!\n\037RemoveFulfillmentPlacesMetadata\"!"
-          + "\n\037RemoveFulfillmentPlacesResponse2\306\030\n\016Pr"
-          + "oductService\022\333\001\n\rCreateProduct\0220.google."
-          + "cloud.retail.v2beta.CreateProductRequest"
-          + "\032#.google.cloud.retail.v2beta.Product\"s\332"
-          + "A\031parent,product,product_id\202\323\344\223\002Q\"F/v2be"
-          + "ta/{parent=projects/*/locations/*/catalo"
-          + "gs/*/branches/*}/products:\007product\022\270\001\n\nG"
-          + "etProduct\022-.google.cloud.retail.v2beta.G"
-          + "etProductRequest\032#.google.cloud.retail.v"
-          + "2beta.Product\"V\332A\004name\202\323\344\223\002I\022G/v2beta/{n"
-          + "ame=projects/*/locations/*/catalogs/*/br"
-          + "anches/*/products/**}\022\312\001\n\014ListProducts\022/"
-          + ".google.cloud.retail.v2beta.ListProducts"
-          + "Request\0320.google.cloud.retail.v2beta.Lis"
-          + "tProductsResponse\"W\332A\006parent\202\323\344\223\002H\022F/v2b"
-          + "eta/{parent=projects/*/locations/*/catal"
-          + "ogs/*/branches/*}/products\022\336\001\n\rUpdatePro"
-          + "duct\0220.google.cloud.retail.v2beta.Update"
-          + "ProductRequest\032#.google.cloud.retail.v2b"
-          + "eta.Product\"v\332A\023product,update_mask\202\323\344\223\002"
-          + "Z2O/v2beta/{product.name=projects/*/loca"
-          + "tions/*/catalogs/*/branches/*/products/*"
-          + "*}:\007product\022\261\001\n\rDeleteProduct\0220.google.c"
-          + "loud.retail.v2beta.DeleteProductRequest\032"
-          + "\026.google.protobuf.Empty\"V\332A\004name\202\323\344\223\002I*G"
-          + "/v2beta/{name=projects/*/locations/*/cat"
-          + "alogs/*/branches/*/products/**}\022\236\002\n\016Impo"
-          + "rtProducts\0221.google.cloud.retail.v2beta."
-          + "ImportProductsRequest\032\035.google.longrunni"
-          + "ng.Operation\"\271\001\312A^\n1google.cloud.retail."
-          + "v2beta.ImportProductsResponse\022)google.cl"
-          + "oud.retail.v2beta.ImportMetadata\202\323\344\223\002R\"M"
-          + "/v2beta/{parent=projects/*/locations/*/c"
-          + "atalogs/*/branches/*}/products:import:\001*"
-          + "\022\304\002\n\014SetInventory\022/.google.cloud.retail."
-          + "v2beta.SetInventoryRequest\032\035.google.long"
-          + "running.Operation\"\343\001\312Ab\n/google.cloud.re"
-          + "tail.v2beta.SetInventoryResponse\022/google"
-          + ".cloud.retail.v2beta.SetInventoryMetadat"
-          + "a\332A\022inventory,set_mask\202\323\344\223\002c\"^/v2beta/{i"
-          + "nventory.name=projects/*/locations/*/cat"
-          + "alogs/*/branches/*/products/**}:setInven"
-          + "tory:\001*\022\332\002\n\024AddFulfillmentPlaces\0227.googl"
-          + "e.cloud.retail.v2beta.AddFulfillmentPlac"
+          + "is.com/Product\"\261\001\n\023ListProductsRequest\0224"
+          + "\n\006parent\030\001 \001(\tB$\340A\002\372A\036\n\034retail.googleapi"
+          + "s.com/Branch\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_"
+          + "token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022-\n\tread_mask"
+          + "\030\005 \001(\0132\032.google.protobuf.FieldMask\"f\n\024Li"
+          + "stProductsResponse\0225\n\010products\030\001 \003(\0132#.g"
+          + "oogle.cloud.retail.v2beta.Product\022\027\n\017nex"
+          + "t_page_token\030\002 \001(\t\"\305\001\n\023SetInventoryReque"
+          + "st\022;\n\tinventory\030\001 \001(\0132#.google.cloud.ret"
+          + "ail.v2beta.ProductB\003\340A\002\022,\n\010set_mask\030\002 \001("
+          + "\0132\032.google.protobuf.FieldMask\022,\n\010set_tim"
+          + "e\030\003 \001(\0132\032.google.protobuf.Timestamp\022\025\n\ra"
+          + "llow_missing\030\004 \001(\010\"\026\n\024SetInventoryMetada"
+          + "ta\"\026\n\024SetInventoryResponse\"\305\001\n\033AddFulfil"
+          + "lmentPlacesRequest\0226\n\007product\030\001 \001(\tB%\340A\002"
+          + "\372A\037\n\035retail.googleapis.com/Product\022\021\n\004ty"
+          + "pe\030\002 \001(\tB\003\340A\002\022\026\n\tplace_ids\030\003 \003(\tB\003\340A\002\022,\n"
+          + "\010add_time\030\004 \001(\0132\032.google.protobuf.Timest"
+          + "amp\022\025\n\rallow_missing\030\005 \001(\010\"\036\n\034AddFulfill"
+          + "mentPlacesMetadata\"\036\n\034AddFulfillmentPlac"
+          + "esResponse\"\223\002\n\032AddLocalInventoriesReques"
+          + "t\0226\n\007product\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googl"
+          + "eapis.com/Product\022J\n\021local_inventories\030\002"
+          + " \003(\0132*.google.cloud.retail.v2beta.LocalI"
+          + "nventoryB\003\340A\002\022,\n\010add_mask\030\004 \001(\0132\032.google"
+          + ".protobuf.FieldMask\022,\n\010add_time\030\005 \001(\0132\032."
+          + "google.protobuf.Timestamp\022\025\n\rallow_missi"
+          + "ng\030\006 \001(\010\"\035\n\033AddLocalInventoriesMetadata\""
+          + "\035\n\033AddLocalInventoriesResponse\"\267\001\n\035Remov"
+          + "eLocalInventoriesRequest\0226\n\007product\030\001 \001("
+          + "\tB%\340A\002\372A\037\n\035retail.googleapis.com/Product"
+          + "\022\026\n\tplace_ids\030\002 \003(\tB\003\340A\002\022/\n\013remove_time\030"
+          + "\005 \001(\0132\032.google.protobuf.Timestamp\022\025\n\rall"
+          + "ow_missing\030\003 \001(\010\" \n\036RemoveLocalInventori"
+          + "esMetadata\" \n\036RemoveLocalInventoriesResp"
+          + "onse\"\313\001\n\036RemoveFulfillmentPlacesRequest\022"
+          + "6\n\007product\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googlea"
+          + "pis.com/Product\022\021\n\004type\030\002 \001(\tB\003\340A\002\022\026\n\tpl"
+          + "ace_ids\030\003 \003(\tB\003\340A\002\022/\n\013remove_time\030\004 \001(\0132"
+          + "\032.google.protobuf.Timestamp\022\025\n\rallow_mis"
+          + "sing\030\005 \001(\010\"!\n\037RemoveFulfillmentPlacesMet"
+          + "adata\"!\n\037RemoveFulfillmentPlacesResponse"
+          + "2\352\032\n\016ProductService\022\333\001\n\rCreateProduct\0220."
+          + "google.cloud.retail.v2beta.CreateProduct"
+          + "Request\032#.google.cloud.retail.v2beta.Pro"
+          + "duct\"s\332A\031parent,product,product_id\202\323\344\223\002Q"
+          + "\"F/v2beta/{parent=projects/*/locations/*"
+          + "/catalogs/*/branches/*}/products:\007produc"
+          + "t\022\270\001\n\nGetProduct\022-.google.cloud.retail.v"
+          + "2beta.GetProductRequest\032#.google.cloud.r"
+          + "etail.v2beta.Product\"V\332A\004name\202\323\344\223\002I\022G/v2"
+          + "beta/{name=projects/*/locations/*/catalo"
+          + "gs/*/branches/*/products/**}\022\312\001\n\014ListPro"
+          + "ducts\022/.google.cloud.retail.v2beta.ListP"
+          + "roductsRequest\0320.google.cloud.retail.v2b"
+          + "eta.ListProductsResponse\"W\332A\006parent\202\323\344\223\002"
+          + "H\022F/v2beta/{parent=projects/*/locations/"
+          + "*/catalogs/*/branches/*}/products\022\336\001\n\rUp"
+          + "dateProduct\0220.google.cloud.retail.v2beta"
+          + ".UpdateProductRequest\032#.google.cloud.ret"
+          + "ail.v2beta.Product\"v\332A\023product,update_ma"
+          + "sk\202\323\344\223\002Z2O/v2beta/{product.name=projects"
+          + "/*/locations/*/catalogs/*/branches/*/pro"
+          + "ducts/**}:\007product\022\261\001\n\rDeleteProduct\0220.g"
+          + "oogle.cloud.retail.v2beta.DeleteProductR"
+          + "equest\032\026.google.protobuf.Empty\"V\332A\004name\202"
+          + "\323\344\223\002I*G/v2beta/{name=projects/*/location"
+          + "s/*/catalogs/*/branches/*/products/**}\022\241"
+          + "\002\n\rPurgeProducts\0220.google.cloud.retail.v"
+          + "2beta.PurgeProductsRequest\032\035.google.long"
+          + "running.Operation\"\276\001\312Ad\n0google.cloud.re"
+          + "tail.v2beta.PurgeProductsResponse\0220googl"
+          + "e.cloud.retail.v2beta.PurgeProductsMetad"
+          + "ata\202\323\344\223\002Q\"L/v2beta/{parent=projects/*/lo"
+          + "cations/*/catalogs/*/branches/*}/product"
+          + "s:purge:\001*\022\236\002\n\016ImportProducts\0221.google.c"
+          + "loud.retail.v2beta.ImportProductsRequest"
+          + "\032\035.google.longrunning.Operation\"\271\001\312A^\n1g"
+          + "oogle.cloud.retail.v2beta.ImportProducts"
+          + "Response\022)google.cloud.retail.v2beta.Imp"
+          + "ortMetadata\202\323\344\223\002R\"M/v2beta/{parent=proje"
+          + "cts/*/locations/*/catalogs/*/branches/*}"
+          + "/products:import:\001*\022\304\002\n\014SetInventory\022/.g"
+          + "oogle.cloud.retail.v2beta.SetInventoryRe"
+          + "quest\032\035.google.longrunning.Operation\"\343\001\312"
+          + "Ab\n/google.cloud.retail.v2beta.SetInvent"
+          + "oryResponse\022/google.cloud.retail.v2beta."
+          + "SetInventoryMetadata\332A\022inventory,set_mas"
+          + "k\202\323\344\223\002c\"^/v2beta/{inventory.name=project"
+          + "s/*/locations/*/catalogs/*/branches/*/pr"
+          + "oducts/**}:setInventory:\001*\022\332\002\n\024AddFulfil"
+          + "lmentPlaces\0227.google.cloud.retail.v2beta"
+          + ".AddFulfillmentPlacesRequest\032\035.google.lo"
+          + "ngrunning.Operation\"\351\001\312Ar\n7google.cloud."
+          + "retail.v2beta.AddFulfillmentPlacesRespon"
+          + "se\0227google.cloud.retail.v2beta.AddFulfil"
+          + "lmentPlacesMetadata\332A\007product\202\323\344\223\002d\"_/v2"
+          + "beta/{product=projects/*/locations/*/cat"
+          + "alogs/*/branches/*/products/**}:addFulfi"
+          + "llmentPlaces:\001*\022\351\002\n\027RemoveFulfillmentPla"
+          + "ces\022:.google.cloud.retail.v2beta.RemoveF"
+          + "ulfillmentPlacesRequest\032\035.google.longrun"
+          + "ning.Operation\"\362\001\312Ax\n:google.cloud.retai"
+          + "l.v2beta.RemoveFulfillmentPlacesResponse"
+          + "\022:google.cloud.retail.v2beta.RemoveFulfi"
+          + "llmentPlacesMetadata\332A\007product\202\323\344\223\002g\"b/v"
+          + "2beta/{product=projects/*/locations/*/ca"
+          + "talogs/*/branches/*/products/**}:removeF"
+          + "ulfillmentPlaces:\001*\022\325\002\n\023AddLocalInventor"
+          + "ies\0226.google.cloud.retail.v2beta.AddLoca"
+          + "lInventoriesRequest\032\035.google.longrunning"
+          + ".Operation\"\346\001\312Ap\n6google.cloud.retail.v2"
+          + "beta.AddLocalInventoriesResponse\0226google"
+          + ".cloud.retail.v2beta.AddLocalInventories"
+          + "Metadata\332A\007product\202\323\344\223\002c\"^/v2beta/{produ"
+          + "ct=projects/*/locations/*/catalogs/*/bra"
+          + "nches/*/products/**}:addLocalInventories"
+          + ":\001*\022\344\002\n\026RemoveLocalInventories\0229.google."
+          + "cloud.retail.v2beta.RemoveLocalInventori"
           + "esRequest\032\035.google.longrunning.Operation"
-          + "\"\351\001\312Ar\n7google.cloud.retail.v2beta.AddFu"
-          + "lfillmentPlacesResponse\0227google.cloud.re"
-          + "tail.v2beta.AddFulfillmentPlacesMetadata"
-          + "\332A\007product\202\323\344\223\002d\"_/v2beta/{product=proje"
-          + "cts/*/locations/*/catalogs/*/branches/*/"
-          + "products/**}:addFulfillmentPlaces:\001*\022\351\002\n"
-          + "\027RemoveFulfillmentPlaces\022:.google.cloud."
-          + "retail.v2beta.RemoveFulfillmentPlacesReq"
-          + "uest\032\035.google.longrunning.Operation\"\362\001\312A"
-          + "x\n:google.cloud.retail.v2beta.RemoveFulf"
-          + "illmentPlacesResponse\022:google.cloud.reta"
-          + "il.v2beta.RemoveFulfillmentPlacesMetadat"
-          + "a\332A\007product\202\323\344\223\002g\"b/v2beta/{product=proj"
-          + "ects/*/locations/*/catalogs/*/branches/*"
-          + "/products/**}:removeFulfillmentPlaces:\001*"
-          + "\022\325\002\n\023AddLocalInventories\0226.google.cloud."
-          + "retail.v2beta.AddLocalInventoriesRequest"
-          + "\032\035.google.longrunning.Operation\"\346\001\312Ap\n6g"
-          + "oogle.cloud.retail.v2beta.AddLocalInvent"
-          + "oriesResponse\0226google.cloud.retail.v2bet"
-          + "a.AddLocalInventoriesMetadata\332A\007product\202"
-          + "\323\344\223\002c\"^/v2beta/{product=projects/*/locat"
-          + "ions/*/catalogs/*/branches/*/products/**"
-          + "}:addLocalInventories:\001*\022\344\002\n\026RemoveLocal"
-          + "Inventories\0229.google.cloud.retail.v2beta"
-          + ".RemoveLocalInventoriesRequest\032\035.google."
-          + "longrunning.Operation\"\357\001\312Av\n9google.clou"
-          + "d.retail.v2beta.RemoveLocalInventoriesRe"
-          + "sponse\0229google.cloud.retail.v2beta.Remov"
-          + "eLocalInventoriesMetadata\332A\007product\202\323\344\223\002"
-          + "f\"a/v2beta/{product=projects/*/locations"
-          + "/*/catalogs/*/branches/*/products/**}:re"
-          + "moveLocalInventories:\001*\032I\312A\025retail.googl"
-          + "eapis.com\322A.https://www.googleapis.com/a"
-          + "uth/cloud-platformB\322\001\n\036com.google.cloud."
-          + "retail.v2betaB\023ProductServiceProtoP\001Z6cl"
-          + "oud.google.com/go/retail/apiv2beta/retai"
-          + "lpb;retailpb\242\002\006RETAIL\252\002\032Google.Cloud.Ret"
-          + "ail.V2Beta\312\002\032Google\\Cloud\\Retail\\V2beta\352"
-          + "\002\035Google::Cloud::Retail::V2betab\006proto3"
+          + "\"\357\001\312Av\n9google.cloud.retail.v2beta.Remov"
+          + "eLocalInventoriesResponse\0229google.cloud."
+          + "retail.v2beta.RemoveLocalInventoriesMeta"
+          + "data\332A\007product\202\323\344\223\002f\"a/v2beta/{product=p"
+          + "rojects/*/locations/*/catalogs/*/branche"
+          + "s/*/products/**}:removeLocalInventories:"
+          + "\001*\032I\312A\025retail.googleapis.com\322A.https://w"
+          + "ww.googleapis.com/auth/cloud-platformB\322\001"
+          + "\n\036com.google.cloud.retail.v2betaB\023Produc"
+          + "tServiceProtoP\001Z6cloud.google.com/go/ret"
+          + "ail/apiv2beta/retailpb;retailpb\242\002\006RETAIL"
+          + "\252\002\032Google.Cloud.Retail.V2Beta\312\002\032Google\\C"
+          + "loud\\Retail\\V2beta\352\002\035Google::Cloud::Reta"
+          + "il::V2betab\006proto3"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -282,6 +291,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               com.google.cloud.retail.v2beta.CommonProto.getDescriptor(),
               com.google.cloud.retail.v2beta.ImportConfigProto.getDescriptor(),
               com.google.cloud.retail.v2beta.ProductProto.getDescriptor(),
+              com.google.cloud.retail.v2beta.PurgeConfigProto.getDescriptor(),
               com.google.longrunning.OperationsProto.getDescriptor(),
               com.google.protobuf.EmptyProto.getDescriptor(),
               com.google.protobuf.FieldMaskProto.getDescriptor(),
@@ -453,6 +463,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
     com.google.cloud.retail.v2beta.CommonProto.getDescriptor();
     com.google.cloud.retail.v2beta.ImportConfigProto.getDescriptor();
     com.google.cloud.retail.v2beta.ProductProto.getDescriptor();
+    com.google.cloud.retail.v2beta.PurgeConfigProto.getDescriptor();
     com.google.longrunning.OperationsProto.getDescriptor();
     com.google.protobuf.EmptyProto.getDescriptor();
     com.google.protobuf.FieldMaskProto.getDescriptor();
diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Promotion.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Promotion.java
index c6f93d97c3a5..fc1954cf67cf 100644
--- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Promotion.java
+++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Promotion.java
@@ -78,8 +78,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is
    * returned.
    *
-   * Google Merchant Center property
-   * [promotion](https://support.google.com/merchants/answer/7050148).
+   * Corresponds to Google Merchant Center property
+   * [promotion_id](https://support.google.com/merchants/answer/7050148).
    * 
* * string promotion_id = 1; @@ -109,8 +109,8 @@ public java.lang.String getPromotionId() { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -482,8 +482,8 @@ public Builder mergeFrom( * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -512,8 +512,8 @@ public java.lang.String getPromotionId() { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -542,8 +542,8 @@ public com.google.protobuf.ByteString getPromotionIdBytes() { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -571,8 +571,8 @@ public Builder setPromotionId(java.lang.String value) { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -596,8 +596,8 @@ public Builder clearPromotionId() { * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PromotionOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PromotionOrBuilder.java index 44a056f3ca72..11a7481b32ce 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PromotionOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PromotionOrBuilder.java @@ -35,8 +35,8 @@ public interface PromotionOrBuilder * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; @@ -55,8 +55,8 @@ public interface PromotionOrBuilder * id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is * returned. * - * Google Merchant Center property - * [promotion](https://support.google.com/merchants/answer/7050148). + * Corresponds to Google Merchant Center property + * [promotion_id](https://support.google.com/merchants/answer/7050148). *
* * string promotion_id = 1; diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeConfigProto.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeConfigProto.java index f48d892f8490..21af09b7463a 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeConfigProto.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeConfigProto.java @@ -32,6 +32,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2beta_PurgeMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2beta_PurgeMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_PurgeProductsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_PurgeProductsMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_PurgeProductsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_PurgeProductsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_PurgeProductsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_PurgeProductsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_retail_v2beta_PurgeUserEventsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -52,17 +64,28 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n-google/cloud/retail/v2beta/purge_confi" + "g.proto\022\032google.cloud.retail.v2beta\032\037goo" + "gle/api/field_behavior.proto\032\031google/api" - + "/resource.proto\"\017\n\rPurgeMetadata\"s\n\026Purg" - + "eUserEventsRequest\0225\n\006parent\030\001 \001(\tB%\340A\002\372" - + "A\037\n\035retail.googleapis.com/Catalog\022\023\n\006fil" - + "ter\030\002 \001(\tB\003\340A\002\022\r\n\005force\030\003 \001(\010\"6\n\027PurgeUs" - + "erEventsResponse\022\033\n\023purged_events_count\030" - + "\001 \001(\003B\317\001\n\036com.google.cloud.retail.v2beta" - + "B\020PurgeConfigProtoP\001Z6cloud.google.com/g" - + "o/retail/apiv2beta/retailpb;retailpb\242\002\006R" - + "ETAIL\252\002\032Google.Cloud.Retail.V2Beta\312\002\032Goo" - + "gle\\Cloud\\Retail\\V2beta\352\002\035Google::Cloud:" - + ":Retail::V2betab\006proto3" + + "/resource.proto\032\037google/protobuf/timesta" + + "mp.proto\"\017\n\rPurgeMetadata\"\247\001\n\025PurgeProdu" + + "ctsMetadata\022/\n\013create_time\030\001 \001(\0132\032.googl" + + "e.protobuf.Timestamp\022/\n\013update_time\030\002 \001(" + + "\0132\032.google.protobuf.Timestamp\022\025\n\rsuccess" + + "_count\030\003 \001(\003\022\025\n\rfailure_count\030\004 \001(\003\"p\n\024P" + + "urgeProductsRequest\0224\n\006parent\030\001 \001(\tB$\340A\002" + + "\372A\036\n\034retail.googleapis.com/Branch\022\023\n\006fil" + + "ter\030\002 \001(\tB\003\340A\002\022\r\n\005force\030\003 \001(\010\"f\n\025PurgePr" + + "oductsResponse\022\023\n\013purge_count\030\001 \001(\003\0228\n\014p" + + "urge_sample\030\002 \003(\tB\"\372A\037\n\035retail.googleapi" + + "s.com/Product\"s\n\026PurgeUserEventsRequest\022" + + "5\n\006parent\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googleap" + + "is.com/Catalog\022\023\n\006filter\030\002 \001(\tB\003\340A\002\022\r\n\005f" + + "orce\030\003 \001(\010\"6\n\027PurgeUserEventsResponse\022\033\n" + + "\023purged_events_count\030\001 \001(\003B\317\001\n\036com.googl" + + "e.cloud.retail.v2betaB\020PurgeConfigProtoP" + + "\001Z6cloud.google.com/go/retail/apiv2beta/" + + "retailpb;retailpb\242\002\006RETAIL\252\002\032Google.Clou" + + "d.Retail.V2Beta\312\002\032Google\\Cloud\\Retail\\V2" + + "beta\352\002\035Google::Cloud::Retail::V2betab\006pr" + + "oto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -70,6 +93,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_retail_v2beta_PurgeMetadata_descriptor = getDescriptor().getMessageTypes().get(0); @@ -77,8 +101,32 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2beta_PurgeMetadata_descriptor, new java.lang.String[] {}); - internal_static_google_cloud_retail_v2beta_PurgeUserEventsRequest_descriptor = + internal_static_google_cloud_retail_v2beta_PurgeProductsMetadata_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_retail_v2beta_PurgeProductsMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_PurgeProductsMetadata_descriptor, + new java.lang.String[] { + "CreateTime", "UpdateTime", "SuccessCount", "FailureCount", + }); + internal_static_google_cloud_retail_v2beta_PurgeProductsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_retail_v2beta_PurgeProductsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_PurgeProductsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "Force", + }); + internal_static_google_cloud_retail_v2beta_PurgeProductsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_retail_v2beta_PurgeProductsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_PurgeProductsResponse_descriptor, + new java.lang.String[] { + "PurgeCount", "PurgeSample", + }); + internal_static_google_cloud_retail_v2beta_PurgeUserEventsRequest_descriptor = + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_retail_v2beta_PurgeUserEventsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2beta_PurgeUserEventsRequest_descriptor, @@ -86,7 +134,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "Force", }); internal_static_google_cloud_retail_v2beta_PurgeUserEventsResponse_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_retail_v2beta_PurgeUserEventsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2beta_PurgeUserEventsResponse_descriptor, @@ -101,6 +149,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsMetadata.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsMetadata.java new file mode 100644 index 000000000000..1ff852935245 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsMetadata.java @@ -0,0 +1,1181 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/purge_config.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Metadata related to the progress of the PurgeProducts operation.
+ * This will be returned by the google.longrunning.Operation.metadata field.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.PurgeProductsMetadata} + */ +public final class PurgeProductsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.PurgeProductsMetadata) + PurgeProductsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use PurgeProductsMetadata.newBuilder() to construct. + private PurgeProductsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PurgeProductsMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PurgeProductsMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.PurgeConfigProto + .internal_static_google_cloud_retail_v2beta_PurgeProductsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.PurgeConfigProto + .internal_static_google_cloud_retail_v2beta_PurgeProductsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.PurgeProductsMetadata.class, + com.google.cloud.retail.v2beta.PurgeProductsMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int SUCCESS_COUNT_FIELD_NUMBER = 3; + private long successCount_ = 0L; + /** + * + * + *
+   * Count of entries that were deleted successfully.
+   * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + + public static final int FAILURE_COUNT_FIELD_NUMBER = 4; + private long failureCount_ = 0L; + /** + * + * + *
+   * Count of entries that encountered errors while processing.
+   * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateTime()); + } + if (successCount_ != 0L) { + output.writeInt64(3, successCount_); + } + if (failureCount_ != 0L) { + output.writeInt64(4, failureCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + if (successCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, successCount_); + } + if (failureCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, failureCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2beta.PurgeProductsMetadata)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.PurgeProductsMetadata other = + (com.google.cloud.retail.v2beta.PurgeProductsMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (getSuccessCount() != other.getSuccessCount()) return false; + if (getFailureCount() != other.getFailureCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + SUCCESS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSuccessCount()); + hash = (37 * hash) + FAILURE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailureCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.PurgeProductsMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2beta.PurgeProductsMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata related to the progress of the PurgeProducts operation.
+   * This will be returned by the google.longrunning.Operation.metadata field.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.PurgeProductsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.PurgeProductsMetadata) + com.google.cloud.retail.v2beta.PurgeProductsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.PurgeConfigProto + .internal_static_google_cloud_retail_v2beta_PurgeProductsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.PurgeConfigProto + .internal_static_google_cloud_retail_v2beta_PurgeProductsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.PurgeProductsMetadata.class, + com.google.cloud.retail.v2beta.PurgeProductsMetadata.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.PurgeProductsMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + successCount_ = 0L; + failureCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.PurgeConfigProto + .internal_static_google_cloud_retail_v2beta_PurgeProductsMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.PurgeProductsMetadata getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.PurgeProductsMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.PurgeProductsMetadata build() { + com.google.cloud.retail.v2beta.PurgeProductsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.PurgeProductsMetadata buildPartial() { + com.google.cloud.retail.v2beta.PurgeProductsMetadata result = + new com.google.cloud.retail.v2beta.PurgeProductsMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2beta.PurgeProductsMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.successCount_ = successCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.failureCount_ = failureCount_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.PurgeProductsMetadata) { + return mergeFrom((com.google.cloud.retail.v2beta.PurgeProductsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.PurgeProductsMetadata other) { + if (other == com.google.cloud.retail.v2beta.PurgeProductsMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.getSuccessCount() != 0L) { + setSuccessCount(other.getSuccessCount()); + } + if (other.getFailureCount() != 0L) { + setFailureCount(other.getFailureCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + successCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + failureCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private long successCount_; + /** + * + * + *
+     * Count of entries that were deleted successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + /** + * + * + *
+     * Count of entries that were deleted successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @param value The successCount to set. + * @return This builder for chaining. + */ + public Builder setSuccessCount(long value) { + + successCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of entries that were deleted successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearSuccessCount() { + bitField0_ = (bitField0_ & ~0x00000004); + successCount_ = 0L; + onChanged(); + return this; + } + + private long failureCount_; + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @param value The failureCount to set. + * @return This builder for chaining. + */ + public Builder setFailureCount(long value) { + + failureCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearFailureCount() { + bitField0_ = (bitField0_ & ~0x00000008); + failureCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.PurgeProductsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.PurgeProductsMetadata) + private static final com.google.cloud.retail.v2beta.PurgeProductsMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.PurgeProductsMetadata(); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurgeProductsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2beta.PurgeProductsMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsMetadataOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsMetadataOrBuilder.java new file mode 100644 index 000000000000..c5bf8ebb895c --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsMetadataOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/purge_config.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2beta; + +public interface PurgeProductsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.PurgeProductsMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Count of entries that were deleted successfully.
+   * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + long getSuccessCount(); + + /** + * + * + *
+   * Count of entries that encountered errors while processing.
+   * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + long getFailureCount(); +} diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsRequest.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsRequest.java new file mode 100644 index 000000000000..ccaa4a08ce09 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsRequest.java @@ -0,0 +1,1209 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/purge_config.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Request message for PurgeProducts method.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.PurgeProductsRequest} + */ +public final class PurgeProductsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.PurgeProductsRequest) + PurgeProductsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PurgeProductsRequest.newBuilder() to construct. + private PurgeProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PurgeProductsRequest() { + parent_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PurgeProductsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.PurgeConfigProto + .internal_static_google_cloud_retail_v2beta_PurgeProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.PurgeConfigProto + .internal_static_google_cloud_retail_v2beta_PurgeProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.PurgeProductsRequest.class, + com.google.cloud.retail.v2beta.PurgeProductsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the branch under which the products are
+   * created. The format is
+   * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+   * 
+ * + * + * 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 branch under which the products are
+   * created. The format is
+   * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Required. The filter string to specify the products to be deleted with a
+   * length limit of 5,000 characters.
+   *
+   * Empty string filter is not allowed. "*" implies delete all items in a
+   * branch.
+   *
+   * The eligible fields for filtering are:
+   *
+   * * `availability`: Double quoted
+   * [Product.availability][google.cloud.retail.v2beta.Product.availability]
+   * string.
+   * * `create_time` : in ISO 8601 "zulu" format.
+   *
+   * Supported syntax:
+   *
+   * * Comparators (">", "<", ">=", "<=", "=").
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z"
+   *   * availability = "IN_STOCK"
+   *
+   * * Conjunctions ("AND")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+   *
+   * * Disjunctions ("OR")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+   *
+   * * Can support nested queries.
+   *   Examples:
+   *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+   *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+   *
+   * * Filter Limits:
+   *   * Filter should not contain more than 6 conditions.
+   *   * Max nesting depth should not exceed 2 levels.
+   *
+   * Examples queries:
+   * * Delete back order products created before a timestamp.
+   *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The filter string to specify the products to be deleted with a
+   * length limit of 5,000 characters.
+   *
+   * Empty string filter is not allowed. "*" implies delete all items in a
+   * branch.
+   *
+   * The eligible fields for filtering are:
+   *
+   * * `availability`: Double quoted
+   * [Product.availability][google.cloud.retail.v2beta.Product.availability]
+   * string.
+   * * `create_time` : in ISO 8601 "zulu" format.
+   *
+   * Supported syntax:
+   *
+   * * Comparators (">", "<", ">=", "<=", "=").
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z"
+   *   * availability = "IN_STOCK"
+   *
+   * * Conjunctions ("AND")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+   *
+   * * Disjunctions ("OR")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+   *
+   * * Can support nested queries.
+   *   Examples:
+   *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+   *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+   *
+   * * Filter Limits:
+   *   * Filter should not contain more than 6 conditions.
+   *   * Max nesting depth should not exceed 2 levels.
+   *
+   * Examples queries:
+   * * Delete back order products created before a timestamp.
+   *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_ = false; + /** + * + * + *
+   * Actually perform the purge.
+   * If `force` is set to false, the method will return the expected purge count
+   * without deleting any products.
+   * 
+ * + * bool force = 3; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2beta.PurgeProductsRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.PurgeProductsRequest other = + (com.google.cloud.retail.v2beta.PurgeProductsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.PurgeProductsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2beta.PurgeProductsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for PurgeProducts method.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.PurgeProductsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.PurgeProductsRequest) + com.google.cloud.retail.v2beta.PurgeProductsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.PurgeConfigProto + .internal_static_google_cloud_retail_v2beta_PurgeProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.PurgeConfigProto + .internal_static_google_cloud_retail_v2beta_PurgeProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.PurgeProductsRequest.class, + com.google.cloud.retail.v2beta.PurgeProductsRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.PurgeProductsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.PurgeConfigProto + .internal_static_google_cloud_retail_v2beta_PurgeProductsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.PurgeProductsRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.PurgeProductsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.PurgeProductsRequest build() { + com.google.cloud.retail.v2beta.PurgeProductsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.PurgeProductsRequest buildPartial() { + com.google.cloud.retail.v2beta.PurgeProductsRequest result = + new com.google.cloud.retail.v2beta.PurgeProductsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2beta.PurgeProductsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.PurgeProductsRequest) { + return mergeFrom((com.google.cloud.retail.v2beta.PurgeProductsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.PurgeProductsRequest other) { + if (other == com.google.cloud.retail.v2beta.PurgeProductsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the branch under which the products are
+     * created. The format is
+     * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+     * 
+ * + * + * 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 branch under which the products are
+     * created. The format is
+     * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+     * 
+ * + * + * 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 branch under which the products are
+     * created. The format is
+     * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the branch under which the products are
+     * created. The format is
+     * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the branch under which the products are
+     * created. The format is
+     * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Required. The filter string to specify the products to be deleted with a
+     * length limit of 5,000 characters.
+     *
+     * Empty string filter is not allowed. "*" implies delete all items in a
+     * branch.
+     *
+     * The eligible fields for filtering are:
+     *
+     * * `availability`: Double quoted
+     * [Product.availability][google.cloud.retail.v2beta.Product.availability]
+     * string.
+     * * `create_time` : in ISO 8601 "zulu" format.
+     *
+     * Supported syntax:
+     *
+     * * Comparators (">", "<", ">=", "<=", "=").
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z"
+     *   * availability = "IN_STOCK"
+     *
+     * * Conjunctions ("AND")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+     *
+     * * Disjunctions ("OR")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+     *
+     * * Can support nested queries.
+     *   Examples:
+     *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+     *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+     *
+     * * Filter Limits:
+     *   * Filter should not contain more than 6 conditions.
+     *   * Max nesting depth should not exceed 2 levels.
+     *
+     * Examples queries:
+     * * Delete back order products created before a timestamp.
+     *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The filter string to specify the products to be deleted with a
+     * length limit of 5,000 characters.
+     *
+     * Empty string filter is not allowed. "*" implies delete all items in a
+     * branch.
+     *
+     * The eligible fields for filtering are:
+     *
+     * * `availability`: Double quoted
+     * [Product.availability][google.cloud.retail.v2beta.Product.availability]
+     * string.
+     * * `create_time` : in ISO 8601 "zulu" format.
+     *
+     * Supported syntax:
+     *
+     * * Comparators (">", "<", ">=", "<=", "=").
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z"
+     *   * availability = "IN_STOCK"
+     *
+     * * Conjunctions ("AND")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+     *
+     * * Disjunctions ("OR")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+     *
+     * * Can support nested queries.
+     *   Examples:
+     *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+     *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+     *
+     * * Filter Limits:
+     *   * Filter should not contain more than 6 conditions.
+     *   * Max nesting depth should not exceed 2 levels.
+     *
+     * Examples queries:
+     * * Delete back order products created before a timestamp.
+     *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The filter string to specify the products to be deleted with a
+     * length limit of 5,000 characters.
+     *
+     * Empty string filter is not allowed. "*" implies delete all items in a
+     * branch.
+     *
+     * The eligible fields for filtering are:
+     *
+     * * `availability`: Double quoted
+     * [Product.availability][google.cloud.retail.v2beta.Product.availability]
+     * string.
+     * * `create_time` : in ISO 8601 "zulu" format.
+     *
+     * Supported syntax:
+     *
+     * * Comparators (">", "<", ">=", "<=", "=").
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z"
+     *   * availability = "IN_STOCK"
+     *
+     * * Conjunctions ("AND")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+     *
+     * * Disjunctions ("OR")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+     *
+     * * Can support nested queries.
+     *   Examples:
+     *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+     *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+     *
+     * * Filter Limits:
+     *   * Filter should not contain more than 6 conditions.
+     *   * Max nesting depth should not exceed 2 levels.
+     *
+     * Examples queries:
+     * * Delete back order products created before a timestamp.
+     *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The filter string to specify the products to be deleted with a
+     * length limit of 5,000 characters.
+     *
+     * Empty string filter is not allowed. "*" implies delete all items in a
+     * branch.
+     *
+     * The eligible fields for filtering are:
+     *
+     * * `availability`: Double quoted
+     * [Product.availability][google.cloud.retail.v2beta.Product.availability]
+     * string.
+     * * `create_time` : in ISO 8601 "zulu" format.
+     *
+     * Supported syntax:
+     *
+     * * Comparators (">", "<", ">=", "<=", "=").
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z"
+     *   * availability = "IN_STOCK"
+     *
+     * * Conjunctions ("AND")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+     *
+     * * Disjunctions ("OR")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+     *
+     * * Can support nested queries.
+     *   Examples:
+     *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+     *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+     *
+     * * Filter Limits:
+     *   * Filter should not contain more than 6 conditions.
+     *   * Max nesting depth should not exceed 2 levels.
+     *
+     * Examples queries:
+     * * Delete back order products created before a timestamp.
+     *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The filter string to specify the products to be deleted with a
+     * length limit of 5,000 characters.
+     *
+     * Empty string filter is not allowed. "*" implies delete all items in a
+     * branch.
+     *
+     * The eligible fields for filtering are:
+     *
+     * * `availability`: Double quoted
+     * [Product.availability][google.cloud.retail.v2beta.Product.availability]
+     * string.
+     * * `create_time` : in ISO 8601 "zulu" format.
+     *
+     * Supported syntax:
+     *
+     * * Comparators (">", "<", ">=", "<=", "=").
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z"
+     *   * availability = "IN_STOCK"
+     *
+     * * Conjunctions ("AND")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+     *
+     * * Disjunctions ("OR")
+     *   Examples:
+     *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+     *
+     * * Can support nested queries.
+     *   Examples:
+     *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+     *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+     *
+     * * Filter Limits:
+     *   * Filter should not contain more than 6 conditions.
+     *   * Max nesting depth should not exceed 2 levels.
+     *
+     * Examples queries:
+     * * Delete back order products created before a timestamp.
+     *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * Actually perform the purge.
+     * If `force` is set to false, the method will return the expected purge count
+     * without deleting any products.
+     * 
+ * + * bool force = 3; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * Actually perform the purge.
+     * If `force` is set to false, the method will return the expected purge count
+     * without deleting any products.
+     * 
+ * + * bool force = 3; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Actually perform the purge.
+     * If `force` is set to false, the method will return the expected purge count
+     * without deleting any products.
+     * 
+ * + * bool force = 3; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000004); + force_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.PurgeProductsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.PurgeProductsRequest) + private static final com.google.cloud.retail.v2beta.PurgeProductsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.PurgeProductsRequest(); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurgeProductsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2beta.PurgeProductsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsRequestOrBuilder.java new file mode 100644 index 000000000000..7a4db3ba69b9 --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsRequestOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/purge_config.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2beta; + +public interface PurgeProductsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.PurgeProductsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the branch under which the products are
+   * created. The format is
+   * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+   * 
+ * + * + * 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 branch under which the products are
+   * created. The format is
+   * `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The filter string to specify the products to be deleted with a
+   * length limit of 5,000 characters.
+   *
+   * Empty string filter is not allowed. "*" implies delete all items in a
+   * branch.
+   *
+   * The eligible fields for filtering are:
+   *
+   * * `availability`: Double quoted
+   * [Product.availability][google.cloud.retail.v2beta.Product.availability]
+   * string.
+   * * `create_time` : in ISO 8601 "zulu" format.
+   *
+   * Supported syntax:
+   *
+   * * Comparators (">", "<", ">=", "<=", "=").
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z"
+   *   * availability = "IN_STOCK"
+   *
+   * * Conjunctions ("AND")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+   *
+   * * Disjunctions ("OR")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+   *
+   * * Can support nested queries.
+   *   Examples:
+   *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+   *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+   *
+   * * Filter Limits:
+   *   * Filter should not contain more than 6 conditions.
+   *   * Max nesting depth should not exceed 2 levels.
+   *
+   * Examples queries:
+   * * Delete back order products created before a timestamp.
+   *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Required. The filter string to specify the products to be deleted with a
+   * length limit of 5,000 characters.
+   *
+   * Empty string filter is not allowed. "*" implies delete all items in a
+   * branch.
+   *
+   * The eligible fields for filtering are:
+   *
+   * * `availability`: Double quoted
+   * [Product.availability][google.cloud.retail.v2beta.Product.availability]
+   * string.
+   * * `create_time` : in ISO 8601 "zulu" format.
+   *
+   * Supported syntax:
+   *
+   * * Comparators (">", "<", ">=", "<=", "=").
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z"
+   *   * availability = "IN_STOCK"
+   *
+   * * Conjunctions ("AND")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
+   *
+   * * Disjunctions ("OR")
+   *   Examples:
+   *   * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
+   *
+   * * Can support nested queries.
+   *   Examples:
+   *   * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
+   *   OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
+   *
+   * * Filter Limits:
+   *   * Filter should not contain more than 6 conditions.
+   *   * Max nesting depth should not exceed 2 levels.
+   *
+   * Examples queries:
+   * * Delete back order products created before a timestamp.
+   *   create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Actually perform the purge.
+   * If `force` is set to false, the method will return the expected purge count
+   * without deleting any products.
+   * 
+ * + * bool force = 3; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsResponse.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsResponse.java new file mode 100644 index 000000000000..420da49cfc6e --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsResponse.java @@ -0,0 +1,843 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/purge_config.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Response of the PurgeProductsRequest. If the long running operation is
+ * successfully done, then this message is returned by the
+ * google.longrunning.Operations.response field.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.PurgeProductsResponse} + */ +public final class PurgeProductsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.PurgeProductsResponse) + PurgeProductsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use PurgeProductsResponse.newBuilder() to construct. + private PurgeProductsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PurgeProductsResponse() { + purgeSample_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PurgeProductsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.PurgeConfigProto + .internal_static_google_cloud_retail_v2beta_PurgeProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.PurgeConfigProto + .internal_static_google_cloud_retail_v2beta_PurgeProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.PurgeProductsResponse.class, + com.google.cloud.retail.v2beta.PurgeProductsResponse.Builder.class); + } + + public static final int PURGE_COUNT_FIELD_NUMBER = 1; + private long purgeCount_ = 0L; + /** + * + * + *
+   * The total count of products purged as a result of the operation.
+   * 
+ * + * int64 purge_count = 1; + * + * @return The purgeCount. + */ + @java.lang.Override + public long getPurgeCount() { + return purgeCount_; + } + + public static final int PURGE_SAMPLE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList purgeSample_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the purgeSample. + */ + public com.google.protobuf.ProtocolStringList getPurgeSampleList() { + return purgeSample_; + } + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return The count of purgeSample. + */ + public int getPurgeSampleCount() { + return purgeSample_.size(); + } + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The purgeSample at the given index. + */ + public java.lang.String getPurgeSample(int index) { + return purgeSample_.get(index); + } + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the purgeSample at the given index. + */ + public com.google.protobuf.ByteString getPurgeSampleBytes(int index) { + return purgeSample_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (purgeCount_ != 0L) { + output.writeInt64(1, purgeCount_); + } + for (int i = 0; i < purgeSample_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, purgeSample_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (purgeCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, purgeCount_); + } + { + int dataSize = 0; + for (int i = 0; i < purgeSample_.size(); i++) { + dataSize += computeStringSizeNoTag(purgeSample_.getRaw(i)); + } + size += dataSize; + size += 1 * getPurgeSampleList().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.retail.v2beta.PurgeProductsResponse)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.PurgeProductsResponse other = + (com.google.cloud.retail.v2beta.PurgeProductsResponse) obj; + + if (getPurgeCount() != other.getPurgeCount()) return false; + if (!getPurgeSampleList().equals(other.getPurgeSampleList())) 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) + PURGE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPurgeCount()); + if (getPurgeSampleCount() > 0) { + hash = (37 * hash) + PURGE_SAMPLE_FIELD_NUMBER; + hash = (53 * hash) + getPurgeSampleList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.PurgeProductsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2beta.PurgeProductsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response of the PurgeProductsRequest. If the long running operation is
+   * successfully done, then this message is returned by the
+   * google.longrunning.Operations.response field.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.PurgeProductsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.PurgeProductsResponse) + com.google.cloud.retail.v2beta.PurgeProductsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.PurgeConfigProto + .internal_static_google_cloud_retail_v2beta_PurgeProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.PurgeConfigProto + .internal_static_google_cloud_retail_v2beta_PurgeProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.PurgeProductsResponse.class, + com.google.cloud.retail.v2beta.PurgeProductsResponse.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.PurgeProductsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + purgeCount_ = 0L; + purgeSample_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.PurgeConfigProto + .internal_static_google_cloud_retail_v2beta_PurgeProductsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.PurgeProductsResponse getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.PurgeProductsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.PurgeProductsResponse build() { + com.google.cloud.retail.v2beta.PurgeProductsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.PurgeProductsResponse buildPartial() { + com.google.cloud.retail.v2beta.PurgeProductsResponse result = + new com.google.cloud.retail.v2beta.PurgeProductsResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2beta.PurgeProductsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.purgeCount_ = purgeCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + purgeSample_.makeImmutable(); + result.purgeSample_ = purgeSample_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.PurgeProductsResponse) { + return mergeFrom((com.google.cloud.retail.v2beta.PurgeProductsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.PurgeProductsResponse other) { + if (other == com.google.cloud.retail.v2beta.PurgeProductsResponse.getDefaultInstance()) + return this; + if (other.getPurgeCount() != 0L) { + setPurgeCount(other.getPurgeCount()); + } + if (!other.purgeSample_.isEmpty()) { + if (purgeSample_.isEmpty()) { + purgeSample_ = other.purgeSample_; + bitField0_ |= 0x00000002; + } else { + ensurePurgeSampleIsMutable(); + purgeSample_.addAll(other.purgeSample_); + } + 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: + { + purgeCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePurgeSampleIsMutable(); + purgeSample_.add(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 bitField0_; + + private long purgeCount_; + /** + * + * + *
+     * The total count of products purged as a result of the operation.
+     * 
+ * + * int64 purge_count = 1; + * + * @return The purgeCount. + */ + @java.lang.Override + public long getPurgeCount() { + return purgeCount_; + } + /** + * + * + *
+     * The total count of products purged as a result of the operation.
+     * 
+ * + * int64 purge_count = 1; + * + * @param value The purgeCount to set. + * @return This builder for chaining. + */ + public Builder setPurgeCount(long value) { + + purgeCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The total count of products purged as a result of the operation.
+     * 
+ * + * int64 purge_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearPurgeCount() { + bitField0_ = (bitField0_ & ~0x00000001); + purgeCount_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList purgeSample_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePurgeSampleIsMutable() { + if (!purgeSample_.isModifiable()) { + purgeSample_ = new com.google.protobuf.LazyStringArrayList(purgeSample_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the purgeSample. + */ + public com.google.protobuf.ProtocolStringList getPurgeSampleList() { + purgeSample_.makeImmutable(); + return purgeSample_; + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return The count of purgeSample. + */ + public int getPurgeSampleCount() { + return purgeSample_.size(); + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The purgeSample at the given index. + */ + public java.lang.String getPurgeSample(int index) { + return purgeSample_.get(index); + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the purgeSample at the given index. + */ + public com.google.protobuf.ByteString getPurgeSampleBytes(int index) { + return purgeSample_.getByteString(index); + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index to set the value at. + * @param value The purgeSample to set. + * @return This builder for chaining. + */ + public Builder setPurgeSample(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePurgeSampleIsMutable(); + purgeSample_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The purgeSample to add. + * @return This builder for chaining. + */ + public Builder addPurgeSample(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePurgeSampleIsMutable(); + purgeSample_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param values The purgeSample to add. + * @return This builder for chaining. + */ + public Builder addAllPurgeSample(java.lang.Iterable values) { + ensurePurgeSampleIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, purgeSample_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearPurgeSample() { + purgeSample_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * A sample of the product names that will be deleted.
+     * Only populated if `force` is set to false. A max of 100 names will be
+     * returned and the names are chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes of the purgeSample to add. + * @return This builder for chaining. + */ + public Builder addPurgeSampleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePurgeSampleIsMutable(); + purgeSample_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.PurgeProductsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.PurgeProductsResponse) + private static final com.google.cloud.retail.v2beta.PurgeProductsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.PurgeProductsResponse(); + } + + public static com.google.cloud.retail.v2beta.PurgeProductsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurgeProductsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2beta.PurgeProductsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsResponseOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsResponseOrBuilder.java new file mode 100644 index 000000000000..74404c9e4daf --- /dev/null +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeProductsResponseOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/purge_config.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.retail.v2beta; + +public interface PurgeProductsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.PurgeProductsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The total count of products purged as a result of the operation.
+   * 
+ * + * int64 purge_count = 1; + * + * @return The purgeCount. + */ + long getPurgeCount(); + + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the purgeSample. + */ + java.util.List getPurgeSampleList(); + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return The count of purgeSample. + */ + int getPurgeSampleCount(); + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The purgeSample at the given index. + */ + java.lang.String getPurgeSample(int index); + /** + * + * + *
+   * A sample of the product names that will be deleted.
+   * Only populated if `force` is set to false. A max of 100 names will be
+   * returned and the names are chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the purgeSample at the given index. + */ + com.google.protobuf.ByteString getPurgeSampleBytes(int index); +} diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rule.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rule.java index 0a1dd2c0e424..f013125dfe18 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rule.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rule.java @@ -1027,9 +1027,8 @@ public interface FilterActionOrBuilder * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1053,9 +1052,8 @@ public interface FilterActionOrBuilder * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1075,17 +1073,19 @@ public interface FilterActionOrBuilder * *
    * * Rule Condition:
-   *   - No
-   *   [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
-   *   provided is a global match.
-   *   - 1 or more
-   *   [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
-   *   provided are combined with OR operator.
+   *     - No
+   *     [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
+   *     provided is a global match.
+   *     - 1 or more
+   *     [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
+   *     provided are combined with OR operator.
+   *
    * * Action Input: The request query and filter that are applied to the
    * retrieved products, in addition to any filters already provided with the
    * SearchRequest. The AND operator is used to combine the query's existing
    * filters with the filter rule(s). NOTE: May result in 0 results when
    * filters conflict.
+   *
    * * Action Result: Filters the returned objects to be ONLY those that passed
    * the filter.
    * 
@@ -1141,9 +1141,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1178,9 +1177,8 @@ public java.lang.String getFilter() { * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1371,17 +1369,19 @@ protected Builder newBuilderForType( * *
      * * Rule Condition:
-     *   - No
-     *   [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
-     *   provided is a global match.
-     *   - 1 or more
-     *   [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
-     *   provided are combined with OR operator.
+     *     - No
+     *     [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
+     *     provided is a global match.
+     *     - 1 or more
+     *     [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
+     *     provided are combined with OR operator.
+     *
      * * Action Input: The request query and filter that are applied to the
      * retrieved products, in addition to any filters already provided with the
      * SearchRequest. The AND operator is used to combine the query's existing
      * filters with the filter rule(s). NOTE: May result in 0 results when
      * filters conflict.
+     *
      * * Action Result: Filters the returned objects to be ONLY those that passed
      * the filter.
      * 
@@ -1576,9 +1576,8 @@ public Builder mergeFrom( * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1612,9 +1611,8 @@ public java.lang.String getFilter() { * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1648,9 +1646,8 @@ public com.google.protobuf.ByteString getFilterBytes() { * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1683,9 +1680,8 @@ public Builder setFilter(java.lang.String value) { * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1714,9 +1710,8 @@ public Builder clearFilter() { * set. * * Filter syntax is identical to * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. - * See more - * details at the Retail Search - * [user guide](/retail/search/docs/filter-and-order#filter). + * For more + * information, see [Filter](/retail/docs/filter-and-order#filter). * * To filter products with product ID "product_1" or "product_2", and * color * "Red" or "Blue":<br> @@ -1842,7 +1837,7 @@ public interface RedirectActionOrBuilder * Redirects a shopper to a specific page. * * * Rule Condition: - * - Must specify + * Must specify * [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]. * * Action Input: Request Query * * Action Result: Redirects shopper to provided uri. @@ -2103,7 +2098,7 @@ protected Builder newBuilderForType( * Redirects a shopper to a specific page. * * * Rule Condition: - * - Must specify + * Must specify * [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]. * * Action Input: Request Query * * Action Result: Redirects shopper to provided uri. @@ -8229,211 +8224,3090 @@ public com.google.cloud.retail.v2beta.Rule.IgnoreAction getDefaultInstanceForTyp } } - private int bitField0_; - private int actionCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object action_; - - public enum ActionCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - BOOST_ACTION(2), - REDIRECT_ACTION(3), - ONEWAY_SYNONYMS_ACTION(6), - DO_NOT_ASSOCIATE_ACTION(7), - REPLACEMENT_ACTION(8), - IGNORE_ACTION(9), - FILTER_ACTION(10), - TWOWAY_SYNONYMS_ACTION(11), - ACTION_NOT_SET(0); - private final int value; + public interface ForceReturnFacetActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) + com.google.protobuf.MessageOrBuilder { - private ActionCase(int value) { - this.value = value; - } /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * */ - @java.lang.Deprecated - public static ActionCase valueOf(int value) { - return forNumber(value); - } - - public static ActionCase forNumber(int value) { - switch (value) { - case 2: - return BOOST_ACTION; - case 3: - return REDIRECT_ACTION; - case 6: - return ONEWAY_SYNONYMS_ACTION; - case 7: - return DO_NOT_ASSOCIATE_ACTION; - case 8: - return REPLACEMENT_ACTION; - case 9: - return IGNORE_ACTION; - case 10: - return FILTER_ACTION; - case 11: - return TWOWAY_SYNONYMS_ACTION; - case 0: - return ACTION_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ActionCase getActionCase() { - return ActionCase.forNumber(actionCase_); + java.util.List< + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment> + getFacetPositionAdjustmentsList(); + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getFacetPositionAdjustments(int index); + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + int getFacetPositionAdjustmentsCount(); + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder> + getFacetPositionAdjustmentsOrBuilderList(); + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustmentOrBuilder + getFacetPositionAdjustmentsOrBuilder(int index); } - - public static final int BOOST_ACTION_FIELD_NUMBER = 2; /** * * *
-   * A boost action.
-   * 
- * - * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; - * - * @return Whether the boostAction field is set. - */ - @java.lang.Override - public boolean hasBoostAction() { - return actionCase_ == 2; - } - /** + * Force returns an attribute/facet in the request around a certain position + * or above. * - * - *
-   * A boost action.
+   * * Rule Condition:
+   *   Must specify non-empty
+   *   [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
+   *   (for search only) or
+   *   [Condition.page_categories][google.cloud.retail.v2beta.Condition.page_categories]
+   *   (for browse only), but can't specify both.
+   *
+   * * Action Inputs: attribute name, position
+   *
+   * * Action Result: Will force return a facet key around a certain position
+   * or above if the condition is satisfied.
+   *
+   * Example: Suppose the query is "shoes", the
+   * [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
+   * is "shoes", the
+   * [ForceReturnFacetAction.FacetPositionAdjustment.attribute_name][google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment.attribute_name]
+   * is "size" and the
+   * [ForceReturnFacetAction.FacetPositionAdjustment.position][google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment.position]
+   * is 8.
+   *
+   * Two cases: a) The facet key "size" is not already in the top 8 slots, then
+   * the facet "size" will appear at a position close to 8. b) The facet key
+   * "size" in among the top 8 positions in the request, then it will stay at
+   * its current rank.
    * 
* - * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; - * - * @return The boostAction. + * Protobuf type {@code google.cloud.retail.v2beta.Rule.ForceReturnFacetAction} */ - @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.BoostAction getBoostAction() { - if (actionCase_ == 2) { - return (com.google.cloud.retail.v2beta.Rule.BoostAction) action_; + public static final class ForceReturnFacetAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) + ForceReturnFacetActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ForceReturnFacetAction.newBuilder() to construct. + private ForceReturnFacetAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - return com.google.cloud.retail.v2beta.Rule.BoostAction.getDefaultInstance(); - } - /** - * - * - *
-   * A boost action.
-   * 
- * - * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; - */ - @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.BoostActionOrBuilder getBoostActionOrBuilder() { - if (actionCase_ == 2) { - return (com.google.cloud.retail.v2beta.Rule.BoostAction) action_; + + private ForceReturnFacetAction() { + facetPositionAdjustments_ = java.util.Collections.emptyList(); } - return com.google.cloud.retail.v2beta.Rule.BoostAction.getDefaultInstance(); - } - public static final int REDIRECT_ACTION_FIELD_NUMBER = 3; - /** - * - * - *
-   * Redirects a shopper to a specific page.
-   * 
- * - * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; - * - * @return Whether the redirectAction field is set. - */ - @java.lang.Override - public boolean hasRedirectAction() { - return actionCase_ == 3; - } - /** - * - * - *
-   * Redirects a shopper to a specific page.
-   * 
- * - * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; - * - * @return The redirectAction. - */ - @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.RedirectAction getRedirectAction() { - if (actionCase_ == 3) { - return (com.google.cloud.retail.v2beta.Rule.RedirectAction) action_; + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ForceReturnFacetAction(); } - return com.google.cloud.retail.v2beta.Rule.RedirectAction.getDefaultInstance(); - } - /** - * - * - *
-   * Redirects a shopper to a specific page.
-   * 
- * - * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; - */ - @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.RedirectActionOrBuilder getRedirectActionOrBuilder() { - if (actionCase_ == 3) { - return (com.google.cloud.retail.v2beta.Rule.RedirectAction) action_; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_descriptor; } - return com.google.cloud.retail.v2beta.Rule.RedirectAction.getDefaultInstance(); - } - public static final int ONEWAY_SYNONYMS_ACTION_FIELD_NUMBER = 6; - /** - * - * - *
-   * Treats specific term as a synonym with a group of terms.
-   * Group of terms will not be treated as synonyms with the specific term.
-   * 
- * - * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * - * @return Whether the onewaySynonymsAction field is set. - */ - @java.lang.Override - public boolean hasOnewaySynonymsAction() { - return actionCase_ == 6; - } - /** - * - * - *
-   * Treats specific term as a synonym with a group of terms.
-   * Group of terms will not be treated as synonyms with the specific term.
-   * 
- * - * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * - * @return The onewaySynonymsAction. - */ - @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction getOnewaySynonymsAction() { - if (actionCase_ == 6) { - return (com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction) action_; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.class, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.Builder.class); } - return com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.getDefaultInstance(); + + public interface FacetPositionAdjustmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The attribute name to force return as a facet. Each attribute name
+       * should be a valid attribute name, be non-empty and contain at most 80
+       * characters long.
+       * 
+ * + * string attribute_name = 1; + * + * @return The attributeName. + */ + java.lang.String getAttributeName(); + /** + * + * + *
+       * The attribute name to force return as a facet. Each attribute name
+       * should be a valid attribute name, be non-empty and contain at most 80
+       * characters long.
+       * 
+ * + * string attribute_name = 1; + * + * @return The bytes for attributeName. + */ + com.google.protobuf.ByteString getAttributeNameBytes(); + + /** + * + * + *
+       * This is the position in the request as explained above. It should be
+       * strictly positive be at most 100.
+       * 
+ * + * int32 position = 2; + * + * @return The position. + */ + int getPosition(); + } + /** + * + * + *
+     * Each facet position adjustment consists of a single attribute name (i.e.
+     * facet key) along with a specified position.
+     * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment} + */ + public static final class FacetPositionAdjustment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + FacetPositionAdjustmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use FacetPositionAdjustment.newBuilder() to construct. + private FacetPositionAdjustment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FacetPositionAdjustment() { + attributeName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FacetPositionAdjustment(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_FacetPositionAdjustment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .class, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder.class); + } + + public static final int ATTRIBUTE_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object attributeName_ = ""; + /** + * + * + *
+       * The attribute name to force return as a facet. Each attribute name
+       * should be a valid attribute name, be non-empty and contain at most 80
+       * characters long.
+       * 
+ * + * string attribute_name = 1; + * + * @return The attributeName. + */ + @java.lang.Override + public java.lang.String getAttributeName() { + java.lang.Object ref = attributeName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeName_ = s; + return s; + } + } + /** + * + * + *
+       * The attribute name to force return as a facet. Each attribute name
+       * should be a valid attribute name, be non-empty and contain at most 80
+       * characters long.
+       * 
+ * + * string attribute_name = 1; + * + * @return The bytes for attributeName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttributeNameBytes() { + java.lang.Object ref = attributeName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POSITION_FIELD_NUMBER = 2; + private int position_ = 0; + /** + * + * + *
+       * This is the position in the request as explained above. It should be
+       * strictly positive be at most 100.
+       * 
+ * + * int32 position = 2; + * + * @return The position. + */ + @java.lang.Override + public int getPosition() { + return position_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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.GeneratedMessageV3.isStringEmpty(attributeName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeName_); + } + if (position_ != 0) { + output.writeInt32(2, position_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeName_); + } + if (position_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, 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.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment other = + (com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + obj; + + if (!getAttributeName().equals(other.getAttributeName())) return false; + if (getPosition() != other.getPosition()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ATTRIBUTE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAttributeName().hashCode(); + hash = (37 * hash) + POSITION_FIELD_NUMBER; + hash = (53 * hash) + getPosition(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Each facet position adjustment consists of a single attribute name (i.e.
+       * facet key) along with a specified position.
+       * 
+ * + * Protobuf type {@code + * google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_FacetPositionAdjustment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .class, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder.class); + } + + // Construct using + // com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeName_ = ""; + position_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_FacetPositionAdjustment_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + build() { + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + buildPartial() { + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + result = + new com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attributeName_ = attributeName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.position_ = position_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment) { + return mergeFrom( + (com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + other) { + if (other + == com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .getDefaultInstance()) return this; + if (!other.getAttributeName().isEmpty()) { + attributeName_ = other.attributeName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPosition() != 0) { + setPosition(other.getPosition()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attributeName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + position_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object attributeName_ = ""; + /** + * + * + *
+         * The attribute name to force return as a facet. Each attribute name
+         * should be a valid attribute name, be non-empty and contain at most 80
+         * characters long.
+         * 
+ * + * string attribute_name = 1; + * + * @return The attributeName. + */ + public java.lang.String getAttributeName() { + java.lang.Object ref = attributeName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The attribute name to force return as a facet. Each attribute name
+         * should be a valid attribute name, be non-empty and contain at most 80
+         * characters long.
+         * 
+ * + * string attribute_name = 1; + * + * @return The bytes for attributeName. + */ + public com.google.protobuf.ByteString getAttributeNameBytes() { + java.lang.Object ref = attributeName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The attribute name to force return as a facet. Each attribute name
+         * should be a valid attribute name, be non-empty and contain at most 80
+         * characters long.
+         * 
+ * + * string attribute_name = 1; + * + * @param value The attributeName to set. + * @return This builder for chaining. + */ + public Builder setAttributeName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + attributeName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The attribute name to force return as a facet. Each attribute name
+         * should be a valid attribute name, be non-empty and contain at most 80
+         * characters long.
+         * 
+ * + * string attribute_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearAttributeName() { + attributeName_ = getDefaultInstance().getAttributeName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * The attribute name to force return as a facet. Each attribute name
+         * should be a valid attribute name, be non-empty and contain at most 80
+         * characters long.
+         * 
+ * + * string attribute_name = 1; + * + * @param value The bytes for attributeName to set. + * @return This builder for chaining. + */ + public Builder setAttributeNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + attributeName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int position_; + /** + * + * + *
+         * This is the position in the request as explained above. It should be
+         * strictly positive be at most 100.
+         * 
+ * + * int32 position = 2; + * + * @return The position. + */ + @java.lang.Override + public int getPosition() { + return position_; + } + /** + * + * + *
+         * This is the position in the request as explained above. It should be
+         * strictly positive be at most 100.
+         * 
+ * + * int32 position = 2; + * + * @param value The position to set. + * @return This builder for chaining. + */ + public Builder setPosition(int value) { + + position_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * This is the position in the request as explained above. It should be
+         * strictly positive be at most 100.
+         * 
+ * + * int32 position = 2; + * + * @return This builder for chaining. + */ + public Builder clearPosition() { + bitField0_ = (bitField0_ & ~0x00000002); + position_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment) + private static final com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment(); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FacetPositionAdjustment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int FACET_POSITION_ADJUSTMENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment> + facetPositionAdjustments_; + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment> + getFacetPositionAdjustmentsList() { + return facetPositionAdjustments_; + } + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder> + getFacetPositionAdjustmentsOrBuilderList() { + return facetPositionAdjustments_; + } + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + @java.lang.Override + public int getFacetPositionAdjustmentsCount() { + return facetPositionAdjustments_.size(); + } + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getFacetPositionAdjustments(int index) { + return facetPositionAdjustments_.get(index); + } + /** + * + * + *
+     * Each instance corresponds to a force return attribute for the given
+     * condition. There can't be more 3 instances here.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder + getFacetPositionAdjustmentsOrBuilder(int index) { + return facetPositionAdjustments_.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 < facetPositionAdjustments_.size(); i++) { + output.writeMessage(1, facetPositionAdjustments_.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 < facetPositionAdjustments_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, facetPositionAdjustments_.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.retail.v2beta.Rule.ForceReturnFacetAction)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction other = + (com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) obj; + + if (!getFacetPositionAdjustmentsList().equals(other.getFacetPositionAdjustmentsList())) + 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 (getFacetPositionAdjustmentsCount() > 0) { + hash = (37 * hash) + FACET_POSITION_ADJUSTMENTS_FIELD_NUMBER; + hash = (53 * hash) + getFacetPositionAdjustmentsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2beta.Rule.ForceReturnFacetAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Force returns an attribute/facet in the request around a certain position
+     * or above.
+     *
+     * * Rule Condition:
+     *   Must specify non-empty
+     *   [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
+     *   (for search only) or
+     *   [Condition.page_categories][google.cloud.retail.v2beta.Condition.page_categories]
+     *   (for browse only), but can't specify both.
+     *
+     * * Action Inputs: attribute name, position
+     *
+     * * Action Result: Will force return a facet key around a certain position
+     * or above if the condition is satisfied.
+     *
+     * Example: Suppose the query is "shoes", the
+     * [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
+     * is "shoes", the
+     * [ForceReturnFacetAction.FacetPositionAdjustment.attribute_name][google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment.attribute_name]
+     * is "size" and the
+     * [ForceReturnFacetAction.FacetPositionAdjustment.position][google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment.position]
+     * is 8.
+     *
+     * Two cases: a) The facet key "size" is not already in the top 8 slots, then
+     * the facet "size" will appear at a position close to 8. b) The facet key
+     * "size" in among the top 8 positions in the request, then it will stay at
+     * its current rank.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.Rule.ForceReturnFacetAction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.class, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (facetPositionAdjustmentsBuilder_ == null) { + facetPositionAdjustments_ = java.util.Collections.emptyList(); + } else { + facetPositionAdjustments_ = null; + facetPositionAdjustmentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_ForceReturnFacetAction_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction build() { + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction buildPartial() { + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction result = + new com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction result) { + if (facetPositionAdjustmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + facetPositionAdjustments_ = + java.util.Collections.unmodifiableList(facetPositionAdjustments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.facetPositionAdjustments_ = facetPositionAdjustments_; + } else { + result.facetPositionAdjustments_ = facetPositionAdjustmentsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) { + return mergeFrom((com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction other) { + if (other + == com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.getDefaultInstance()) + return this; + if (facetPositionAdjustmentsBuilder_ == null) { + if (!other.facetPositionAdjustments_.isEmpty()) { + if (facetPositionAdjustments_.isEmpty()) { + facetPositionAdjustments_ = other.facetPositionAdjustments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.addAll(other.facetPositionAdjustments_); + } + onChanged(); + } + } else { + if (!other.facetPositionAdjustments_.isEmpty()) { + if (facetPositionAdjustmentsBuilder_.isEmpty()) { + facetPositionAdjustmentsBuilder_.dispose(); + facetPositionAdjustmentsBuilder_ = null; + facetPositionAdjustments_ = other.facetPositionAdjustments_; + bitField0_ = (bitField0_ & ~0x00000001); + facetPositionAdjustmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFacetPositionAdjustmentsFieldBuilder() + : null; + } else { + facetPositionAdjustmentsBuilder_.addAllMessages(other.facetPositionAdjustments_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + m = + input.readMessage( + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment.parser(), + extensionRegistry); + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.add(m); + } else { + facetPositionAdjustmentsBuilder_.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.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment> + facetPositionAdjustments_ = java.util.Collections.emptyList(); + + private void ensureFacetPositionAdjustmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + facetPositionAdjustments_ = + new java.util.ArrayList< + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment>(facetPositionAdjustments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder> + facetPositionAdjustmentsBuilder_; + + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public java.util.List< + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment> + getFacetPositionAdjustmentsList() { + if (facetPositionAdjustmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(facetPositionAdjustments_); + } else { + return facetPositionAdjustmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public int getFacetPositionAdjustmentsCount() { + if (facetPositionAdjustmentsBuilder_ == null) { + return facetPositionAdjustments_.size(); + } else { + return facetPositionAdjustmentsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + getFacetPositionAdjustments(int index) { + if (facetPositionAdjustmentsBuilder_ == null) { + return facetPositionAdjustments_.get(index); + } else { + return facetPositionAdjustmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder setFacetPositionAdjustments( + int index, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + value) { + if (facetPositionAdjustmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.set(index, value); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder setFacetPositionAdjustments( + int index, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder + builderForValue) { + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.set(index, builderForValue.build()); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder addFacetPositionAdjustments( + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + value) { + if (facetPositionAdjustmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.add(value); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder addFacetPositionAdjustments( + int index, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + value) { + if (facetPositionAdjustmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.add(index, value); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder addFacetPositionAdjustments( + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder + builderForValue) { + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.add(builderForValue.build()); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder addFacetPositionAdjustments( + int index, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder + builderForValue) { + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.add(index, builderForValue.build()); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder addAllFacetPositionAdjustments( + java.lang.Iterable< + ? extends + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment> + values) { + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, facetPositionAdjustments_); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder clearFacetPositionAdjustments() { + if (facetPositionAdjustmentsBuilder_ == null) { + facetPositionAdjustments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public Builder removeFacetPositionAdjustments(int index) { + if (facetPositionAdjustmentsBuilder_ == null) { + ensureFacetPositionAdjustmentsIsMutable(); + facetPositionAdjustments_.remove(index); + onChanged(); + } else { + facetPositionAdjustmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder + getFacetPositionAdjustmentsBuilder(int index) { + return getFacetPositionAdjustmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder + getFacetPositionAdjustmentsOrBuilder(int index) { + if (facetPositionAdjustmentsBuilder_ == null) { + return facetPositionAdjustments_.get(index); + } else { + return facetPositionAdjustmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder> + getFacetPositionAdjustmentsOrBuilderList() { + if (facetPositionAdjustmentsBuilder_ != null) { + return facetPositionAdjustmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(facetPositionAdjustments_); + } + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder + addFacetPositionAdjustmentsBuilder() { + return getFacetPositionAdjustmentsFieldBuilder() + .addBuilder( + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder + addFacetPositionAdjustmentsBuilder(int index) { + return getFacetPositionAdjustmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .getDefaultInstance()); + } + /** + * + * + *
+       * Each instance corresponds to a force return attribute for the given
+       * condition. There can't be more 3 instances here.
+       * 
+ * + * + * repeated .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1; + * + */ + public java.util.List< + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder> + getFacetPositionAdjustmentsBuilderList() { + return getFacetPositionAdjustmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder> + getFacetPositionAdjustmentsFieldBuilder() { + if (facetPositionAdjustmentsBuilder_ == null) { + facetPositionAdjustmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustment, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment + .Builder, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .FacetPositionAdjustmentOrBuilder>( + facetPositionAdjustments_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + facetPositionAdjustments_ = null; + } + return facetPositionAdjustmentsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) + private static final com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction(); + } + + public static com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ForceReturnFacetAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2beta.Rule.ForceReturnFacetAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RemoveFacetActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.Rule.RemoveFacetAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @return A list containing the attributeNames. + */ + java.util.List getAttributeNamesList(); + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @return The count of attributeNames. + */ + int getAttributeNamesCount(); + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the element to return. + * @return The attributeNames at the given index. + */ + java.lang.String getAttributeNames(int index); + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the attributeNames at the given index. + */ + com.google.protobuf.ByteString getAttributeNamesBytes(int index); + } + /** + * + * + *
+   * Removes an attribute/facet in the request if is present.
+   *
+   * * Rule Condition:
+   *   Must specify non-empty
+   *   [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
+   *   (for search only) or
+   *   [Condition.page_categories][google.cloud.retail.v2beta.Condition.page_categories]
+   *   (for browse only), but can't specify both.
+   *
+   * * Action Input: attribute name
+   *
+   * * Action Result: Will remove the attribute (as a facet) from the request
+   * if it is present.
+   *
+   * Example: Suppose the query is "shoes", the
+   * [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
+   * is "shoes" and the attribute name "size", then facet key "size" will be
+   * removed from the request (if it is present).
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.Rule.RemoveFacetAction} + */ + public static final class RemoveFacetAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.Rule.RemoveFacetAction) + RemoveFacetActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveFacetAction.newBuilder() to construct. + private RemoveFacetAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveFacetAction() { + attributeNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveFacetAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_RemoveFacetAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_RemoveFacetAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.class, + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.Builder.class); + } + + public static final int ATTRIBUTE_NAMES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList attributeNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @return A list containing the attributeNames. + */ + public com.google.protobuf.ProtocolStringList getAttributeNamesList() { + return attributeNames_; + } + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @return The count of attributeNames. + */ + public int getAttributeNamesCount() { + return attributeNames_.size(); + } + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the element to return. + * @return The attributeNames at the given index. + */ + public java.lang.String getAttributeNames(int index) { + return attributeNames_.get(index); + } + /** + * + * + *
+     * The attribute names (i.e. facet keys) to remove from the dynamic facets
+     * (if present in the request). There can't be more 3 attribute names.
+     * Each attribute name should be a valid attribute name, be non-empty and
+     * contain at most 80 characters.
+     * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the attributeNames at the given index. + */ + public com.google.protobuf.ByteString getAttributeNamesBytes(int index) { + return attributeNames_.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 < attributeNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeNames_.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 < attributeNames_.size(); i++) { + dataSize += computeStringSizeNoTag(attributeNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getAttributeNamesList().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.retail.v2beta.Rule.RemoveFacetAction)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction other = + (com.google.cloud.retail.v2beta.Rule.RemoveFacetAction) obj; + + if (!getAttributeNamesList().equals(other.getAttributeNamesList())) 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 (getAttributeNamesCount() > 0) { + hash = (37 * hash) + ATTRIBUTE_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getAttributeNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.Rule.RemoveFacetAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Rule.RemoveFacetAction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Rule.RemoveFacetAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Rule.RemoveFacetAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Rule.RemoveFacetAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Rule.RemoveFacetAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Rule.RemoveFacetAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Rule.RemoveFacetAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Rule.RemoveFacetAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Rule.RemoveFacetAction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Rule.RemoveFacetAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Rule.RemoveFacetAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.retail.v2beta.Rule.RemoveFacetAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Removes an attribute/facet in the request if is present.
+     *
+     * * Rule Condition:
+     *   Must specify non-empty
+     *   [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
+     *   (for search only) or
+     *   [Condition.page_categories][google.cloud.retail.v2beta.Condition.page_categories]
+     *   (for browse only), but can't specify both.
+     *
+     * * Action Input: attribute name
+     *
+     * * Action Result: Will remove the attribute (as a facet) from the request
+     * if it is present.
+     *
+     * Example: Suppose the query is "shoes", the
+     * [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
+     * is "shoes" and the attribute name "size", then facet key "size" will be
+     * removed from the request (if it is present).
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.Rule.RemoveFacetAction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.Rule.RemoveFacetAction) + com.google.cloud.retail.v2beta.Rule.RemoveFacetActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_RemoveFacetAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_RemoveFacetAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.class, + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_RemoveFacetAction_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.RemoveFacetAction getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.RemoveFacetAction build() { + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.RemoveFacetAction buildPartial() { + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction result = + new com.google.cloud.retail.v2beta.Rule.RemoveFacetAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2beta.Rule.RemoveFacetAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + attributeNames_.makeImmutable(); + result.attributeNames_ = attributeNames_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.Rule.RemoveFacetAction) { + return mergeFrom((com.google.cloud.retail.v2beta.Rule.RemoveFacetAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.Rule.RemoveFacetAction other) { + if (other == com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.getDefaultInstance()) + return this; + if (!other.attributeNames_.isEmpty()) { + if (attributeNames_.isEmpty()) { + attributeNames_ = other.attributeNames_; + bitField0_ |= 0x00000001; + } else { + ensureAttributeNamesIsMutable(); + attributeNames_.addAll(other.attributeNames_); + } + 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(); + ensureAttributeNamesIsMutable(); + attributeNames_.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 attributeNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAttributeNamesIsMutable() { + if (!attributeNames_.isModifiable()) { + attributeNames_ = new com.google.protobuf.LazyStringArrayList(attributeNames_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @return A list containing the attributeNames. + */ + public com.google.protobuf.ProtocolStringList getAttributeNamesList() { + attributeNames_.makeImmutable(); + return attributeNames_; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @return The count of attributeNames. + */ + public int getAttributeNamesCount() { + return attributeNames_.size(); + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the element to return. + * @return The attributeNames at the given index. + */ + public java.lang.String getAttributeNames(int index) { + return attributeNames_.get(index); + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the attributeNames at the given index. + */ + public com.google.protobuf.ByteString getAttributeNamesBytes(int index) { + return attributeNames_.getByteString(index); + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param index The index to set the value at. + * @param value The attributeNames to set. + * @return This builder for chaining. + */ + public Builder setAttributeNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributeNamesIsMutable(); + attributeNames_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param value The attributeNames to add. + * @return This builder for chaining. + */ + public Builder addAttributeNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributeNamesIsMutable(); + attributeNames_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param values The attributeNames to add. + * @return This builder for chaining. + */ + public Builder addAllAttributeNames(java.lang.Iterable values) { + ensureAttributeNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributeNames_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @return This builder for chaining. + */ + public Builder clearAttributeNames() { + attributeNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute names (i.e. facet keys) to remove from the dynamic facets
+       * (if present in the request). There can't be more 3 attribute names.
+       * Each attribute name should be a valid attribute name, be non-empty and
+       * contain at most 80 characters.
+       * 
+ * + * repeated string attribute_names = 1; + * + * @param value The bytes of the attributeNames to add. + * @return This builder for chaining. + */ + public Builder addAttributeNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAttributeNamesIsMutable(); + attributeNames_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.Rule.RemoveFacetAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.Rule.RemoveFacetAction) + private static final com.google.cloud.retail.v2beta.Rule.RemoveFacetAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.Rule.RemoveFacetAction(); + } + + public static com.google.cloud.retail.v2beta.Rule.RemoveFacetAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveFacetAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.retail.v2beta.Rule.RemoveFacetAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int actionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object action_; + + public enum ActionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BOOST_ACTION(2), + REDIRECT_ACTION(3), + ONEWAY_SYNONYMS_ACTION(6), + DO_NOT_ASSOCIATE_ACTION(7), + REPLACEMENT_ACTION(8), + IGNORE_ACTION(9), + FILTER_ACTION(10), + TWOWAY_SYNONYMS_ACTION(11), + FORCE_RETURN_FACET_ACTION(12), + REMOVE_FACET_ACTION(13), + ACTION_NOT_SET(0); + private final int value; + + private ActionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ActionCase valueOf(int value) { + return forNumber(value); + } + + public static ActionCase forNumber(int value) { + switch (value) { + case 2: + return BOOST_ACTION; + case 3: + return REDIRECT_ACTION; + case 6: + return ONEWAY_SYNONYMS_ACTION; + case 7: + return DO_NOT_ASSOCIATE_ACTION; + case 8: + return REPLACEMENT_ACTION; + case 9: + return IGNORE_ACTION; + case 10: + return FILTER_ACTION; + case 11: + return TWOWAY_SYNONYMS_ACTION; + case 12: + return FORCE_RETURN_FACET_ACTION; + case 13: + return REMOVE_FACET_ACTION; + case 0: + return ACTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); + } + + public static final int BOOST_ACTION_FIELD_NUMBER = 2; + /** + * + * + *
+   * A boost action.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + * + * @return Whether the boostAction field is set. + */ + @java.lang.Override + public boolean hasBoostAction() { + return actionCase_ == 2; + } + /** + * + * + *
+   * A boost action.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + * + * @return The boostAction. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.BoostAction getBoostAction() { + if (actionCase_ == 2) { + return (com.google.cloud.retail.v2beta.Rule.BoostAction) action_; + } + return com.google.cloud.retail.v2beta.Rule.BoostAction.getDefaultInstance(); + } + /** + * + * + *
+   * A boost action.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.BoostActionOrBuilder getBoostActionOrBuilder() { + if (actionCase_ == 2) { + return (com.google.cloud.retail.v2beta.Rule.BoostAction) action_; + } + return com.google.cloud.retail.v2beta.Rule.BoostAction.getDefaultInstance(); + } + + public static final int REDIRECT_ACTION_FIELD_NUMBER = 3; + /** + * + * + *
+   * Redirects a shopper to a specific page.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + * + * @return Whether the redirectAction field is set. + */ + @java.lang.Override + public boolean hasRedirectAction() { + return actionCase_ == 3; + } + /** + * + * + *
+   * Redirects a shopper to a specific page.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + * + * @return The redirectAction. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.RedirectAction getRedirectAction() { + if (actionCase_ == 3) { + return (com.google.cloud.retail.v2beta.Rule.RedirectAction) action_; + } + return com.google.cloud.retail.v2beta.Rule.RedirectAction.getDefaultInstance(); + } + /** + * + * + *
+   * Redirects a shopper to a specific page.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.RedirectActionOrBuilder getRedirectActionOrBuilder() { + if (actionCase_ == 3) { + return (com.google.cloud.retail.v2beta.Rule.RedirectAction) action_; + } + return com.google.cloud.retail.v2beta.Rule.RedirectAction.getDefaultInstance(); + } + + public static final int ONEWAY_SYNONYMS_ACTION_FIELD_NUMBER = 6; + /** + * + * + *
+   * Treats specific term as a synonym with a group of terms.
+   * Group of terms will not be treated as synonyms with the specific term.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * + * @return Whether the onewaySynonymsAction field is set. + */ + @java.lang.Override + public boolean hasOnewaySynonymsAction() { + return actionCase_ == 6; + } + /** + * + * + *
+   * Treats specific term as a synonym with a group of terms.
+   * Group of terms will not be treated as synonyms with the specific term.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * + * @return The onewaySynonymsAction. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction getOnewaySynonymsAction() { + if (actionCase_ == 6) { + return (com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction) action_; + } + return com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.getDefaultInstance(); } /** * @@ -8647,69 +11521,176 @@ public com.google.cloud.retail.v2beta.Rule.FilterAction getFilterAction() { * * *
-   * Filters results.
+   * Filters results.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.FilterActionOrBuilder getFilterActionOrBuilder() { + if (actionCase_ == 10) { + return (com.google.cloud.retail.v2beta.Rule.FilterAction) action_; + } + return com.google.cloud.retail.v2beta.Rule.FilterAction.getDefaultInstance(); + } + + public static final int TWOWAY_SYNONYMS_ACTION_FIELD_NUMBER = 11; + /** + * + * + *
+   * Treats a set of terms as synonyms of one another.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * + * @return Whether the twowaySynonymsAction field is set. + */ + @java.lang.Override + public boolean hasTwowaySynonymsAction() { + return actionCase_ == 11; + } + /** + * + * + *
+   * Treats a set of terms as synonyms of one another.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * + * @return The twowaySynonymsAction. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction getTwowaySynonymsAction() { + if (actionCase_ == 11) { + return (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_; + } + return com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.getDefaultInstance(); + } + /** + * + * + *
+   * Treats a set of terms as synonyms of one another.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.TwowaySynonymsActionOrBuilder + getTwowaySynonymsActionOrBuilder() { + if (actionCase_ == 11) { + return (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_; + } + return com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.getDefaultInstance(); + } + + public static final int FORCE_RETURN_FACET_ACTION_FIELD_NUMBER = 12; + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + * + * @return Whether the forceReturnFacetAction field is set. + */ + @java.lang.Override + public boolean hasForceReturnFacetAction() { + return actionCase_ == 12; + } + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + * + * @return The forceReturnFacetAction. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction getForceReturnFacetAction() { + if (actionCase_ == 12) { + return (com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) action_; + } + return com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.getDefaultInstance(); + } + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
    * 
* - * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.FilterActionOrBuilder getFilterActionOrBuilder() { - if (actionCase_ == 10) { - return (com.google.cloud.retail.v2beta.Rule.FilterAction) action_; + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetActionOrBuilder + getForceReturnFacetActionOrBuilder() { + if (actionCase_ == 12) { + return (com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) action_; } - return com.google.cloud.retail.v2beta.Rule.FilterAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.getDefaultInstance(); } - public static final int TWOWAY_SYNONYMS_ACTION_FIELD_NUMBER = 11; + public static final int REMOVE_FACET_ACTION_FIELD_NUMBER = 13; /** * * *
-   * Treats a set of terms as synonyms of one another.
+   * Remove an attribute as a facet in the request (if present).
    * 
* - * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * .google.cloud.retail.v2beta.Rule.RemoveFacetAction remove_facet_action = 13; * - * @return Whether the twowaySynonymsAction field is set. + * @return Whether the removeFacetAction field is set. */ @java.lang.Override - public boolean hasTwowaySynonymsAction() { - return actionCase_ == 11; + public boolean hasRemoveFacetAction() { + return actionCase_ == 13; } /** * * *
-   * Treats a set of terms as synonyms of one another.
+   * Remove an attribute as a facet in the request (if present).
    * 
* - * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * .google.cloud.retail.v2beta.Rule.RemoveFacetAction remove_facet_action = 13; * - * @return The twowaySynonymsAction. + * @return The removeFacetAction. */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction getTwowaySynonymsAction() { - if (actionCase_ == 11) { - return (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_; + public com.google.cloud.retail.v2beta.Rule.RemoveFacetAction getRemoveFacetAction() { + if (actionCase_ == 13) { + return (com.google.cloud.retail.v2beta.Rule.RemoveFacetAction) action_; } - return com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.getDefaultInstance(); } /** * * *
-   * Treats a set of terms as synonyms of one another.
+   * Remove an attribute as a facet in the request (if present).
    * 
* - * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * .google.cloud.retail.v2beta.Rule.RemoveFacetAction remove_facet_action = 13; */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.TwowaySynonymsActionOrBuilder - getTwowaySynonymsActionOrBuilder() { - if (actionCase_ == 11) { - return (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_; + public com.google.cloud.retail.v2beta.Rule.RemoveFacetActionOrBuilder + getRemoveFacetActionOrBuilder() { + if (actionCase_ == 13) { + return (com.google.cloud.retail.v2beta.Rule.RemoveFacetAction) action_; } - return com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.getDefaultInstance(); } public static final int CONDITION_FIELD_NUMBER = 1; @@ -8812,6 +11793,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (actionCase_ == 11) { output.writeMessage(11, (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_); } + if (actionCase_ == 12) { + output.writeMessage(12, (com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) action_); + } + if (actionCase_ == 13) { + output.writeMessage(13, (com.google.cloud.retail.v2beta.Rule.RemoveFacetAction) action_); + } getUnknownFields().writeTo(output); } @@ -8864,6 +11851,16 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 11, (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_); } + if (actionCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) action_); + } + if (actionCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.cloud.retail.v2beta.Rule.RemoveFacetAction) action_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -8909,6 +11906,12 @@ public boolean equals(final java.lang.Object obj) { case 11: if (!getTwowaySynonymsAction().equals(other.getTwowaySynonymsAction())) return false; break; + case 12: + if (!getForceReturnFacetAction().equals(other.getForceReturnFacetAction())) return false; + break; + case 13: + if (!getRemoveFacetAction().equals(other.getRemoveFacetAction())) return false; + break; case 0: default: } @@ -8960,6 +11963,14 @@ public int hashCode() { hash = (37 * hash) + TWOWAY_SYNONYMS_ACTION_FIELD_NUMBER; hash = (53 * hash) + getTwowaySynonymsAction().hashCode(); break; + case 12: + hash = (37 * hash) + FORCE_RETURN_FACET_ACTION_FIELD_NUMBER; + hash = (53 * hash) + getForceReturnFacetAction().hashCode(); + break; + case 13: + hash = (37 * hash) + REMOVE_FACET_ACTION_FIELD_NUMBER; + hash = (53 * hash) + getRemoveFacetAction().hashCode(); + break; case 0: default: } @@ -9087,453 +12098,921 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.retail.v2beta.CommonProto - .internal_static_google_cloud_retail_v2beta_Rule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.retail.v2beta.Rule.class, - com.google.cloud.retail.v2beta.Rule.Builder.class); + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.Rule.class, + com.google.cloud.retail.v2beta.Rule.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.Rule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConditionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (boostActionBuilder_ != null) { + boostActionBuilder_.clear(); + } + if (redirectActionBuilder_ != null) { + redirectActionBuilder_.clear(); + } + if (onewaySynonymsActionBuilder_ != null) { + onewaySynonymsActionBuilder_.clear(); + } + if (doNotAssociateActionBuilder_ != null) { + doNotAssociateActionBuilder_.clear(); + } + if (replacementActionBuilder_ != null) { + replacementActionBuilder_.clear(); + } + if (ignoreActionBuilder_ != null) { + ignoreActionBuilder_.clear(); + } + if (filterActionBuilder_ != null) { + filterActionBuilder_.clear(); + } + if (twowaySynonymsActionBuilder_ != null) { + twowaySynonymsActionBuilder_.clear(); + } + if (forceReturnFacetActionBuilder_ != null) { + forceReturnFacetActionBuilder_.clear(); + } + if (removeFacetActionBuilder_ != null) { + removeFacetActionBuilder_.clear(); + } + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + actionCase_ = 0; + action_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.CommonProto + .internal_static_google_cloud_retail_v2beta_Rule_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.Rule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule build() { + com.google.cloud.retail.v2beta.Rule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule buildPartial() { + com.google.cloud.retail.v2beta.Rule result = new com.google.cloud.retail.v2beta.Rule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.retail.v2beta.Rule result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000400) != 0)) { + result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.retail.v2beta.Rule result) { + result.actionCase_ = actionCase_; + result.action_ = this.action_; + if (actionCase_ == 2 && boostActionBuilder_ != null) { + result.action_ = boostActionBuilder_.build(); + } + if (actionCase_ == 3 && redirectActionBuilder_ != null) { + result.action_ = redirectActionBuilder_.build(); + } + if (actionCase_ == 6 && onewaySynonymsActionBuilder_ != null) { + result.action_ = onewaySynonymsActionBuilder_.build(); + } + if (actionCase_ == 7 && doNotAssociateActionBuilder_ != null) { + result.action_ = doNotAssociateActionBuilder_.build(); + } + if (actionCase_ == 8 && replacementActionBuilder_ != null) { + result.action_ = replacementActionBuilder_.build(); + } + if (actionCase_ == 9 && ignoreActionBuilder_ != null) { + result.action_ = ignoreActionBuilder_.build(); + } + if (actionCase_ == 10 && filterActionBuilder_ != null) { + result.action_ = filterActionBuilder_.build(); + } + if (actionCase_ == 11 && twowaySynonymsActionBuilder_ != null) { + result.action_ = twowaySynonymsActionBuilder_.build(); + } + if (actionCase_ == 12 && forceReturnFacetActionBuilder_ != null) { + result.action_ = forceReturnFacetActionBuilder_.build(); + } + if (actionCase_ == 13 && removeFacetActionBuilder_ != null) { + result.action_ = removeFacetActionBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.Rule) { + return mergeFrom((com.google.cloud.retail.v2beta.Rule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.Rule other) { + if (other == com.google.cloud.retail.v2beta.Rule.getDefaultInstance()) return this; + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + switch (other.getActionCase()) { + case BOOST_ACTION: + { + mergeBoostAction(other.getBoostAction()); + break; + } + case REDIRECT_ACTION: + { + mergeRedirectAction(other.getRedirectAction()); + break; + } + case ONEWAY_SYNONYMS_ACTION: + { + mergeOnewaySynonymsAction(other.getOnewaySynonymsAction()); + break; + } + case DO_NOT_ASSOCIATE_ACTION: + { + mergeDoNotAssociateAction(other.getDoNotAssociateAction()); + break; + } + case REPLACEMENT_ACTION: + { + mergeReplacementAction(other.getReplacementAction()); + break; + } + case IGNORE_ACTION: + { + mergeIgnoreAction(other.getIgnoreAction()); + break; + } + case FILTER_ACTION: + { + mergeFilterAction(other.getFilterAction()); + break; + } + case TWOWAY_SYNONYMS_ACTION: + { + mergeTwowaySynonymsAction(other.getTwowaySynonymsAction()); + break; + } + case FORCE_RETURN_FACET_ACTION: + { + mergeForceReturnFacetAction(other.getForceReturnFacetAction()); + break; + } + case REMOVE_FACET_ACTION: + { + mergeRemoveFacetAction(other.getRemoveFacetAction()); + break; + } + case ACTION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; } - // Construct using com.google.cloud.retail.v2beta.Rule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 10 + case 18: + { + input.readMessage(getBoostActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getRedirectActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 3; + break; + } // case 26 + case 50: + { + input.readMessage( + getOnewaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + getDoNotAssociateActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + getReplacementActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage(getIgnoreActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage(getFilterActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage( + getTwowaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage( + getForceReturnFacetActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage( + getRemoveFacetActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 13; + break; + } // case 106 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + private int actionCase_ = 0; + private java.lang.Object action_; - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConditionFieldBuilder(); - } + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (boostActionBuilder_ != null) { - boostActionBuilder_.clear(); - } - if (redirectActionBuilder_ != null) { - redirectActionBuilder_.clear(); - } - if (onewaySynonymsActionBuilder_ != null) { - onewaySynonymsActionBuilder_.clear(); - } - if (doNotAssociateActionBuilder_ != null) { - doNotAssociateActionBuilder_.clear(); - } - if (replacementActionBuilder_ != null) { - replacementActionBuilder_.clear(); - } - if (ignoreActionBuilder_ != null) { - ignoreActionBuilder_.clear(); - } - if (filterActionBuilder_ != null) { - filterActionBuilder_.clear(); - } - if (twowaySynonymsActionBuilder_ != null) { - twowaySynonymsActionBuilder_.clear(); - } - condition_ = null; - if (conditionBuilder_ != null) { - conditionBuilder_.dispose(); - conditionBuilder_ = null; - } + public Builder clearAction() { actionCase_ = 0; action_ = null; + onChanged(); return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.retail.v2beta.CommonProto - .internal_static_google_cloud_retail_v2beta_Rule_descriptor; - } + private int bitField0_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Rule.BoostAction, + com.google.cloud.retail.v2beta.Rule.BoostAction.Builder, + com.google.cloud.retail.v2beta.Rule.BoostActionOrBuilder> + boostActionBuilder_; + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + * + * @return Whether the boostAction field is set. + */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule getDefaultInstanceForType() { - return com.google.cloud.retail.v2beta.Rule.getDefaultInstance(); + public boolean hasBoostAction() { + return actionCase_ == 2; } - + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + * + * @return The boostAction. + */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule build() { - com.google.cloud.retail.v2beta.Rule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public com.google.cloud.retail.v2beta.Rule.BoostAction getBoostAction() { + if (boostActionBuilder_ == null) { + if (actionCase_ == 2) { + return (com.google.cloud.retail.v2beta.Rule.BoostAction) action_; + } + return com.google.cloud.retail.v2beta.Rule.BoostAction.getDefaultInstance(); + } else { + if (actionCase_ == 2) { + return boostActionBuilder_.getMessage(); + } + return com.google.cloud.retail.v2beta.Rule.BoostAction.getDefaultInstance(); } - return result; } - - @java.lang.Override - public com.google.cloud.retail.v2beta.Rule buildPartial() { - com.google.cloud.retail.v2beta.Rule result = new com.google.cloud.retail.v2beta.Rule(this); - if (bitField0_ != 0) { - buildPartial0(result); + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + */ + public Builder setBoostAction(com.google.cloud.retail.v2beta.Rule.BoostAction value) { + if (boostActionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + boostActionBuilder_.setMessage(value); } - buildPartialOneofs(result); - onBuilt(); - return result; + actionCase_ = 2; + return this; } - - private void buildPartial0(com.google.cloud.retail.v2beta.Rule result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000100) != 0)) { - result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build(); - to_bitField0_ |= 0x00000001; + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + */ + public Builder setBoostAction( + com.google.cloud.retail.v2beta.Rule.BoostAction.Builder builderForValue) { + if (boostActionBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + boostActionBuilder_.setMessage(builderForValue.build()); } - result.bitField0_ |= to_bitField0_; + actionCase_ = 2; + return this; } - - private void buildPartialOneofs(com.google.cloud.retail.v2beta.Rule result) { - result.actionCase_ = actionCase_; - result.action_ = this.action_; - if (actionCase_ == 2 && boostActionBuilder_ != null) { - result.action_ = boostActionBuilder_.build(); - } - if (actionCase_ == 3 && redirectActionBuilder_ != null) { - result.action_ = redirectActionBuilder_.build(); - } - if (actionCase_ == 6 && onewaySynonymsActionBuilder_ != null) { - result.action_ = onewaySynonymsActionBuilder_.build(); - } - if (actionCase_ == 7 && doNotAssociateActionBuilder_ != null) { - result.action_ = doNotAssociateActionBuilder_.build(); - } - if (actionCase_ == 8 && replacementActionBuilder_ != null) { - result.action_ = replacementActionBuilder_.build(); - } - if (actionCase_ == 9 && ignoreActionBuilder_ != null) { - result.action_ = ignoreActionBuilder_.build(); - } - if (actionCase_ == 10 && filterActionBuilder_ != null) { - result.action_ = filterActionBuilder_.build(); - } - if (actionCase_ == 11 && twowaySynonymsActionBuilder_ != null) { - result.action_ = twowaySynonymsActionBuilder_.build(); + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + */ + public Builder mergeBoostAction(com.google.cloud.retail.v2beta.Rule.BoostAction value) { + if (boostActionBuilder_ == null) { + if (actionCase_ == 2 + && action_ != com.google.cloud.retail.v2beta.Rule.BoostAction.getDefaultInstance()) { + action_ = + com.google.cloud.retail.v2beta.Rule.BoostAction.newBuilder( + (com.google.cloud.retail.v2beta.Rule.BoostAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 2) { + boostActionBuilder_.mergeFrom(value); + } else { + boostActionBuilder_.setMessage(value); + } } + actionCase_ = 2; + return this; } - - @java.lang.Override - public Builder clone() { - return super.clone(); + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + */ + public Builder clearBoostAction() { + if (boostActionBuilder_ == null) { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + } + boostActionBuilder_.clear(); + } + return this; } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + */ + public com.google.cloud.retail.v2beta.Rule.BoostAction.Builder getBoostActionBuilder() { + return getBoostActionFieldBuilder().getBuilder(); } - + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + */ @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + public com.google.cloud.retail.v2beta.Rule.BoostActionOrBuilder getBoostActionOrBuilder() { + if ((actionCase_ == 2) && (boostActionBuilder_ != null)) { + return boostActionBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 2) { + return (com.google.cloud.retail.v2beta.Rule.BoostAction) action_; + } + return com.google.cloud.retail.v2beta.Rule.BoostAction.getDefaultInstance(); + } } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + /** + * + * + *
+     * A boost action.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Rule.BoostAction, + com.google.cloud.retail.v2beta.Rule.BoostAction.Builder, + com.google.cloud.retail.v2beta.Rule.BoostActionOrBuilder> + getBoostActionFieldBuilder() { + if (boostActionBuilder_ == null) { + if (!(actionCase_ == 2)) { + action_ = com.google.cloud.retail.v2beta.Rule.BoostAction.getDefaultInstance(); + } + boostActionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Rule.BoostAction, + com.google.cloud.retail.v2beta.Rule.BoostAction.Builder, + com.google.cloud.retail.v2beta.Rule.BoostActionOrBuilder>( + (com.google.cloud.retail.v2beta.Rule.BoostAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 2; + onChanged(); + return boostActionBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Rule.RedirectAction, + com.google.cloud.retail.v2beta.Rule.RedirectAction.Builder, + com.google.cloud.retail.v2beta.Rule.RedirectActionOrBuilder> + redirectActionBuilder_; + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + * + * @return Whether the redirectAction field is set. + */ @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + public boolean hasRedirectAction() { + return actionCase_ == 3; } - + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + * + * @return The redirectAction. + */ @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + public com.google.cloud.retail.v2beta.Rule.RedirectAction getRedirectAction() { + if (redirectActionBuilder_ == null) { + if (actionCase_ == 3) { + return (com.google.cloud.retail.v2beta.Rule.RedirectAction) action_; + } + return com.google.cloud.retail.v2beta.Rule.RedirectAction.getDefaultInstance(); + } else { + if (actionCase_ == 3) { + return redirectActionBuilder_.getMessage(); + } + return com.google.cloud.retail.v2beta.Rule.RedirectAction.getDefaultInstance(); + } } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.retail.v2beta.Rule) { - return mergeFrom((com.google.cloud.retail.v2beta.Rule) other); + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + */ + public Builder setRedirectAction(com.google.cloud.retail.v2beta.Rule.RedirectAction value) { + if (redirectActionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); } else { - super.mergeFrom(other); - return this; + redirectActionBuilder_.setMessage(value); } + actionCase_ = 3; + return this; } - - public Builder mergeFrom(com.google.cloud.retail.v2beta.Rule other) { - if (other == com.google.cloud.retail.v2beta.Rule.getDefaultInstance()) return this; - if (other.hasCondition()) { - mergeCondition(other.getCondition()); - } - switch (other.getActionCase()) { - case BOOST_ACTION: - { - mergeBoostAction(other.getBoostAction()); - break; - } - case REDIRECT_ACTION: - { - mergeRedirectAction(other.getRedirectAction()); - break; - } - case ONEWAY_SYNONYMS_ACTION: - { - mergeOnewaySynonymsAction(other.getOnewaySynonymsAction()); - break; - } - case DO_NOT_ASSOCIATE_ACTION: - { - mergeDoNotAssociateAction(other.getDoNotAssociateAction()); - break; - } - case REPLACEMENT_ACTION: - { - mergeReplacementAction(other.getReplacementAction()); - break; - } - case IGNORE_ACTION: - { - mergeIgnoreAction(other.getIgnoreAction()); - break; - } - case FILTER_ACTION: - { - mergeFilterAction(other.getFilterAction()); - break; - } - case TWOWAY_SYNONYMS_ACTION: - { - mergeTwowaySynonymsAction(other.getTwowaySynonymsAction()); - break; - } - case ACTION_NOT_SET: - { - break; - } + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + */ + public Builder setRedirectAction( + com.google.cloud.retail.v2beta.Rule.RedirectAction.Builder builderForValue) { + if (redirectActionBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + redirectActionBuilder_.setMessage(builderForValue.build()); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); + actionCase_ = 3; return this; } - - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + */ + public Builder mergeRedirectAction(com.google.cloud.retail.v2beta.Rule.RedirectAction value) { + if (redirectActionBuilder_ == null) { + if (actionCase_ == 3 + && action_ != com.google.cloud.retail.v2beta.Rule.RedirectAction.getDefaultInstance()) { + action_ = + com.google.cloud.retail.v2beta.Rule.RedirectAction.newBuilder( + (com.google.cloud.retail.v2beta.Rule.RedirectAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 3) { + redirectActionBuilder_.mergeFrom(value); + } else { + redirectActionBuilder_.setMessage(value); + } + } + actionCase_ = 3; + return this; } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + */ + public Builder clearRedirectAction() { + if (redirectActionBuilder_ == null) { + if (actionCase_ == 3) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 3) { + actionCase_ = 0; + action_ = null; + } + redirectActionBuilder_.clear(); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 10 - case 18: - { - input.readMessage(getBoostActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 2; - break; - } // case 18 - case 26: - { - input.readMessage(getRedirectActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 3; - break; - } // case 26 - case 50: - { - input.readMessage( - getOnewaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 6; - break; - } // case 50 - case 58: - { - input.readMessage( - getDoNotAssociateActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 7; - break; - } // case 58 - case 66: - { - input.readMessage( - getReplacementActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 8; - break; - } // case 66 - case 74: - { - input.readMessage(getIgnoreActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 9; - break; - } // case 74 - case 82: - { - input.readMessage(getFilterActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 10; - break; - } // case 82 - case 90: - { - input.readMessage( - getTwowaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 11; - 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 actionCase_ = 0; - private java.lang.Object action_; - - public ActionCase getActionCase() { - return ActionCase.forNumber(actionCase_); + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + */ + public com.google.cloud.retail.v2beta.Rule.RedirectAction.Builder getRedirectActionBuilder() { + return getRedirectActionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Rule.RedirectActionOrBuilder + getRedirectActionOrBuilder() { + if ((actionCase_ == 3) && (redirectActionBuilder_ != null)) { + return redirectActionBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 3) { + return (com.google.cloud.retail.v2beta.Rule.RedirectAction) action_; + } + return com.google.cloud.retail.v2beta.Rule.RedirectAction.getDefaultInstance(); + } } - - public Builder clearAction() { - actionCase_ = 0; - action_ = null; + /** + * + * + *
+     * Redirects a shopper to a specific page.
+     * 
+ * + * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Rule.RedirectAction, + com.google.cloud.retail.v2beta.Rule.RedirectAction.Builder, + com.google.cloud.retail.v2beta.Rule.RedirectActionOrBuilder> + getRedirectActionFieldBuilder() { + if (redirectActionBuilder_ == null) { + if (!(actionCase_ == 3)) { + action_ = com.google.cloud.retail.v2beta.Rule.RedirectAction.getDefaultInstance(); + } + redirectActionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Rule.RedirectAction, + com.google.cloud.retail.v2beta.Rule.RedirectAction.Builder, + com.google.cloud.retail.v2beta.Rule.RedirectActionOrBuilder>( + (com.google.cloud.retail.v2beta.Rule.RedirectAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 3; onChanged(); - return this; + return redirectActionBuilder_; } - private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.BoostAction, - com.google.cloud.retail.v2beta.Rule.BoostAction.Builder, - com.google.cloud.retail.v2beta.Rule.BoostActionOrBuilder> - boostActionBuilder_; + com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction, + com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.Builder, + com.google.cloud.retail.v2beta.Rule.OnewaySynonymsActionOrBuilder> + onewaySynonymsActionBuilder_; /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * * - * @return Whether the boostAction field is set. + * @return Whether the onewaySynonymsAction field is set. */ @java.lang.Override - public boolean hasBoostAction() { - return actionCase_ == 2; + public boolean hasOnewaySynonymsAction() { + return actionCase_ == 6; } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * * - * @return The boostAction. + * @return The onewaySynonymsAction. */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.BoostAction getBoostAction() { - if (boostActionBuilder_ == null) { - if (actionCase_ == 2) { - return (com.google.cloud.retail.v2beta.Rule.BoostAction) action_; + public com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction getOnewaySynonymsAction() { + if (onewaySynonymsActionBuilder_ == null) { + if (actionCase_ == 6) { + return (com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction) action_; } - return com.google.cloud.retail.v2beta.Rule.BoostAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.getDefaultInstance(); } else { - if (actionCase_ == 2) { - return boostActionBuilder_.getMessage(); + if (actionCase_ == 6) { + return onewaySynonymsActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2beta.Rule.BoostAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.getDefaultInstance(); } } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * */ - public Builder setBoostAction(com.google.cloud.retail.v2beta.Rule.BoostAction value) { - if (boostActionBuilder_ == null) { + public Builder setOnewaySynonymsAction( + com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction value) { + if (onewaySynonymsActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - boostActionBuilder_.setMessage(value); + onewaySynonymsActionBuilder_.setMessage(value); } - actionCase_ = 2; + actionCase_ = 6; return this; } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * */ - public Builder setBoostAction( - com.google.cloud.retail.v2beta.Rule.BoostAction.Builder builderForValue) { - if (boostActionBuilder_ == null) { + public Builder setOnewaySynonymsAction( + com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.Builder builderForValue) { + if (onewaySynonymsActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - boostActionBuilder_.setMessage(builderForValue.build()); + onewaySynonymsActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 2; + actionCase_ = 6; return this; } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * */ - public Builder mergeBoostAction(com.google.cloud.retail.v2beta.Rule.BoostAction value) { - if (boostActionBuilder_ == null) { - if (actionCase_ == 2 - && action_ != com.google.cloud.retail.v2beta.Rule.BoostAction.getDefaultInstance()) { + public Builder mergeOnewaySynonymsAction( + com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction value) { + if (onewaySynonymsActionBuilder_ == null) { + if (actionCase_ == 6 + && action_ + != com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2beta.Rule.BoostAction.newBuilder( - (com.google.cloud.retail.v2beta.Rule.BoostAction) action_) + com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.newBuilder( + (com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -9541,37 +13020,39 @@ public Builder mergeBoostAction(com.google.cloud.retail.v2beta.Rule.BoostAction } onChanged(); } else { - if (actionCase_ == 2) { - boostActionBuilder_.mergeFrom(value); + if (actionCase_ == 6) { + onewaySynonymsActionBuilder_.mergeFrom(value); } else { - boostActionBuilder_.setMessage(value); + onewaySynonymsActionBuilder_.setMessage(value); } } - actionCase_ = 2; + actionCase_ = 6; return this; } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * */ - public Builder clearBoostAction() { - if (boostActionBuilder_ == null) { - if (actionCase_ == 2) { + public Builder clearOnewaySynonymsAction() { + if (onewaySynonymsActionBuilder_ == null) { + if (actionCase_ == 6) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 2) { + if (actionCase_ == 6) { actionCase_ = 0; action_ = null; } - boostActionBuilder_.clear(); + onewaySynonymsActionBuilder_.clear(); } return this; } @@ -9579,170 +13060,186 @@ public Builder clearBoostAction() { * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * */ - public com.google.cloud.retail.v2beta.Rule.BoostAction.Builder getBoostActionBuilder() { - return getBoostActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.Builder + getOnewaySynonymsActionBuilder() { + return getOnewaySynonymsActionFieldBuilder().getBuilder(); } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.BoostActionOrBuilder getBoostActionOrBuilder() { - if ((actionCase_ == 2) && (boostActionBuilder_ != null)) { - return boostActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2beta.Rule.OnewaySynonymsActionOrBuilder + getOnewaySynonymsActionOrBuilder() { + if ((actionCase_ == 6) && (onewaySynonymsActionBuilder_ != null)) { + return onewaySynonymsActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 2) { - return (com.google.cloud.retail.v2beta.Rule.BoostAction) action_; + if (actionCase_ == 6) { + return (com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction) action_; } - return com.google.cloud.retail.v2beta.Rule.BoostAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.getDefaultInstance(); } } /** * * *
-     * A boost action.
+     * Treats specific term as a synonym with a group of terms.
+     * Group of terms will not be treated as synonyms with the specific term.
      * 
* - * .google.cloud.retail.v2beta.Rule.BoostAction boost_action = 2; + * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.BoostAction, - com.google.cloud.retail.v2beta.Rule.BoostAction.Builder, - com.google.cloud.retail.v2beta.Rule.BoostActionOrBuilder> - getBoostActionFieldBuilder() { - if (boostActionBuilder_ == null) { - if (!(actionCase_ == 2)) { - action_ = com.google.cloud.retail.v2beta.Rule.BoostAction.getDefaultInstance(); + com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction, + com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.Builder, + com.google.cloud.retail.v2beta.Rule.OnewaySynonymsActionOrBuilder> + getOnewaySynonymsActionFieldBuilder() { + if (onewaySynonymsActionBuilder_ == null) { + if (!(actionCase_ == 6)) { + action_ = com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.getDefaultInstance(); } - boostActionBuilder_ = + onewaySynonymsActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.BoostAction, - com.google.cloud.retail.v2beta.Rule.BoostAction.Builder, - com.google.cloud.retail.v2beta.Rule.BoostActionOrBuilder>( - (com.google.cloud.retail.v2beta.Rule.BoostAction) action_, + com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction, + com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.Builder, + com.google.cloud.retail.v2beta.Rule.OnewaySynonymsActionOrBuilder>( + (com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 2; + actionCase_ = 6; onChanged(); - return boostActionBuilder_; + return onewaySynonymsActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.RedirectAction, - com.google.cloud.retail.v2beta.Rule.RedirectAction.Builder, - com.google.cloud.retail.v2beta.Rule.RedirectActionOrBuilder> - redirectActionBuilder_; + com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction, + com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.Builder, + com.google.cloud.retail.v2beta.Rule.DoNotAssociateActionOrBuilder> + doNotAssociateActionBuilder_; /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; + * * - * @return Whether the redirectAction field is set. + * @return Whether the doNotAssociateAction field is set. */ @java.lang.Override - public boolean hasRedirectAction() { - return actionCase_ == 3; + public boolean hasDoNotAssociateAction() { + return actionCase_ == 7; } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; + * * - * @return The redirectAction. + * @return The doNotAssociateAction. */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.RedirectAction getRedirectAction() { - if (redirectActionBuilder_ == null) { - if (actionCase_ == 3) { - return (com.google.cloud.retail.v2beta.Rule.RedirectAction) action_; + public com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction getDoNotAssociateAction() { + if (doNotAssociateActionBuilder_ == null) { + if (actionCase_ == 7) { + return (com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction) action_; } - return com.google.cloud.retail.v2beta.Rule.RedirectAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.getDefaultInstance(); } else { - if (actionCase_ == 3) { - return redirectActionBuilder_.getMessage(); + if (actionCase_ == 7) { + return doNotAssociateActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2beta.Rule.RedirectAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.getDefaultInstance(); } } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; + * */ - public Builder setRedirectAction(com.google.cloud.retail.v2beta.Rule.RedirectAction value) { - if (redirectActionBuilder_ == null) { + public Builder setDoNotAssociateAction( + com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction value) { + if (doNotAssociateActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - redirectActionBuilder_.setMessage(value); + doNotAssociateActionBuilder_.setMessage(value); } - actionCase_ = 3; + actionCase_ = 7; return this; } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; + * */ - public Builder setRedirectAction( - com.google.cloud.retail.v2beta.Rule.RedirectAction.Builder builderForValue) { - if (redirectActionBuilder_ == null) { + public Builder setDoNotAssociateAction( + com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.Builder builderForValue) { + if (doNotAssociateActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - redirectActionBuilder_.setMessage(builderForValue.build()); + doNotAssociateActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 3; + actionCase_ = 7; return this; } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; + * */ - public Builder mergeRedirectAction(com.google.cloud.retail.v2beta.Rule.RedirectAction value) { - if (redirectActionBuilder_ == null) { - if (actionCase_ == 3 - && action_ != com.google.cloud.retail.v2beta.Rule.RedirectAction.getDefaultInstance()) { + public Builder mergeDoNotAssociateAction( + com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction value) { + if (doNotAssociateActionBuilder_ == null) { + if (actionCase_ == 7 + && action_ + != com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2beta.Rule.RedirectAction.newBuilder( - (com.google.cloud.retail.v2beta.Rule.RedirectAction) action_) + com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.newBuilder( + (com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -9750,37 +13247,38 @@ public Builder mergeRedirectAction(com.google.cloud.retail.v2beta.Rule.RedirectA } onChanged(); } else { - if (actionCase_ == 3) { - redirectActionBuilder_.mergeFrom(value); + if (actionCase_ == 7) { + doNotAssociateActionBuilder_.mergeFrom(value); } else { - redirectActionBuilder_.setMessage(value); + doNotAssociateActionBuilder_.setMessage(value); } } - actionCase_ = 3; + actionCase_ = 7; return this; } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; + * */ - public Builder clearRedirectAction() { - if (redirectActionBuilder_ == null) { - if (actionCase_ == 3) { + public Builder clearDoNotAssociateAction() { + if (doNotAssociateActionBuilder_ == null) { + if (actionCase_ == 7) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 3) { + if (actionCase_ == 7) { actionCase_ = 0; action_ = null; } - redirectActionBuilder_.clear(); + doNotAssociateActionBuilder_.clear(); } return this; } @@ -9788,184 +13286,178 @@ public Builder clearRedirectAction() { * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; + * */ - public com.google.cloud.retail.v2beta.Rule.RedirectAction.Builder getRedirectActionBuilder() { - return getRedirectActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.Builder + getDoNotAssociateActionBuilder() { + return getDoNotAssociateActionFieldBuilder().getBuilder(); } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; + * */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.RedirectActionOrBuilder - getRedirectActionOrBuilder() { - if ((actionCase_ == 3) && (redirectActionBuilder_ != null)) { - return redirectActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2beta.Rule.DoNotAssociateActionOrBuilder + getDoNotAssociateActionOrBuilder() { + if ((actionCase_ == 7) && (doNotAssociateActionBuilder_ != null)) { + return doNotAssociateActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 3) { - return (com.google.cloud.retail.v2beta.Rule.RedirectAction) action_; + if (actionCase_ == 7) { + return (com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction) action_; } - return com.google.cloud.retail.v2beta.Rule.RedirectAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.getDefaultInstance(); } } /** * * *
-     * Redirects a shopper to a specific page.
+     * Prevents term from being associated with other terms.
      * 
* - * .google.cloud.retail.v2beta.Rule.RedirectAction redirect_action = 3; + * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.RedirectAction, - com.google.cloud.retail.v2beta.Rule.RedirectAction.Builder, - com.google.cloud.retail.v2beta.Rule.RedirectActionOrBuilder> - getRedirectActionFieldBuilder() { - if (redirectActionBuilder_ == null) { - if (!(actionCase_ == 3)) { - action_ = com.google.cloud.retail.v2beta.Rule.RedirectAction.getDefaultInstance(); + com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction, + com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.Builder, + com.google.cloud.retail.v2beta.Rule.DoNotAssociateActionOrBuilder> + getDoNotAssociateActionFieldBuilder() { + if (doNotAssociateActionBuilder_ == null) { + if (!(actionCase_ == 7)) { + action_ = com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.getDefaultInstance(); } - redirectActionBuilder_ = + doNotAssociateActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.RedirectAction, - com.google.cloud.retail.v2beta.Rule.RedirectAction.Builder, - com.google.cloud.retail.v2beta.Rule.RedirectActionOrBuilder>( - (com.google.cloud.retail.v2beta.Rule.RedirectAction) action_, + com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction, + com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.Builder, + com.google.cloud.retail.v2beta.Rule.DoNotAssociateActionOrBuilder>( + (com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 3; + actionCase_ = 7; onChanged(); - return redirectActionBuilder_; + return doNotAssociateActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction, - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.Builder, - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsActionOrBuilder> - onewaySynonymsActionBuilder_; + com.google.cloud.retail.v2beta.Rule.ReplacementAction, + com.google.cloud.retail.v2beta.Rule.ReplacementAction.Builder, + com.google.cloud.retail.v2beta.Rule.ReplacementActionOrBuilder> + replacementActionBuilder_; /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; * - * @return Whether the onewaySynonymsAction field is set. + * @return Whether the replacementAction field is set. */ @java.lang.Override - public boolean hasOnewaySynonymsAction() { - return actionCase_ == 6; + public boolean hasReplacementAction() { + return actionCase_ == 8; } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; * - * @return The onewaySynonymsAction. + * @return The replacementAction. */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction getOnewaySynonymsAction() { - if (onewaySynonymsActionBuilder_ == null) { - if (actionCase_ == 6) { - return (com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction) action_; + public com.google.cloud.retail.v2beta.Rule.ReplacementAction getReplacementAction() { + if (replacementActionBuilder_ == null) { + if (actionCase_ == 8) { + return (com.google.cloud.retail.v2beta.Rule.ReplacementAction) action_; } - return com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.ReplacementAction.getDefaultInstance(); } else { - if (actionCase_ == 6) { - return onewaySynonymsActionBuilder_.getMessage(); + if (actionCase_ == 8) { + return replacementActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.ReplacementAction.getDefaultInstance(); } } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; */ - public Builder setOnewaySynonymsAction( - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction value) { - if (onewaySynonymsActionBuilder_ == null) { + public Builder setReplacementAction( + com.google.cloud.retail.v2beta.Rule.ReplacementAction value) { + if (replacementActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - onewaySynonymsActionBuilder_.setMessage(value); + replacementActionBuilder_.setMessage(value); } - actionCase_ = 6; + actionCase_ = 8; return this; } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; */ - public Builder setOnewaySynonymsAction( - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.Builder builderForValue) { - if (onewaySynonymsActionBuilder_ == null) { + public Builder setReplacementAction( + com.google.cloud.retail.v2beta.Rule.ReplacementAction.Builder builderForValue) { + if (replacementActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - onewaySynonymsActionBuilder_.setMessage(builderForValue.build()); + replacementActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 6; + actionCase_ = 8; return this; } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; */ - public Builder mergeOnewaySynonymsAction( - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction value) { - if (onewaySynonymsActionBuilder_ == null) { - if (actionCase_ == 6 + public Builder mergeReplacementAction( + com.google.cloud.retail.v2beta.Rule.ReplacementAction value) { + if (replacementActionBuilder_ == null) { + if (actionCase_ == 8 && action_ - != com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.getDefaultInstance()) { + != com.google.cloud.retail.v2beta.Rule.ReplacementAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.newBuilder( - (com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction) action_) + com.google.cloud.retail.v2beta.Rule.ReplacementAction.newBuilder( + (com.google.cloud.retail.v2beta.Rule.ReplacementAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -9973,39 +13465,37 @@ public Builder mergeOnewaySynonymsAction( } onChanged(); } else { - if (actionCase_ == 6) { - onewaySynonymsActionBuilder_.mergeFrom(value); + if (actionCase_ == 8) { + replacementActionBuilder_.mergeFrom(value); } else { - onewaySynonymsActionBuilder_.setMessage(value); + replacementActionBuilder_.setMessage(value); } } - actionCase_ = 6; + actionCase_ = 8; return this; } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; */ - public Builder clearOnewaySynonymsAction() { - if (onewaySynonymsActionBuilder_ == null) { - if (actionCase_ == 6) { + public Builder clearReplacementAction() { + if (replacementActionBuilder_ == null) { + if (actionCase_ == 8) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 6) { + if (actionCase_ == 8) { actionCase_ = 0; action_ = null; } - onewaySynonymsActionBuilder_.clear(); + replacementActionBuilder_.clear(); } return this; } @@ -10013,186 +13503,172 @@ public Builder clearOnewaySynonymsAction() { * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; */ - public com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.Builder - getOnewaySynonymsActionBuilder() { - return getOnewaySynonymsActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2beta.Rule.ReplacementAction.Builder + getReplacementActionBuilder() { + return getReplacementActionFieldBuilder().getBuilder(); } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.OnewaySynonymsActionOrBuilder - getOnewaySynonymsActionOrBuilder() { - if ((actionCase_ == 6) && (onewaySynonymsActionBuilder_ != null)) { - return onewaySynonymsActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2beta.Rule.ReplacementActionOrBuilder + getReplacementActionOrBuilder() { + if ((actionCase_ == 8) && (replacementActionBuilder_ != null)) { + return replacementActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 6) { - return (com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction) action_; + if (actionCase_ == 8) { + return (com.google.cloud.retail.v2beta.Rule.ReplacementAction) action_; } - return com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.ReplacementAction.getDefaultInstance(); } } /** * * *
-     * Treats specific term as a synonym with a group of terms.
-     * Group of terms will not be treated as synonyms with the specific term.
+     * Replaces specific terms in the query.
      * 
* - * .google.cloud.retail.v2beta.Rule.OnewaySynonymsAction oneway_synonyms_action = 6; - * + * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction, - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.Builder, - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsActionOrBuilder> - getOnewaySynonymsActionFieldBuilder() { - if (onewaySynonymsActionBuilder_ == null) { - if (!(actionCase_ == 6)) { - action_ = com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.getDefaultInstance(); + com.google.cloud.retail.v2beta.Rule.ReplacementAction, + com.google.cloud.retail.v2beta.Rule.ReplacementAction.Builder, + com.google.cloud.retail.v2beta.Rule.ReplacementActionOrBuilder> + getReplacementActionFieldBuilder() { + if (replacementActionBuilder_ == null) { + if (!(actionCase_ == 8)) { + action_ = com.google.cloud.retail.v2beta.Rule.ReplacementAction.getDefaultInstance(); } - onewaySynonymsActionBuilder_ = + replacementActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction, - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.Builder, - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsActionOrBuilder>( - (com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction) action_, + com.google.cloud.retail.v2beta.Rule.ReplacementAction, + com.google.cloud.retail.v2beta.Rule.ReplacementAction.Builder, + com.google.cloud.retail.v2beta.Rule.ReplacementActionOrBuilder>( + (com.google.cloud.retail.v2beta.Rule.ReplacementAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 6; + actionCase_ = 8; onChanged(); - return onewaySynonymsActionBuilder_; + return replacementActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction, - com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.Builder, - com.google.cloud.retail.v2beta.Rule.DoNotAssociateActionOrBuilder> - doNotAssociateActionBuilder_; + com.google.cloud.retail.v2beta.Rule.IgnoreAction, + com.google.cloud.retail.v2beta.Rule.IgnoreAction.Builder, + com.google.cloud.retail.v2beta.Rule.IgnoreActionOrBuilder> + ignoreActionBuilder_; /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; * - * @return Whether the doNotAssociateAction field is set. + * @return Whether the ignoreAction field is set. */ @java.lang.Override - public boolean hasDoNotAssociateAction() { - return actionCase_ == 7; + public boolean hasIgnoreAction() { + return actionCase_ == 9; } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; * - * @return The doNotAssociateAction. + * @return The ignoreAction. */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction getDoNotAssociateAction() { - if (doNotAssociateActionBuilder_ == null) { - if (actionCase_ == 7) { - return (com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction) action_; + public com.google.cloud.retail.v2beta.Rule.IgnoreAction getIgnoreAction() { + if (ignoreActionBuilder_ == null) { + if (actionCase_ == 9) { + return (com.google.cloud.retail.v2beta.Rule.IgnoreAction) action_; } - return com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.IgnoreAction.getDefaultInstance(); } else { - if (actionCase_ == 7) { - return doNotAssociateActionBuilder_.getMessage(); + if (actionCase_ == 9) { + return ignoreActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.IgnoreAction.getDefaultInstance(); } } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; */ - public Builder setDoNotAssociateAction( - com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction value) { - if (doNotAssociateActionBuilder_ == null) { + public Builder setIgnoreAction(com.google.cloud.retail.v2beta.Rule.IgnoreAction value) { + if (ignoreActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - doNotAssociateActionBuilder_.setMessage(value); + ignoreActionBuilder_.setMessage(value); } - actionCase_ = 7; + actionCase_ = 9; return this; } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; */ - public Builder setDoNotAssociateAction( - com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.Builder builderForValue) { - if (doNotAssociateActionBuilder_ == null) { + public Builder setIgnoreAction( + com.google.cloud.retail.v2beta.Rule.IgnoreAction.Builder builderForValue) { + if (ignoreActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - doNotAssociateActionBuilder_.setMessage(builderForValue.build()); + ignoreActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 7; + actionCase_ = 9; return this; } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; */ - public Builder mergeDoNotAssociateAction( - com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction value) { - if (doNotAssociateActionBuilder_ == null) { - if (actionCase_ == 7 - && action_ - != com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.getDefaultInstance()) { + public Builder mergeIgnoreAction(com.google.cloud.retail.v2beta.Rule.IgnoreAction value) { + if (ignoreActionBuilder_ == null) { + if (actionCase_ == 9 + && action_ != com.google.cloud.retail.v2beta.Rule.IgnoreAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.newBuilder( - (com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction) action_) + com.google.cloud.retail.v2beta.Rule.IgnoreAction.newBuilder( + (com.google.cloud.retail.v2beta.Rule.IgnoreAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -10200,38 +13676,37 @@ public Builder mergeDoNotAssociateAction( } onChanged(); } else { - if (actionCase_ == 7) { - doNotAssociateActionBuilder_.mergeFrom(value); + if (actionCase_ == 9) { + ignoreActionBuilder_.mergeFrom(value); } else { - doNotAssociateActionBuilder_.setMessage(value); + ignoreActionBuilder_.setMessage(value); } } - actionCase_ = 7; + actionCase_ = 9; return this; } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; */ - public Builder clearDoNotAssociateAction() { - if (doNotAssociateActionBuilder_ == null) { - if (actionCase_ == 7) { + public Builder clearIgnoreAction() { + if (ignoreActionBuilder_ == null) { + if (actionCase_ == 9) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 7) { + if (actionCase_ == 9) { actionCase_ = 0; action_ = null; } - doNotAssociateActionBuilder_.clear(); + ignoreActionBuilder_.clear(); } return this; } @@ -10239,178 +13714,170 @@ public Builder clearDoNotAssociateAction() { * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; */ - public com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.Builder - getDoNotAssociateActionBuilder() { - return getDoNotAssociateActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2beta.Rule.IgnoreAction.Builder getIgnoreActionBuilder() { + return getIgnoreActionFieldBuilder().getBuilder(); } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.DoNotAssociateActionOrBuilder - getDoNotAssociateActionOrBuilder() { - if ((actionCase_ == 7) && (doNotAssociateActionBuilder_ != null)) { - return doNotAssociateActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2beta.Rule.IgnoreActionOrBuilder getIgnoreActionOrBuilder() { + if ((actionCase_ == 9) && (ignoreActionBuilder_ != null)) { + return ignoreActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 7) { - return (com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction) action_; + if (actionCase_ == 9) { + return (com.google.cloud.retail.v2beta.Rule.IgnoreAction) action_; } - return com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.IgnoreAction.getDefaultInstance(); } } /** * * *
-     * Prevents term from being associated with other terms.
+     * Ignores specific terms from query during search.
      * 
* - * .google.cloud.retail.v2beta.Rule.DoNotAssociateAction do_not_associate_action = 7; - * + * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction, - com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.Builder, - com.google.cloud.retail.v2beta.Rule.DoNotAssociateActionOrBuilder> - getDoNotAssociateActionFieldBuilder() { - if (doNotAssociateActionBuilder_ == null) { - if (!(actionCase_ == 7)) { - action_ = com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.getDefaultInstance(); + com.google.cloud.retail.v2beta.Rule.IgnoreAction, + com.google.cloud.retail.v2beta.Rule.IgnoreAction.Builder, + com.google.cloud.retail.v2beta.Rule.IgnoreActionOrBuilder> + getIgnoreActionFieldBuilder() { + if (ignoreActionBuilder_ == null) { + if (!(actionCase_ == 9)) { + action_ = com.google.cloud.retail.v2beta.Rule.IgnoreAction.getDefaultInstance(); } - doNotAssociateActionBuilder_ = + ignoreActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction, - com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.Builder, - com.google.cloud.retail.v2beta.Rule.DoNotAssociateActionOrBuilder>( - (com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction) action_, + com.google.cloud.retail.v2beta.Rule.IgnoreAction, + com.google.cloud.retail.v2beta.Rule.IgnoreAction.Builder, + com.google.cloud.retail.v2beta.Rule.IgnoreActionOrBuilder>( + (com.google.cloud.retail.v2beta.Rule.IgnoreAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 7; + actionCase_ = 9; onChanged(); - return doNotAssociateActionBuilder_; + return ignoreActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.ReplacementAction, - com.google.cloud.retail.v2beta.Rule.ReplacementAction.Builder, - com.google.cloud.retail.v2beta.Rule.ReplacementActionOrBuilder> - replacementActionBuilder_; + com.google.cloud.retail.v2beta.Rule.FilterAction, + com.google.cloud.retail.v2beta.Rule.FilterAction.Builder, + com.google.cloud.retail.v2beta.Rule.FilterActionOrBuilder> + filterActionBuilder_; /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; * - * @return Whether the replacementAction field is set. + * @return Whether the filterAction field is set. */ @java.lang.Override - public boolean hasReplacementAction() { - return actionCase_ == 8; + public boolean hasFilterAction() { + return actionCase_ == 10; } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; * - * @return The replacementAction. + * @return The filterAction. */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.ReplacementAction getReplacementAction() { - if (replacementActionBuilder_ == null) { - if (actionCase_ == 8) { - return (com.google.cloud.retail.v2beta.Rule.ReplacementAction) action_; + public com.google.cloud.retail.v2beta.Rule.FilterAction getFilterAction() { + if (filterActionBuilder_ == null) { + if (actionCase_ == 10) { + return (com.google.cloud.retail.v2beta.Rule.FilterAction) action_; } - return com.google.cloud.retail.v2beta.Rule.ReplacementAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.FilterAction.getDefaultInstance(); } else { - if (actionCase_ == 8) { - return replacementActionBuilder_.getMessage(); + if (actionCase_ == 10) { + return filterActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2beta.Rule.ReplacementAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.FilterAction.getDefaultInstance(); } } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; */ - public Builder setReplacementAction( - com.google.cloud.retail.v2beta.Rule.ReplacementAction value) { - if (replacementActionBuilder_ == null) { + public Builder setFilterAction(com.google.cloud.retail.v2beta.Rule.FilterAction value) { + if (filterActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - replacementActionBuilder_.setMessage(value); + filterActionBuilder_.setMessage(value); } - actionCase_ = 8; + actionCase_ = 10; return this; } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; */ - public Builder setReplacementAction( - com.google.cloud.retail.v2beta.Rule.ReplacementAction.Builder builderForValue) { - if (replacementActionBuilder_ == null) { + public Builder setFilterAction( + com.google.cloud.retail.v2beta.Rule.FilterAction.Builder builderForValue) { + if (filterActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - replacementActionBuilder_.setMessage(builderForValue.build()); + filterActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 8; + actionCase_ = 10; return this; } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; */ - public Builder mergeReplacementAction( - com.google.cloud.retail.v2beta.Rule.ReplacementAction value) { - if (replacementActionBuilder_ == null) { - if (actionCase_ == 8 - && action_ - != com.google.cloud.retail.v2beta.Rule.ReplacementAction.getDefaultInstance()) { + public Builder mergeFilterAction(com.google.cloud.retail.v2beta.Rule.FilterAction value) { + if (filterActionBuilder_ == null) { + if (actionCase_ == 10 + && action_ != com.google.cloud.retail.v2beta.Rule.FilterAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2beta.Rule.ReplacementAction.newBuilder( - (com.google.cloud.retail.v2beta.Rule.ReplacementAction) action_) + com.google.cloud.retail.v2beta.Rule.FilterAction.newBuilder( + (com.google.cloud.retail.v2beta.Rule.FilterAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -10418,37 +13885,37 @@ public Builder mergeReplacementAction( } onChanged(); } else { - if (actionCase_ == 8) { - replacementActionBuilder_.mergeFrom(value); + if (actionCase_ == 10) { + filterActionBuilder_.mergeFrom(value); } else { - replacementActionBuilder_.setMessage(value); + filterActionBuilder_.setMessage(value); } } - actionCase_ = 8; + actionCase_ = 10; return this; } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; */ - public Builder clearReplacementAction() { - if (replacementActionBuilder_ == null) { - if (actionCase_ == 8) { + public Builder clearFilterAction() { + if (filterActionBuilder_ == null) { + if (actionCase_ == 10) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 8) { + if (actionCase_ == 10) { actionCase_ = 0; action_ = null; } - replacementActionBuilder_.clear(); + filterActionBuilder_.clear(); } return this; } @@ -10456,172 +13923,178 @@ public Builder clearReplacementAction() { * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; */ - public com.google.cloud.retail.v2beta.Rule.ReplacementAction.Builder - getReplacementActionBuilder() { - return getReplacementActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2beta.Rule.FilterAction.Builder getFilterActionBuilder() { + return getFilterActionFieldBuilder().getBuilder(); } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.ReplacementActionOrBuilder - getReplacementActionOrBuilder() { - if ((actionCase_ == 8) && (replacementActionBuilder_ != null)) { - return replacementActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2beta.Rule.FilterActionOrBuilder getFilterActionOrBuilder() { + if ((actionCase_ == 10) && (filterActionBuilder_ != null)) { + return filterActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 8) { - return (com.google.cloud.retail.v2beta.Rule.ReplacementAction) action_; + if (actionCase_ == 10) { + return (com.google.cloud.retail.v2beta.Rule.FilterAction) action_; } - return com.google.cloud.retail.v2beta.Rule.ReplacementAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.FilterAction.getDefaultInstance(); } } /** * * *
-     * Replaces specific terms in the query.
+     * Filters results.
      * 
* - * .google.cloud.retail.v2beta.Rule.ReplacementAction replacement_action = 8; + * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.ReplacementAction, - com.google.cloud.retail.v2beta.Rule.ReplacementAction.Builder, - com.google.cloud.retail.v2beta.Rule.ReplacementActionOrBuilder> - getReplacementActionFieldBuilder() { - if (replacementActionBuilder_ == null) { - if (!(actionCase_ == 8)) { - action_ = com.google.cloud.retail.v2beta.Rule.ReplacementAction.getDefaultInstance(); + com.google.cloud.retail.v2beta.Rule.FilterAction, + com.google.cloud.retail.v2beta.Rule.FilterAction.Builder, + com.google.cloud.retail.v2beta.Rule.FilterActionOrBuilder> + getFilterActionFieldBuilder() { + if (filterActionBuilder_ == null) { + if (!(actionCase_ == 10)) { + action_ = com.google.cloud.retail.v2beta.Rule.FilterAction.getDefaultInstance(); } - replacementActionBuilder_ = + filterActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.ReplacementAction, - com.google.cloud.retail.v2beta.Rule.ReplacementAction.Builder, - com.google.cloud.retail.v2beta.Rule.ReplacementActionOrBuilder>( - (com.google.cloud.retail.v2beta.Rule.ReplacementAction) action_, + com.google.cloud.retail.v2beta.Rule.FilterAction, + com.google.cloud.retail.v2beta.Rule.FilterAction.Builder, + com.google.cloud.retail.v2beta.Rule.FilterActionOrBuilder>( + (com.google.cloud.retail.v2beta.Rule.FilterAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 8; + actionCase_ = 10; onChanged(); - return replacementActionBuilder_; + return filterActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.IgnoreAction, - com.google.cloud.retail.v2beta.Rule.IgnoreAction.Builder, - com.google.cloud.retail.v2beta.Rule.IgnoreActionOrBuilder> - ignoreActionBuilder_; + com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction, + com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.Builder, + com.google.cloud.retail.v2beta.Rule.TwowaySynonymsActionOrBuilder> + twowaySynonymsActionBuilder_; /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * * - * @return Whether the ignoreAction field is set. + * @return Whether the twowaySynonymsAction field is set. */ @java.lang.Override - public boolean hasIgnoreAction() { - return actionCase_ == 9; + public boolean hasTwowaySynonymsAction() { + return actionCase_ == 11; } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * * - * @return The ignoreAction. + * @return The twowaySynonymsAction. */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.IgnoreAction getIgnoreAction() { - if (ignoreActionBuilder_ == null) { - if (actionCase_ == 9) { - return (com.google.cloud.retail.v2beta.Rule.IgnoreAction) action_; + public com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction getTwowaySynonymsAction() { + if (twowaySynonymsActionBuilder_ == null) { + if (actionCase_ == 11) { + return (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_; } - return com.google.cloud.retail.v2beta.Rule.IgnoreAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.getDefaultInstance(); } else { - if (actionCase_ == 9) { - return ignoreActionBuilder_.getMessage(); + if (actionCase_ == 11) { + return twowaySynonymsActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2beta.Rule.IgnoreAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.getDefaultInstance(); } } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * */ - public Builder setIgnoreAction(com.google.cloud.retail.v2beta.Rule.IgnoreAction value) { - if (ignoreActionBuilder_ == null) { + public Builder setTwowaySynonymsAction( + com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction value) { + if (twowaySynonymsActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - ignoreActionBuilder_.setMessage(value); + twowaySynonymsActionBuilder_.setMessage(value); } - actionCase_ = 9; + actionCase_ = 11; return this; } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * */ - public Builder setIgnoreAction( - com.google.cloud.retail.v2beta.Rule.IgnoreAction.Builder builderForValue) { - if (ignoreActionBuilder_ == null) { + public Builder setTwowaySynonymsAction( + com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.Builder builderForValue) { + if (twowaySynonymsActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - ignoreActionBuilder_.setMessage(builderForValue.build()); + twowaySynonymsActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 9; + actionCase_ = 11; return this; } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * */ - public Builder mergeIgnoreAction(com.google.cloud.retail.v2beta.Rule.IgnoreAction value) { - if (ignoreActionBuilder_ == null) { - if (actionCase_ == 9 - && action_ != com.google.cloud.retail.v2beta.Rule.IgnoreAction.getDefaultInstance()) { + public Builder mergeTwowaySynonymsAction( + com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction value) { + if (twowaySynonymsActionBuilder_ == null) { + if (actionCase_ == 11 + && action_ + != com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2beta.Rule.IgnoreAction.newBuilder( - (com.google.cloud.retail.v2beta.Rule.IgnoreAction) action_) + com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.newBuilder( + (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -10629,37 +14102,38 @@ public Builder mergeIgnoreAction(com.google.cloud.retail.v2beta.Rule.IgnoreActio } onChanged(); } else { - if (actionCase_ == 9) { - ignoreActionBuilder_.mergeFrom(value); + if (actionCase_ == 11) { + twowaySynonymsActionBuilder_.mergeFrom(value); } else { - ignoreActionBuilder_.setMessage(value); + twowaySynonymsActionBuilder_.setMessage(value); } } - actionCase_ = 9; + actionCase_ = 11; return this; } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * */ - public Builder clearIgnoreAction() { - if (ignoreActionBuilder_ == null) { - if (actionCase_ == 9) { + public Builder clearTwowaySynonymsAction() { + if (twowaySynonymsActionBuilder_ == null) { + if (actionCase_ == 11) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 9) { + if (actionCase_ == 11) { actionCase_ = 0; action_ = null; } - ignoreActionBuilder_.clear(); + twowaySynonymsActionBuilder_.clear(); } return this; } @@ -10667,170 +14141,184 @@ public Builder clearIgnoreAction() { * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * */ - public com.google.cloud.retail.v2beta.Rule.IgnoreAction.Builder getIgnoreActionBuilder() { - return getIgnoreActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.Builder + getTwowaySynonymsActionBuilder() { + return getTwowaySynonymsActionFieldBuilder().getBuilder(); } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.IgnoreActionOrBuilder getIgnoreActionOrBuilder() { - if ((actionCase_ == 9) && (ignoreActionBuilder_ != null)) { - return ignoreActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2beta.Rule.TwowaySynonymsActionOrBuilder + getTwowaySynonymsActionOrBuilder() { + if ((actionCase_ == 11) && (twowaySynonymsActionBuilder_ != null)) { + return twowaySynonymsActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 9) { - return (com.google.cloud.retail.v2beta.Rule.IgnoreAction) action_; + if (actionCase_ == 11) { + return (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_; } - return com.google.cloud.retail.v2beta.Rule.IgnoreAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.getDefaultInstance(); } } /** * * *
-     * Ignores specific terms from query during search.
+     * Treats a set of terms as synonyms of one another.
      * 
* - * .google.cloud.retail.v2beta.Rule.IgnoreAction ignore_action = 9; + * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.IgnoreAction, - com.google.cloud.retail.v2beta.Rule.IgnoreAction.Builder, - com.google.cloud.retail.v2beta.Rule.IgnoreActionOrBuilder> - getIgnoreActionFieldBuilder() { - if (ignoreActionBuilder_ == null) { - if (!(actionCase_ == 9)) { - action_ = com.google.cloud.retail.v2beta.Rule.IgnoreAction.getDefaultInstance(); + com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction, + com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.Builder, + com.google.cloud.retail.v2beta.Rule.TwowaySynonymsActionOrBuilder> + getTwowaySynonymsActionFieldBuilder() { + if (twowaySynonymsActionBuilder_ == null) { + if (!(actionCase_ == 11)) { + action_ = com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.getDefaultInstance(); } - ignoreActionBuilder_ = + twowaySynonymsActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.IgnoreAction, - com.google.cloud.retail.v2beta.Rule.IgnoreAction.Builder, - com.google.cloud.retail.v2beta.Rule.IgnoreActionOrBuilder>( - (com.google.cloud.retail.v2beta.Rule.IgnoreAction) action_, + com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction, + com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.Builder, + com.google.cloud.retail.v2beta.Rule.TwowaySynonymsActionOrBuilder>( + (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 9; + actionCase_ = 11; onChanged(); - return ignoreActionBuilder_; + return twowaySynonymsActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.FilterAction, - com.google.cloud.retail.v2beta.Rule.FilterAction.Builder, - com.google.cloud.retail.v2beta.Rule.FilterActionOrBuilder> - filterActionBuilder_; + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.Builder, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetActionOrBuilder> + forceReturnFacetActionBuilder_; /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * * - * @return Whether the filterAction field is set. + * @return Whether the forceReturnFacetAction field is set. */ @java.lang.Override - public boolean hasFilterAction() { - return actionCase_ == 10; + public boolean hasForceReturnFacetAction() { + return actionCase_ == 12; } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * * - * @return The filterAction. + * @return The forceReturnFacetAction. */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.FilterAction getFilterAction() { - if (filterActionBuilder_ == null) { - if (actionCase_ == 10) { - return (com.google.cloud.retail.v2beta.Rule.FilterAction) action_; + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction getForceReturnFacetAction() { + if (forceReturnFacetActionBuilder_ == null) { + if (actionCase_ == 12) { + return (com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) action_; } - return com.google.cloud.retail.v2beta.Rule.FilterAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.getDefaultInstance(); } else { - if (actionCase_ == 10) { - return filterActionBuilder_.getMessage(); + if (actionCase_ == 12) { + return forceReturnFacetActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2beta.Rule.FilterAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.getDefaultInstance(); } } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ - public Builder setFilterAction(com.google.cloud.retail.v2beta.Rule.FilterAction value) { - if (filterActionBuilder_ == null) { + public Builder setForceReturnFacetAction( + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction value) { + if (forceReturnFacetActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - filterActionBuilder_.setMessage(value); + forceReturnFacetActionBuilder_.setMessage(value); } - actionCase_ = 10; + actionCase_ = 12; return this; } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ - public Builder setFilterAction( - com.google.cloud.retail.v2beta.Rule.FilterAction.Builder builderForValue) { - if (filterActionBuilder_ == null) { + public Builder setForceReturnFacetAction( + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.Builder builderForValue) { + if (forceReturnFacetActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - filterActionBuilder_.setMessage(builderForValue.build()); + forceReturnFacetActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 10; + actionCase_ = 12; return this; } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ - public Builder mergeFilterAction(com.google.cloud.retail.v2beta.Rule.FilterAction value) { - if (filterActionBuilder_ == null) { - if (actionCase_ == 10 - && action_ != com.google.cloud.retail.v2beta.Rule.FilterAction.getDefaultInstance()) { + public Builder mergeForceReturnFacetAction( + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction value) { + if (forceReturnFacetActionBuilder_ == null) { + if (actionCase_ == 12 + && action_ + != com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction + .getDefaultInstance()) { action_ = - com.google.cloud.retail.v2beta.Rule.FilterAction.newBuilder( - (com.google.cloud.retail.v2beta.Rule.FilterAction) action_) + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.newBuilder( + (com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -10838,37 +14326,38 @@ public Builder mergeFilterAction(com.google.cloud.retail.v2beta.Rule.FilterActio } onChanged(); } else { - if (actionCase_ == 10) { - filterActionBuilder_.mergeFrom(value); + if (actionCase_ == 12) { + forceReturnFacetActionBuilder_.mergeFrom(value); } else { - filterActionBuilder_.setMessage(value); + forceReturnFacetActionBuilder_.setMessage(value); } } - actionCase_ = 10; + actionCase_ = 12; return this; } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ - public Builder clearFilterAction() { - if (filterActionBuilder_ == null) { - if (actionCase_ == 10) { + public Builder clearForceReturnFacetAction() { + if (forceReturnFacetActionBuilder_ == null) { + if (actionCase_ == 12) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 10) { + if (actionCase_ == 12) { actionCase_ = 0; action_ = null; } - filterActionBuilder_.clear(); + forceReturnFacetActionBuilder_.clear(); } return this; } @@ -10876,178 +14365,178 @@ public Builder clearFilterAction() { * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ - public com.google.cloud.retail.v2beta.Rule.FilterAction.Builder getFilterActionBuilder() { - return getFilterActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.Builder + getForceReturnFacetActionBuilder() { + return getForceReturnFacetActionFieldBuilder().getBuilder(); } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.FilterActionOrBuilder getFilterActionOrBuilder() { - if ((actionCase_ == 10) && (filterActionBuilder_ != null)) { - return filterActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2beta.Rule.ForceReturnFacetActionOrBuilder + getForceReturnFacetActionOrBuilder() { + if ((actionCase_ == 12) && (forceReturnFacetActionBuilder_ != null)) { + return forceReturnFacetActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 10) { - return (com.google.cloud.retail.v2beta.Rule.FilterAction) action_; + if (actionCase_ == 12) { + return (com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) action_; } - return com.google.cloud.retail.v2beta.Rule.FilterAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.getDefaultInstance(); } } /** * * *
-     * Filters results.
+     * Force returns an attribute as a facet in the request.
      * 
* - * .google.cloud.retail.v2beta.Rule.FilterAction filter_action = 10; + * .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.FilterAction, - com.google.cloud.retail.v2beta.Rule.FilterAction.Builder, - com.google.cloud.retail.v2beta.Rule.FilterActionOrBuilder> - getFilterActionFieldBuilder() { - if (filterActionBuilder_ == null) { - if (!(actionCase_ == 10)) { - action_ = com.google.cloud.retail.v2beta.Rule.FilterAction.getDefaultInstance(); - } - filterActionBuilder_ = + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.Builder, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetActionOrBuilder> + getForceReturnFacetActionFieldBuilder() { + if (forceReturnFacetActionBuilder_ == null) { + if (!(actionCase_ == 12)) { + action_ = com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.getDefaultInstance(); + } + forceReturnFacetActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.FilterAction, - com.google.cloud.retail.v2beta.Rule.FilterAction.Builder, - com.google.cloud.retail.v2beta.Rule.FilterActionOrBuilder>( - (com.google.cloud.retail.v2beta.Rule.FilterAction) action_, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.Builder, + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetActionOrBuilder>( + (com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 10; + actionCase_ = 12; onChanged(); - return filterActionBuilder_; + return forceReturnFacetActionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction, - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.Builder, - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsActionOrBuilder> - twowaySynonymsActionBuilder_; + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction, + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.Builder, + com.google.cloud.retail.v2beta.Rule.RemoveFacetActionOrBuilder> + removeFacetActionBuilder_; /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2beta.Rule.RemoveFacetAction remove_facet_action = 13; * - * @return Whether the twowaySynonymsAction field is set. + * @return Whether the removeFacetAction field is set. */ @java.lang.Override - public boolean hasTwowaySynonymsAction() { - return actionCase_ == 11; + public boolean hasRemoveFacetAction() { + return actionCase_ == 13; } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2beta.Rule.RemoveFacetAction remove_facet_action = 13; * - * @return The twowaySynonymsAction. + * @return The removeFacetAction. */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction getTwowaySynonymsAction() { - if (twowaySynonymsActionBuilder_ == null) { - if (actionCase_ == 11) { - return (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_; + public com.google.cloud.retail.v2beta.Rule.RemoveFacetAction getRemoveFacetAction() { + if (removeFacetActionBuilder_ == null) { + if (actionCase_ == 13) { + return (com.google.cloud.retail.v2beta.Rule.RemoveFacetAction) action_; } - return com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.getDefaultInstance(); } else { - if (actionCase_ == 11) { - return twowaySynonymsActionBuilder_.getMessage(); + if (actionCase_ == 13) { + return removeFacetActionBuilder_.getMessage(); } - return com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.getDefaultInstance(); } } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2beta.Rule.RemoveFacetAction remove_facet_action = 13; */ - public Builder setTwowaySynonymsAction( - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction value) { - if (twowaySynonymsActionBuilder_ == null) { + public Builder setRemoveFacetAction( + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction value) { + if (removeFacetActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - twowaySynonymsActionBuilder_.setMessage(value); + removeFacetActionBuilder_.setMessage(value); } - actionCase_ = 11; + actionCase_ = 13; return this; } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2beta.Rule.RemoveFacetAction remove_facet_action = 13; */ - public Builder setTwowaySynonymsAction( - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.Builder builderForValue) { - if (twowaySynonymsActionBuilder_ == null) { + public Builder setRemoveFacetAction( + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.Builder builderForValue) { + if (removeFacetActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - twowaySynonymsActionBuilder_.setMessage(builderForValue.build()); + removeFacetActionBuilder_.setMessage(builderForValue.build()); } - actionCase_ = 11; + actionCase_ = 13; return this; } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2beta.Rule.RemoveFacetAction remove_facet_action = 13; */ - public Builder mergeTwowaySynonymsAction( - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction value) { - if (twowaySynonymsActionBuilder_ == null) { - if (actionCase_ == 11 + public Builder mergeRemoveFacetAction( + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction value) { + if (removeFacetActionBuilder_ == null) { + if (actionCase_ == 13 && action_ - != com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.getDefaultInstance()) { + != com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.getDefaultInstance()) { action_ = - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.newBuilder( - (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_) + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.newBuilder( + (com.google.cloud.retail.v2beta.Rule.RemoveFacetAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -11055,38 +14544,37 @@ public Builder mergeTwowaySynonymsAction( } onChanged(); } else { - if (actionCase_ == 11) { - twowaySynonymsActionBuilder_.mergeFrom(value); + if (actionCase_ == 13) { + removeFacetActionBuilder_.mergeFrom(value); } else { - twowaySynonymsActionBuilder_.setMessage(value); + removeFacetActionBuilder_.setMessage(value); } } - actionCase_ = 11; + actionCase_ = 13; return this; } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2beta.Rule.RemoveFacetAction remove_facet_action = 13; */ - public Builder clearTwowaySynonymsAction() { - if (twowaySynonymsActionBuilder_ == null) { - if (actionCase_ == 11) { + public Builder clearRemoveFacetAction() { + if (removeFacetActionBuilder_ == null) { + if (actionCase_ == 13) { actionCase_ = 0; action_ = null; onChanged(); } } else { - if (actionCase_ == 11) { + if (actionCase_ == 13) { actionCase_ = 0; action_ = null; } - twowaySynonymsActionBuilder_.clear(); + removeFacetActionBuilder_.clear(); } return this; } @@ -11094,70 +14582,67 @@ public Builder clearTwowaySynonymsAction() { * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2beta.Rule.RemoveFacetAction remove_facet_action = 13; */ - public com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.Builder - getTwowaySynonymsActionBuilder() { - return getTwowaySynonymsActionFieldBuilder().getBuilder(); + public com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.Builder + getRemoveFacetActionBuilder() { + return getRemoveFacetActionFieldBuilder().getBuilder(); } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2beta.Rule.RemoveFacetAction remove_facet_action = 13; */ @java.lang.Override - public com.google.cloud.retail.v2beta.Rule.TwowaySynonymsActionOrBuilder - getTwowaySynonymsActionOrBuilder() { - if ((actionCase_ == 11) && (twowaySynonymsActionBuilder_ != null)) { - return twowaySynonymsActionBuilder_.getMessageOrBuilder(); + public com.google.cloud.retail.v2beta.Rule.RemoveFacetActionOrBuilder + getRemoveFacetActionOrBuilder() { + if ((actionCase_ == 13) && (removeFacetActionBuilder_ != null)) { + return removeFacetActionBuilder_.getMessageOrBuilder(); } else { - if (actionCase_ == 11) { - return (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_; + if (actionCase_ == 13) { + return (com.google.cloud.retail.v2beta.Rule.RemoveFacetAction) action_; } - return com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.getDefaultInstance(); + return com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.getDefaultInstance(); } } /** * * *
-     * Treats a set of terms as synonyms of one another.
+     * Remove an attribute as a facet in the request (if present).
      * 
* - * .google.cloud.retail.v2beta.Rule.TwowaySynonymsAction twoway_synonyms_action = 11; - * + * .google.cloud.retail.v2beta.Rule.RemoveFacetAction remove_facet_action = 13; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction, - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.Builder, - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsActionOrBuilder> - getTwowaySynonymsActionFieldBuilder() { - if (twowaySynonymsActionBuilder_ == null) { - if (!(actionCase_ == 11)) { - action_ = com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.getDefaultInstance(); - } - twowaySynonymsActionBuilder_ = + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction, + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.Builder, + com.google.cloud.retail.v2beta.Rule.RemoveFacetActionOrBuilder> + getRemoveFacetActionFieldBuilder() { + if (removeFacetActionBuilder_ == null) { + if (!(actionCase_ == 13)) { + action_ = com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.getDefaultInstance(); + } + removeFacetActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction, - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.Builder, - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsActionOrBuilder>( - (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_, + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction, + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction.Builder, + com.google.cloud.retail.v2beta.Rule.RemoveFacetActionOrBuilder>( + (com.google.cloud.retail.v2beta.Rule.RemoveFacetAction) action_, getParentForChildren(), isClean()); action_ = null; } - actionCase_ = 11; + actionCase_ = 13; onChanged(); - return twowaySynonymsActionBuilder_; + return removeFacetActionBuilder_; } private com.google.cloud.retail.v2beta.Condition condition_; @@ -11181,7 +14666,7 @@ public Builder clearTwowaySynonymsAction() { * @return Whether the condition field is set. */ public boolean hasCondition() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * @@ -11227,7 +14712,7 @@ public Builder setCondition(com.google.cloud.retail.v2beta.Condition value) { } else { conditionBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -11249,7 +14734,7 @@ public Builder setCondition(com.google.cloud.retail.v2beta.Condition.Builder bui } else { conditionBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -11267,7 +14752,7 @@ public Builder setCondition(com.google.cloud.retail.v2beta.Condition.Builder bui */ public Builder mergeCondition(com.google.cloud.retail.v2beta.Condition value) { if (conditionBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000400) != 0) && condition_ != null && condition_ != com.google.cloud.retail.v2beta.Condition.getDefaultInstance()) { getConditionBuilder().mergeFrom(value); @@ -11278,7 +14763,7 @@ public Builder mergeCondition(com.google.cloud.retail.v2beta.Condition value) { conditionBuilder_.mergeFrom(value); } if (condition_ != null) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); } return this; @@ -11296,7 +14781,7 @@ public Builder mergeCondition(com.google.cloud.retail.v2beta.Condition value) { * */ public Builder clearCondition() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000400); condition_ = null; if (conditionBuilder_ != null) { conditionBuilder_.dispose(); @@ -11318,7 +14803,7 @@ public Builder clearCondition() { * */ public com.google.cloud.retail.v2beta.Condition.Builder getConditionBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); return getConditionFieldBuilder().getBuilder(); } diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RuleOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RuleOrBuilder.java index 653f9cc9e29a..eb293c4a4168 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RuleOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RuleOrBuilder.java @@ -310,6 +310,80 @@ public interface RuleOrBuilder com.google.cloud.retail.v2beta.Rule.TwowaySynonymsActionOrBuilder getTwowaySynonymsActionOrBuilder(); + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + * + * @return Whether the forceReturnFacetAction field is set. + */ + boolean hasForceReturnFacetAction(); + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + * + * @return The forceReturnFacetAction. + */ + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetAction getForceReturnFacetAction(); + /** + * + * + *
+   * Force returns an attribute as a facet in the request.
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.ForceReturnFacetAction force_return_facet_action = 12; + * + */ + com.google.cloud.retail.v2beta.Rule.ForceReturnFacetActionOrBuilder + getForceReturnFacetActionOrBuilder(); + + /** + * + * + *
+   * Remove an attribute as a facet in the request (if present).
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.RemoveFacetAction remove_facet_action = 13; + * + * @return Whether the removeFacetAction field is set. + */ + boolean hasRemoveFacetAction(); + /** + * + * + *
+   * Remove an attribute as a facet in the request (if present).
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.RemoveFacetAction remove_facet_action = 13; + * + * @return The removeFacetAction. + */ + com.google.cloud.retail.v2beta.Rule.RemoveFacetAction getRemoveFacetAction(); + /** + * + * + *
+   * Remove an attribute as a facet in the request (if present).
+   * 
+ * + * .google.cloud.retail.v2beta.Rule.RemoveFacetAction remove_facet_action = 13; + */ + com.google.cloud.retail.v2beta.Rule.RemoveFacetActionOrBuilder getRemoveFacetActionOrBuilder(); + /** * * diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequest.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequest.java index 9facd343f4ae..6820e4e0c252 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequest.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequest.java @@ -528,15 +528,15 @@ public interface FacetSpecOrBuilder *
      * Enables dynamic position for this facet. If set to true, the position of
      * this facet among all facets in the response is determined by Google
-     * Retail Search. It will be ordered together with dynamic facets if dynamic
+     * Retail Search. It is ordered together with dynamic facets if dynamic
      * facets is enabled. If set to false, the position of this facet in the
-     * response will be the same as in the request, and it will be ranked before
+     * response is the same as in the request, and it is ranked before
      * the facets with dynamic position enable and all dynamic facets.
      *
      * For example, you may always want to have rating facet returned in
      * the response, but it's not necessarily to always display the rating facet
      * at the top. In that case, you can set enable_dynamic_position to true so
-     * that the position of rating facet in response will be determined by
+     * that the position of rating facet in response is determined by
      * Google Retail Search.
      *
      * Another example, assuming you have the following facets in the request:
@@ -547,13 +547,13 @@ public interface FacetSpecOrBuilder
      *
      * * "brands", enable_dynamic_position = false
      *
-     * And also you have a dynamic facets enable, which will generate a facet
-     * 'gender'. Then the final order of the facets in the response can be
+     * And also you have a dynamic facets enable, which generates a facet
+     * "gender". Then, the final order of the facets in the response can be
      * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
      * "rating") depends on how Google Retail Search orders "gender" and
-     * "rating" facets. However, notice that "price" and "brands" will always be
-     * ranked at 1st and 2nd position since their enable_dynamic_position are
-     * false.
+     * "rating" facets. However, notice that "price" and "brands" are always
+     * ranked at first and second position because their enable_dynamic_position
+     * values are false.
      * 
* * bool enable_dynamic_position = 4; @@ -725,13 +725,13 @@ public interface FacetKeyOrBuilder * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -746,13 +746,13 @@ public interface FacetKeyOrBuilder * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -767,13 +767,13 @@ public interface FacetKeyOrBuilder * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -788,13 +788,13 @@ public interface FacetKeyOrBuilder * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -810,13 +810,13 @@ public interface FacetKeyOrBuilder * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -977,7 +977,7 @@ public interface FacetKeyOrBuilder * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -993,7 +993,7 @@ public interface FacetKeyOrBuilder * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1009,7 +1009,7 @@ public interface FacetKeyOrBuilder * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1026,7 +1026,7 @@ public interface FacetKeyOrBuilder * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1044,7 +1044,7 @@ public interface FacetKeyOrBuilder * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. *
* @@ -1060,7 +1060,7 @@ public interface FacetKeyOrBuilder * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. *
* @@ -1076,7 +1076,7 @@ public interface FacetKeyOrBuilder * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. *
* @@ -1093,7 +1093,7 @@ public interface FacetKeyOrBuilder * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. *
* @@ -1190,7 +1190,7 @@ public interface FacetKeyOrBuilder * *
        * The query that is used to compute facet for the given facet key.
-       * When provided, it will override the default behavior of facet
+       * When provided, it overrides the default behavior of facet
        * computation. The query syntax is the same as a filter expression. See
        * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]
        * for detail syntax and limitations. Notice that there is no limitation
@@ -1200,9 +1200,9 @@ public interface FacetKeyOrBuilder
        *
        * In the response,
        * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
-       * will be always "1" and
+       * is always "1" and
        * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
-       * will be the number of results that match the query.
+       * is the number of results that match the query.
        *
        * For example, you can set a customized facet for "shipToStore",
        * where
@@ -1210,7 +1210,7 @@ public interface FacetKeyOrBuilder
        * is "customizedShipToStore", and
        * [FacetKey.query][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.query]
        * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-       * Then the facet will count the products that are both in stock and ship
+       * Then the facet counts the products that are both in stock and ship
        * to store "123".
        * 
* @@ -1224,7 +1224,7 @@ public interface FacetKeyOrBuilder * *
        * The query that is used to compute facet for the given facet key.
-       * When provided, it will override the default behavior of facet
+       * When provided, it overrides the default behavior of facet
        * computation. The query syntax is the same as a filter expression. See
        * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]
        * for detail syntax and limitations. Notice that there is no limitation
@@ -1234,9 +1234,9 @@ public interface FacetKeyOrBuilder
        *
        * In the response,
        * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
-       * will be always "1" and
+       * is always "1" and
        * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
-       * will be the number of results that match the query.
+       * is the number of results that match the query.
        *
        * For example, you can set a customized facet for "shipToStore",
        * where
@@ -1244,7 +1244,7 @@ public interface FacetKeyOrBuilder
        * is "customizedShipToStore", and
        * [FacetKey.query][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.query]
        * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-       * Then the facet will count the products that are both in stock and ship
+       * Then the facet counts the products that are both in stock and ship
        * to store "123".
        * 
* @@ -1462,13 +1462,13 @@ public com.google.protobuf.ByteString getKeyBytes() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -1486,13 +1486,13 @@ public java.util.List getIntervalsList( * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -1511,13 +1511,13 @@ public java.util.List getIntervalsList( * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -1535,13 +1535,13 @@ public int getIntervalsCount() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -1559,13 +1559,13 @@ public com.google.cloud.retail.v2beta.Interval getIntervals(int index) { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. *
* * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -1747,7 +1747,7 @@ public com.google.protobuf.ByteString getRestrictedValuesBytes(int index) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1765,7 +1765,7 @@ public com.google.protobuf.ProtocolStringList getPrefixesList() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1783,7 +1783,7 @@ public int getPrefixesCount() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1802,7 +1802,7 @@ public java.lang.String getPrefixes(int index) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. *
* @@ -1827,7 +1827,7 @@ public com.google.protobuf.ByteString getPrefixesBytes(int index) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. *
* @@ -1845,7 +1845,7 @@ public com.google.protobuf.ProtocolStringList getContainsList() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -1863,7 +1863,7 @@ public int getContainsCount() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -1882,7 +1882,7 @@ public java.lang.String getContains(int index) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -2016,7 +2016,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { * *
        * The query that is used to compute facet for the given facet key.
-       * When provided, it will override the default behavior of facet
+       * When provided, it overrides the default behavior of facet
        * computation. The query syntax is the same as a filter expression. See
        * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]
        * for detail syntax and limitations. Notice that there is no limitation
@@ -2026,9 +2026,9 @@ public com.google.protobuf.ByteString getOrderByBytes() {
        *
        * In the response,
        * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
-       * will be always "1" and
+       * is always "1" and
        * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
-       * will be the number of results that match the query.
+       * is the number of results that match the query.
        *
        * For example, you can set a customized facet for "shipToStore",
        * where
@@ -2036,7 +2036,7 @@ public com.google.protobuf.ByteString getOrderByBytes() {
        * is "customizedShipToStore", and
        * [FacetKey.query][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.query]
        * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-       * Then the facet will count the products that are both in stock and ship
+       * Then the facet counts the products that are both in stock and ship
        * to store "123".
        * 
* @@ -2061,7 +2061,7 @@ public java.lang.String getQuery() { * *
        * The query that is used to compute facet for the given facet key.
-       * When provided, it will override the default behavior of facet
+       * When provided, it overrides the default behavior of facet
        * computation. The query syntax is the same as a filter expression. See
        * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]
        * for detail syntax and limitations. Notice that there is no limitation
@@ -2071,9 +2071,9 @@ public java.lang.String getQuery() {
        *
        * In the response,
        * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
-       * will be always "1" and
+       * is always "1" and
        * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
-       * will be the number of results that match the query.
+       * is the number of results that match the query.
        *
        * For example, you can set a customized facet for "shipToStore",
        * where
@@ -2081,7 +2081,7 @@ public java.lang.String getQuery() {
        * is "customizedShipToStore", and
        * [FacetKey.query][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.query]
        * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-       * Then the facet will count the products that are both in stock and ship
+       * Then the facet counts the products that are both in stock and ship
        * to store "123".
        * 
* @@ -3088,13 +3088,13 @@ private void ensureIntervalsIsMutable() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3115,13 +3115,13 @@ public java.util.List getIntervalsList( * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3142,13 +3142,13 @@ public int getIntervalsCount() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3169,13 +3169,13 @@ public com.google.cloud.retail.v2beta.Interval getIntervals(int index) { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3202,13 +3202,13 @@ public Builder setIntervals(int index, com.google.cloud.retail.v2beta.Interval v * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3233,13 +3233,13 @@ public Builder setIntervals( * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3266,13 +3266,13 @@ public Builder addIntervals(com.google.cloud.retail.v2beta.Interval value) { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3299,13 +3299,13 @@ public Builder addIntervals(int index, com.google.cloud.retail.v2beta.Interval v * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3330,13 +3330,13 @@ public Builder addIntervals( * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3361,13 +3361,13 @@ public Builder addIntervals( * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3392,13 +3392,13 @@ public Builder addAllIntervals( * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3422,13 +3422,13 @@ public Builder clearIntervals() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3452,13 +3452,13 @@ public Builder removeIntervals(int index) { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3475,13 +3475,13 @@ public com.google.cloud.retail.v2beta.Interval.Builder getIntervalsBuilder(int i * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3502,13 +3502,13 @@ public com.google.cloud.retail.v2beta.IntervalOrBuilder getIntervalsOrBuilder(in * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3530,13 +3530,13 @@ public com.google.cloud.retail.v2beta.IntervalOrBuilder getIntervalsOrBuilder(in * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3554,13 +3554,13 @@ public com.google.cloud.retail.v2beta.Interval.Builder addIntervalsBuilder() { * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -3578,13 +3578,13 @@ public com.google.cloud.retail.v2beta.Interval.Builder addIntervalsBuilder(int i * values. Maximum number of intervals is 40. * * For all numerical facet keys that appear in the list of products from - * the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + * the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are * computed from their distribution weekly. If the model assigns a high * score to a numerical facet key and its intervals are not specified in - * the search request, these percentiles will become the bounds - * for its intervals and will be returned in the response. If the + * the search request, these percentiles become the bounds + * for its intervals and are returned in the response. If the * facet key intervals are specified in the request, then the specified - * intervals will be returned instead. + * intervals are returned instead. * * * repeated .google.cloud.retail.v2beta.Interval intervals = 2; @@ -4020,7 +4020,7 @@ private void ensurePrefixesIsMutable() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4039,7 +4039,7 @@ public com.google.protobuf.ProtocolStringList getPrefixesList() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4057,7 +4057,7 @@ public int getPrefixesCount() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4076,7 +4076,7 @@ public java.lang.String getPrefixes(int index) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4095,7 +4095,7 @@ public com.google.protobuf.ByteString getPrefixesBytes(int index) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4122,7 +4122,7 @@ public Builder setPrefixes(int index, java.lang.String value) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4148,7 +4148,7 @@ public Builder addPrefixes(java.lang.String value) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4171,7 +4171,7 @@ public Builder addAllPrefixes(java.lang.Iterable values) { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4193,7 +4193,7 @@ public Builder clearPrefixes() { * Only get facet values that start with the given string prefix. For * example, suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - * "categories" facet will give only "Women > Shoe" and "Women > Dress". + * "categories" facet gives only "Women > Shoe" and "Women > Dress". * Only supported on textual fields. Maximum is 10. * * @@ -4230,7 +4230,7 @@ private void ensureContainsIsMutable() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4249,7 +4249,7 @@ public com.google.protobuf.ProtocolStringList getContainsList() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4267,7 +4267,7 @@ public int getContainsCount() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4286,7 +4286,7 @@ public java.lang.String getContains(int index) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4305,7 +4305,7 @@ public com.google.protobuf.ByteString getContainsBytes(int index) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4332,7 +4332,7 @@ public Builder setContains(int index, java.lang.String value) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4358,7 +4358,7 @@ public Builder addContains(java.lang.String value) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4381,7 +4381,7 @@ public Builder addAllContains(java.lang.Iterable values) { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4403,7 +4403,7 @@ public Builder clearContains() { * Only get facet values that contains the given strings. For example, * suppose "categories" has three values "Women > Shoe", * "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - * "categories" facet will give only "Women > Shoe" and "Men > Shoe". + * "categories" facet gives only "Women > Shoe" and "Men > Shoe". * Only supported on textual fields. Maximum is 10. * * @@ -4697,7 +4697,7 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) { * *
          * The query that is used to compute facet for the given facet key.
-         * When provided, it will override the default behavior of facet
+         * When provided, it overrides the default behavior of facet
          * computation. The query syntax is the same as a filter expression. See
          * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]
          * for detail syntax and limitations. Notice that there is no limitation
@@ -4707,9 +4707,9 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) {
          *
          * In the response,
          * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
-         * will be always "1" and
+         * is always "1" and
          * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
-         * will be the number of results that match the query.
+         * is the number of results that match the query.
          *
          * For example, you can set a customized facet for "shipToStore",
          * where
@@ -4717,7 +4717,7 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) {
          * is "customizedShipToStore", and
          * [FacetKey.query][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.query]
          * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-         * Then the facet will count the products that are both in stock and ship
+         * Then the facet counts the products that are both in stock and ship
          * to store "123".
          * 
* @@ -4741,7 +4741,7 @@ public java.lang.String getQuery() { * *
          * The query that is used to compute facet for the given facet key.
-         * When provided, it will override the default behavior of facet
+         * When provided, it overrides the default behavior of facet
          * computation. The query syntax is the same as a filter expression. See
          * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]
          * for detail syntax and limitations. Notice that there is no limitation
@@ -4751,9 +4751,9 @@ public java.lang.String getQuery() {
          *
          * In the response,
          * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
-         * will be always "1" and
+         * is always "1" and
          * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
-         * will be the number of results that match the query.
+         * is the number of results that match the query.
          *
          * For example, you can set a customized facet for "shipToStore",
          * where
@@ -4761,7 +4761,7 @@ public java.lang.String getQuery() {
          * is "customizedShipToStore", and
          * [FacetKey.query][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.query]
          * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-         * Then the facet will count the products that are both in stock and ship
+         * Then the facet counts the products that are both in stock and ship
          * to store "123".
          * 
* @@ -4785,7 +4785,7 @@ public com.google.protobuf.ByteString getQueryBytes() { * *
          * The query that is used to compute facet for the given facet key.
-         * When provided, it will override the default behavior of facet
+         * When provided, it overrides the default behavior of facet
          * computation. The query syntax is the same as a filter expression. See
          * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]
          * for detail syntax and limitations. Notice that there is no limitation
@@ -4795,9 +4795,9 @@ public com.google.protobuf.ByteString getQueryBytes() {
          *
          * In the response,
          * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
-         * will be always "1" and
+         * is always "1" and
          * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
-         * will be the number of results that match the query.
+         * is the number of results that match the query.
          *
          * For example, you can set a customized facet for "shipToStore",
          * where
@@ -4805,7 +4805,7 @@ public com.google.protobuf.ByteString getQueryBytes() {
          * is "customizedShipToStore", and
          * [FacetKey.query][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.query]
          * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-         * Then the facet will count the products that are both in stock and ship
+         * Then the facet counts the products that are both in stock and ship
          * to store "123".
          * 
* @@ -4828,7 +4828,7 @@ public Builder setQuery(java.lang.String value) { * *
          * The query that is used to compute facet for the given facet key.
-         * When provided, it will override the default behavior of facet
+         * When provided, it overrides the default behavior of facet
          * computation. The query syntax is the same as a filter expression. See
          * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]
          * for detail syntax and limitations. Notice that there is no limitation
@@ -4838,9 +4838,9 @@ public Builder setQuery(java.lang.String value) {
          *
          * In the response,
          * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
-         * will be always "1" and
+         * is always "1" and
          * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
-         * will be the number of results that match the query.
+         * is the number of results that match the query.
          *
          * For example, you can set a customized facet for "shipToStore",
          * where
@@ -4848,7 +4848,7 @@ public Builder setQuery(java.lang.String value) {
          * is "customizedShipToStore", and
          * [FacetKey.query][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.query]
          * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-         * Then the facet will count the products that are both in stock and ship
+         * Then the facet counts the products that are both in stock and ship
          * to store "123".
          * 
* @@ -4867,7 +4867,7 @@ public Builder clearQuery() { * *
          * The query that is used to compute facet for the given facet key.
-         * When provided, it will override the default behavior of facet
+         * When provided, it overrides the default behavior of facet
          * computation. The query syntax is the same as a filter expression. See
          * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]
          * for detail syntax and limitations. Notice that there is no limitation
@@ -4877,9 +4877,9 @@ public Builder clearQuery() {
          *
          * In the response,
          * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
-         * will be always "1" and
+         * is always "1" and
          * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
-         * will be the number of results that match the query.
+         * is the number of results that match the query.
          *
          * For example, you can set a customized facet for "shipToStore",
          * where
@@ -4887,7 +4887,7 @@ public Builder clearQuery() {
          * is "customizedShipToStore", and
          * [FacetKey.query][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.query]
          * is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
-         * Then the facet will count the products that are both in stock and ship
+         * Then the facet counts the products that are both in stock and ship
          * to store "123".
          * 
* @@ -5290,15 +5290,15 @@ public com.google.protobuf.ByteString getExcludedFilterKeysBytes(int index) { *
      * Enables dynamic position for this facet. If set to true, the position of
      * this facet among all facets in the response is determined by Google
-     * Retail Search. It will be ordered together with dynamic facets if dynamic
+     * Retail Search. It is ordered together with dynamic facets if dynamic
      * facets is enabled. If set to false, the position of this facet in the
-     * response will be the same as in the request, and it will be ranked before
+     * response is the same as in the request, and it is ranked before
      * the facets with dynamic position enable and all dynamic facets.
      *
      * For example, you may always want to have rating facet returned in
      * the response, but it's not necessarily to always display the rating facet
      * at the top. In that case, you can set enable_dynamic_position to true so
-     * that the position of rating facet in response will be determined by
+     * that the position of rating facet in response is determined by
      * Google Retail Search.
      *
      * Another example, assuming you have the following facets in the request:
@@ -5309,13 +5309,13 @@ public com.google.protobuf.ByteString getExcludedFilterKeysBytes(int index) {
      *
      * * "brands", enable_dynamic_position = false
      *
-     * And also you have a dynamic facets enable, which will generate a facet
-     * 'gender'. Then the final order of the facets in the response can be
+     * And also you have a dynamic facets enable, which generates a facet
+     * "gender". Then, the final order of the facets in the response can be
      * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
      * "rating") depends on how Google Retail Search orders "gender" and
-     * "rating" facets. However, notice that "price" and "brands" will always be
-     * ranked at 1st and 2nd position since their enable_dynamic_position are
-     * false.
+     * "rating" facets. However, notice that "price" and "brands" are always
+     * ranked at first and second position because their enable_dynamic_position
+     * values are false.
      * 
* * bool enable_dynamic_position = 4; @@ -6475,15 +6475,15 @@ public Builder addExcludedFilterKeysBytes(com.google.protobuf.ByteString value) *
        * Enables dynamic position for this facet. If set to true, the position of
        * this facet among all facets in the response is determined by Google
-       * Retail Search. It will be ordered together with dynamic facets if dynamic
+       * Retail Search. It is ordered together with dynamic facets if dynamic
        * facets is enabled. If set to false, the position of this facet in the
-       * response will be the same as in the request, and it will be ranked before
+       * response is the same as in the request, and it is ranked before
        * the facets with dynamic position enable and all dynamic facets.
        *
        * For example, you may always want to have rating facet returned in
        * the response, but it's not necessarily to always display the rating facet
        * at the top. In that case, you can set enable_dynamic_position to true so
-       * that the position of rating facet in response will be determined by
+       * that the position of rating facet in response is determined by
        * Google Retail Search.
        *
        * Another example, assuming you have the following facets in the request:
@@ -6494,13 +6494,13 @@ public Builder addExcludedFilterKeysBytes(com.google.protobuf.ByteString value)
        *
        * * "brands", enable_dynamic_position = false
        *
-       * And also you have a dynamic facets enable, which will generate a facet
-       * 'gender'. Then the final order of the facets in the response can be
+       * And also you have a dynamic facets enable, which generates a facet
+       * "gender". Then, the final order of the facets in the response can be
        * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
        * "rating") depends on how Google Retail Search orders "gender" and
-       * "rating" facets. However, notice that "price" and "brands" will always be
-       * ranked at 1st and 2nd position since their enable_dynamic_position are
-       * false.
+       * "rating" facets. However, notice that "price" and "brands" are always
+       * ranked at first and second position because their enable_dynamic_position
+       * values are false.
        * 
* * bool enable_dynamic_position = 4; @@ -6517,15 +6517,15 @@ public boolean getEnableDynamicPosition() { *
        * Enables dynamic position for this facet. If set to true, the position of
        * this facet among all facets in the response is determined by Google
-       * Retail Search. It will be ordered together with dynamic facets if dynamic
+       * Retail Search. It is ordered together with dynamic facets if dynamic
        * facets is enabled. If set to false, the position of this facet in the
-       * response will be the same as in the request, and it will be ranked before
+       * response is the same as in the request, and it is ranked before
        * the facets with dynamic position enable and all dynamic facets.
        *
        * For example, you may always want to have rating facet returned in
        * the response, but it's not necessarily to always display the rating facet
        * at the top. In that case, you can set enable_dynamic_position to true so
-       * that the position of rating facet in response will be determined by
+       * that the position of rating facet in response is determined by
        * Google Retail Search.
        *
        * Another example, assuming you have the following facets in the request:
@@ -6536,13 +6536,13 @@ public boolean getEnableDynamicPosition() {
        *
        * * "brands", enable_dynamic_position = false
        *
-       * And also you have a dynamic facets enable, which will generate a facet
-       * 'gender'. Then the final order of the facets in the response can be
+       * And also you have a dynamic facets enable, which generates a facet
+       * "gender". Then, the final order of the facets in the response can be
        * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
        * "rating") depends on how Google Retail Search orders "gender" and
-       * "rating" facets. However, notice that "price" and "brands" will always be
-       * ranked at 1st and 2nd position since their enable_dynamic_position are
-       * false.
+       * "rating" facets. However, notice that "price" and "brands" are always
+       * ranked at first and second position because their enable_dynamic_position
+       * values are false.
        * 
* * bool enable_dynamic_position = 4; @@ -6563,15 +6563,15 @@ public Builder setEnableDynamicPosition(boolean value) { *
        * Enables dynamic position for this facet. If set to true, the position of
        * this facet among all facets in the response is determined by Google
-       * Retail Search. It will be ordered together with dynamic facets if dynamic
+       * Retail Search. It is ordered together with dynamic facets if dynamic
        * facets is enabled. If set to false, the position of this facet in the
-       * response will be the same as in the request, and it will be ranked before
+       * response is the same as in the request, and it is ranked before
        * the facets with dynamic position enable and all dynamic facets.
        *
        * For example, you may always want to have rating facet returned in
        * the response, but it's not necessarily to always display the rating facet
        * at the top. In that case, you can set enable_dynamic_position to true so
-       * that the position of rating facet in response will be determined by
+       * that the position of rating facet in response is determined by
        * Google Retail Search.
        *
        * Another example, assuming you have the following facets in the request:
@@ -6582,13 +6582,13 @@ public Builder setEnableDynamicPosition(boolean value) {
        *
        * * "brands", enable_dynamic_position = false
        *
-       * And also you have a dynamic facets enable, which will generate a facet
-       * 'gender'. Then the final order of the facets in the response can be
+       * And also you have a dynamic facets enable, which generates a facet
+       * "gender". Then, the final order of the facets in the response can be
        * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
        * "rating") depends on how Google Retail Search orders "gender" and
-       * "rating" facets. However, notice that "price" and "brands" will always be
-       * ranked at 1st and 2nd position since their enable_dynamic_position are
-       * false.
+       * "rating" facets. However, notice that "price" and "brands" are always
+       * ranked at first and second position because their enable_dynamic_position
+       * values are false.
        * 
* * bool enable_dynamic_position = 4; @@ -12367,7 +12367,7 @@ public com.google.protobuf.Parser getParserForType() { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -12395,7 +12395,7 @@ public java.lang.String getPlacement() { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -12779,8 +12779,8 @@ public int getOffset() { *
    * The filter syntax consists of an expression language for constructing a
    * predicate from one or more fields of the products being filtered. Filter
-   * expression is case-sensitive. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+   * expression is case-sensitive. For more information, see
+   * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -12807,8 +12807,8 @@ public java.lang.String getFilter() { *
    * The filter syntax consists of an expression language for constructing a
    * predicate from one or more fields of the products being filtered. Filter
-   * expression is case-sensitive. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+   * expression is case-sensitive. For more information, see
+   * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -12842,14 +12842,14 @@ public com.google.protobuf.ByteString getFilterBytes() { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2beta.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -12876,14 +12876,14 @@ public java.lang.String getCanonicalFilter() { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2beta.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -12913,9 +12913,9 @@ public com.google.protobuf.ByteString getCanonicalFilterBytes() { *
    * The order in which products are returned. Products can be ordered by
    * a field in an [Product][google.cloud.retail.v2beta.Product] object. Leave
-   * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-   * more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+   * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+   * more information, see
+   * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -12942,9 +12942,9 @@ public java.lang.String getOrderBy() { *
    * The order in which products are returned. Products can be ordered by
    * a field in an [Product][google.cloud.retail.v2beta.Product] object. Leave
-   * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-   * more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+   * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+   * more information, see
+   * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -13136,8 +13136,8 @@ public com.google.cloud.retail.v2beta.SearchRequest.DynamicFacetSpec getDynamicF * * *
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids]
@@ -13160,8 +13160,8 @@ public boolean hasBoostSpec() {
    *
    *
    * 
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids]
@@ -13186,8 +13186,8 @@ public com.google.cloud.retail.v2beta.SearchRequest.BoostSpec getBoostSpec() {
    *
    *
    * 
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids]
@@ -13214,8 +13214,8 @@ public com.google.cloud.retail.v2beta.SearchRequest.BoostSpecOrBuilder getBoostS
    *
    * 
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -13232,8 +13232,8 @@ public boolean hasQueryExpansionSpec() { * *
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -13252,8 +13252,8 @@ public com.google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec getQueryE * *
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -13879,9 +13879,9 @@ public int getLabelsCount() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -13917,9 +13917,9 @@ public java.util.Map getLabels() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -13946,9 +13946,9 @@ public java.util.Map getLabelsMap() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -13982,9 +13982,9 @@ public java.util.Map getLabelsMap() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. * * * map<string, string> labels = 34; @@ -15168,7 +15168,7 @@ public Builder mergeFrom( * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -15195,7 +15195,7 @@ public java.lang.String getPlacement() { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -15222,7 +15222,7 @@ public com.google.protobuf.ByteString getPlacementBytes() { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -15248,7 +15248,7 @@ public Builder setPlacement(java.lang.String value) { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -15270,7 +15270,7 @@ public Builder clearPlacement() { * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. * * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -16176,8 +16176,8 @@ public Builder clearOffset() { *
      * The filter syntax consists of an expression language for constructing a
      * predicate from one or more fields of the products being filtered. Filter
-     * expression is case-sensitive. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+     * expression is case-sensitive. For more information, see
+     * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16203,8 +16203,8 @@ public java.lang.String getFilter() { *
      * The filter syntax consists of an expression language for constructing a
      * predicate from one or more fields of the products being filtered. Filter
-     * expression is case-sensitive. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+     * expression is case-sensitive. For more information, see
+     * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16230,8 +16230,8 @@ public com.google.protobuf.ByteString getFilterBytes() { *
      * The filter syntax consists of an expression language for constructing a
      * predicate from one or more fields of the products being filtered. Filter
-     * expression is case-sensitive. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+     * expression is case-sensitive. For more information, see
+     * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16256,8 +16256,8 @@ public Builder setFilter(java.lang.String value) { *
      * The filter syntax consists of an expression language for constructing a
      * predicate from one or more fields of the products being filtered. Filter
-     * expression is case-sensitive. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+     * expression is case-sensitive. For more information, see
+     * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16278,8 +16278,8 @@ public Builder clearFilter() { *
      * The filter syntax consists of an expression language for constructing a
      * predicate from one or more fields of the products being filtered. Filter
-     * expression is case-sensitive. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+     * expression is case-sensitive. For more information, see
+     * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16309,14 +16309,14 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2beta.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -16342,14 +16342,14 @@ public java.lang.String getCanonicalFilter() { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2beta.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -16375,14 +16375,14 @@ public com.google.protobuf.ByteString getCanonicalFilterBytes() { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2beta.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -16407,14 +16407,14 @@ public Builder setCanonicalFilter(java.lang.String value) { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2beta.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -16435,14 +16435,14 @@ public Builder clearCanonicalFilter() { * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2beta.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -16468,9 +16468,9 @@ public Builder setCanonicalFilterBytes(com.google.protobuf.ByteString value) { *
      * The order in which products are returned. Products can be ordered by
      * a field in an [Product][google.cloud.retail.v2beta.Product] object. Leave
-     * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-     * more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+     * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+     * more information, see
+     * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16496,9 +16496,9 @@ public java.lang.String getOrderBy() { *
      * The order in which products are returned. Products can be ordered by
      * a field in an [Product][google.cloud.retail.v2beta.Product] object. Leave
-     * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-     * more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+     * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+     * more information, see
+     * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16524,9 +16524,9 @@ public com.google.protobuf.ByteString getOrderByBytes() { *
      * The order in which products are returned. Products can be ordered by
      * a field in an [Product][google.cloud.retail.v2beta.Product] object. Leave
-     * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-     * more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+     * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+     * more information, see
+     * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16551,9 +16551,9 @@ public Builder setOrderBy(java.lang.String value) { *
      * The order in which products are returned. Products can be ordered by
      * a field in an [Product][google.cloud.retail.v2beta.Product] object. Leave
-     * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-     * more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+     * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+     * more information, see
+     * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -16574,9 +16574,9 @@ public Builder clearOrderBy() { *
      * The order in which products are returned. Products can be ordered by
      * a field in an [Product][google.cloud.retail.v2beta.Product] object. Leave
-     * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-     * more details at this [user
-     * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+     * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+     * more information, see
+     * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
      *
      * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
      * 
@@ -17279,8 +17279,8 @@ public Builder clearDynamicFacetSpec() { * * *
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids]
@@ -17302,8 +17302,8 @@ public boolean hasBoostSpec() {
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids]
@@ -17331,8 +17331,8 @@ public com.google.cloud.retail.v2beta.SearchRequest.BoostSpec getBoostSpec() {
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids]
@@ -17362,8 +17362,8 @@ public Builder setBoostSpec(com.google.cloud.retail.v2beta.SearchRequest.BoostSp
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids]
@@ -17391,8 +17391,8 @@ public Builder setBoostSpec(
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids]
@@ -17428,8 +17428,8 @@ public Builder mergeBoostSpec(com.google.cloud.retail.v2beta.SearchRequest.Boost
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids]
@@ -17456,8 +17456,8 @@ public Builder clearBoostSpec() {
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids]
@@ -17479,8 +17479,8 @@ public com.google.cloud.retail.v2beta.SearchRequest.BoostSpec.Builder getBoostSp
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids]
@@ -17506,8 +17506,8 @@ public com.google.cloud.retail.v2beta.SearchRequest.BoostSpecOrBuilder getBoostS
      *
      *
      * 
-     * Boost specification to boost certain products. See more details at this
-     * [user guide](https://cloud.google.com/retail/docs/boosting).
+     * Boost specification to boost certain products. For more information, see
+     * [Boost results](https://cloud.google.com/retail/docs/boosting).
      *
      * Notice that if both
      * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids]
@@ -17548,8 +17548,8 @@ public com.google.cloud.retail.v2beta.SearchRequest.BoostSpecOrBuilder getBoostS
      *
      * 
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17565,8 +17565,8 @@ public boolean hasQueryExpansionSpec() { * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17588,8 +17588,8 @@ public com.google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec getQueryE * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17614,8 +17614,8 @@ public Builder setQueryExpansionSpec( * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17637,8 +17637,8 @@ public Builder setQueryExpansionSpec( * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17670,8 +17670,8 @@ public Builder mergeQueryExpansionSpec( * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17692,8 +17692,8 @@ public Builder clearQueryExpansionSpec() { * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17710,8 +17710,8 @@ public Builder clearQueryExpansionSpec() { * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -17732,8 +17732,8 @@ public Builder clearQueryExpansionSpec() { * *
      * The query expansion specification that specifies the conditions under which
-     * query expansion will occur. See more details at this [user
-     * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+     * query expansion occurs. For more information, see [Query
+     * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
      * 
* * .google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -19256,9 +19256,9 @@ public int getLabelsCount() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -19294,9 +19294,9 @@ public java.util.Map getLabels() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -19323,9 +19323,9 @@ public java.util.Map getLabelsMap() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -19359,9 +19359,9 @@ public java.util.Map getLabelsMap() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -19401,9 +19401,9 @@ public Builder clearLabels() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -19439,9 +19439,9 @@ public java.util.Map getMutableLabels() { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -19475,9 +19475,9 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequestOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequestOrBuilder.java index 0e271d132b4c..eff549abb619 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequestOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequestOrBuilder.java @@ -33,7 +33,7 @@ public interface SearchRequestOrBuilder * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. *
* * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -50,7 +50,7 @@ public interface SearchRequestOrBuilder * or the name of the legacy placement resource, such as * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. * This field is used to identify the serving config name and the set - * of models that will be used to make the search. + * of models that are used to make the search. *
* * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -290,8 +290,8 @@ public interface SearchRequestOrBuilder *
    * The filter syntax consists of an expression language for constructing a
    * predicate from one or more fields of the products being filtered. Filter
-   * expression is case-sensitive. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+   * expression is case-sensitive. For more information, see
+   * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -307,8 +307,8 @@ public interface SearchRequestOrBuilder *
    * The filter syntax consists of an expression language for constructing a
    * predicate from one or more fields of the products being filtered. Filter
-   * expression is case-sensitive. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
+   * expression is case-sensitive. For more information, see
+   * [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -327,14 +327,14 @@ public interface SearchRequestOrBuilder * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2beta.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -350,14 +350,14 @@ public interface SearchRequestOrBuilder * checking any filters on the search page. * * The filter applied to every search request when quality improvement such as - * query expansion is needed. For example, if a query does not have enough - * results, an expanded query with - * [SearchRequest.canonical_filter][google.cloud.retail.v2beta.SearchRequest.canonical_filter] - * will be returned as a supplement of the original query. This field is - * strongly recommended to achieve high search quality. - * - * See [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter] - * for more details about filter syntax. + * query expansion is needed. In the case a query does not have a sufficient + * amount of results this filter will be used to determine whether or not to + * enable the query expansion flow. The original filter will still be used for + * the query expanded search. + * This field is strongly recommended to achieve high search quality. + * + * For more information about filter syntax, see + * [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. * * * string canonical_filter = 28; @@ -372,9 +372,9 @@ public interface SearchRequestOrBuilder *
    * The order in which products are returned. Products can be ordered by
    * a field in an [Product][google.cloud.retail.v2beta.Product] object. Leave
-   * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-   * more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+   * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+   * more information, see
+   * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -390,9 +390,9 @@ public interface SearchRequestOrBuilder *
    * The order in which products are returned. Products can be ordered by
    * a field in an [Product][google.cloud.retail.v2beta.Product] object. Leave
-   * it unset if ordered by relevance. OrderBy expression is case-sensitive. See
-   * more details at this [user
-   * guide](https://cloud.google.com/retail/docs/filter-and-order#order).
+   * it unset if ordered by relevance. OrderBy expression is case-sensitive. For
+   * more information, see
+   * [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
    *
    * If this field is unrecognizable, an INVALID_ARGUMENT is returned.
    * 
@@ -535,8 +535,8 @@ public interface SearchRequestOrBuilder * * *
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids]
@@ -556,8 +556,8 @@ public interface SearchRequestOrBuilder
    *
    *
    * 
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids]
@@ -577,8 +577,8 @@ public interface SearchRequestOrBuilder
    *
    *
    * 
-   * Boost specification to boost certain products. See more details at this
-   * [user guide](https://cloud.google.com/retail/docs/boosting).
+   * Boost specification to boost certain products. For more information, see
+   * [Boost results](https://cloud.google.com/retail/docs/boosting).
    *
    * Notice that if both
    * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids]
@@ -598,8 +598,8 @@ public interface SearchRequestOrBuilder
    *
    * 
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -613,8 +613,8 @@ public interface SearchRequestOrBuilder * *
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -628,8 +628,8 @@ public interface SearchRequestOrBuilder * *
    * The query expansion specification that specifies the conditions under which
-   * query expansion will occur. See more details at this [user
-   * guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
+   * query expansion occurs. For more information, see [Query
+   * expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    * 
* * .google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 14; @@ -1171,9 +1171,9 @@ public interface SearchRequestOrBuilder * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -1197,9 +1197,9 @@ public interface SearchRequestOrBuilder * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -1226,9 +1226,9 @@ public interface SearchRequestOrBuilder * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. *
* * map<string, string> labels = 34; @@ -1252,9 +1252,9 @@ public interface SearchRequestOrBuilder * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. * * * map<string, string> labels = 34; @@ -1282,9 +1282,9 @@ java.lang.String getLabelsOrDefault( * key with multiple resources. * * Keys must start with a lowercase letter or international character. * - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * in the Resource Manager documentation. * * * map<string, string> labels = 34; diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfig.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfig.java index 3be3eead3858..4b4a86add80d 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfig.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfig.java @@ -1690,6 +1690,25 @@ public com.google.protobuf.ByteString getEnableCategoryFilterLevelBytes() { } } + public static final int IGNORE_RECS_DENYLIST_FIELD_NUMBER = 24; + private boolean ignoreRecsDenylist_ = false; + /** + * + * + *
+   * When the flag is enabled, the products in the denylist will not be filtered
+   * out in the recommendation filtering results.
+   * 
+ * + * bool ignore_recs_denylist = 24; + * + * @return The ignoreRecsDenylist. + */ + @java.lang.Override + public boolean getIgnoreRecsDenylist() { + return ignoreRecsDenylist_; + } + public static final int PERSONALIZATION_SPEC_FIELD_NUMBER = 21; private com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalizationSpec_; /** @@ -1983,6 +2002,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(21, getPersonalizationSpec()); } + if (ignoreRecsDenylist_ != false) { + output.writeBool(24, ignoreRecsDenylist_); + } getUnknownFields().writeTo(output); } @@ -2108,6 +2130,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getPersonalizationSpec()); } + if (ignoreRecsDenylist_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(24, ignoreRecsDenylist_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2147,6 +2172,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDiversityLevel().equals(other.getDiversityLevel())) return false; if (diversityType_ != other.diversityType_) return false; if (!getEnableCategoryFilterLevel().equals(other.getEnableCategoryFilterLevel())) return false; + if (getIgnoreRecsDenylist() != other.getIgnoreRecsDenylist()) return false; if (hasPersonalizationSpec() != other.hasPersonalizationSpec()) return false; if (hasPersonalizationSpec()) { if (!getPersonalizationSpec().equals(other.getPersonalizationSpec())) return false; @@ -2217,6 +2243,8 @@ public int hashCode() { hash = (53 * hash) + diversityType_; hash = (37 * hash) + ENABLE_CATEGORY_FILTER_LEVEL_FIELD_NUMBER; hash = (53 * hash) + getEnableCategoryFilterLevel().hashCode(); + hash = (37 * hash) + IGNORE_RECS_DENYLIST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreRecsDenylist()); if (hasPersonalizationSpec()) { hash = (37 * hash) + PERSONALIZATION_SPEC_FIELD_NUMBER; hash = (53 * hash) + getPersonalizationSpec().hashCode(); @@ -2396,13 +2424,14 @@ public Builder clear() { diversityLevel_ = ""; diversityType_ = 0; enableCategoryFilterLevel_ = ""; + ignoreRecsDenylist_ = false; personalizationSpec_ = null; if (personalizationSpecBuilder_ != null) { personalizationSpecBuilder_.dispose(); personalizationSpecBuilder_ = null; } solutionTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); return this; } @@ -2439,9 +2468,9 @@ public com.google.cloud.retail.v2beta.ServingConfig buildPartial() { } private void buildPartialRepeatedFields(com.google.cloud.retail.v2beta.ServingConfig result) { - if (((bitField0_ & 0x00040000) != 0)) { + if (((bitField0_ & 0x00080000) != 0)) { solutionTypes_ = java.util.Collections.unmodifiableList(solutionTypes_); - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); } result.solutionTypes_ = solutionTypes_; } @@ -2512,6 +2541,9 @@ private void buildPartial0(com.google.cloud.retail.v2beta.ServingConfig result) result.enableCategoryFilterLevel_ = enableCategoryFilterLevel_; } if (((from_bitField0_ & 0x00020000) != 0)) { + result.ignoreRecsDenylist_ = ignoreRecsDenylist_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { result.personalizationSpec_ = personalizationSpecBuilder_ == null ? personalizationSpec_ @@ -2692,13 +2724,16 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ServingConfig other) { bitField0_ |= 0x00010000; onChanged(); } + if (other.getIgnoreRecsDenylist() != false) { + setIgnoreRecsDenylist(other.getIgnoreRecsDenylist()); + } if (other.hasPersonalizationSpec()) { mergePersonalizationSpec(other.getPersonalizationSpec()); } if (!other.solutionTypes_.isEmpty()) { if (solutionTypes_.isEmpty()) { solutionTypes_ = other.solutionTypes_; - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); } else { ensureSolutionTypesIsMutable(); solutionTypes_.addAll(other.solutionTypes_); @@ -2866,9 +2901,15 @@ public Builder mergeFrom( { input.readMessage( getPersonalizationSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; break; } // case 170 + case 192: + { + ignoreRecsDenylist_ = input.readBool(); + bitField0_ |= 0x00020000; + break; + } // case 192 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6518,6 +6559,62 @@ public Builder setEnableCategoryFilterLevelBytes(com.google.protobuf.ByteString return this; } + private boolean ignoreRecsDenylist_; + /** + * + * + *
+     * When the flag is enabled, the products in the denylist will not be filtered
+     * out in the recommendation filtering results.
+     * 
+ * + * bool ignore_recs_denylist = 24; + * + * @return The ignoreRecsDenylist. + */ + @java.lang.Override + public boolean getIgnoreRecsDenylist() { + return ignoreRecsDenylist_; + } + /** + * + * + *
+     * When the flag is enabled, the products in the denylist will not be filtered
+     * out in the recommendation filtering results.
+     * 
+ * + * bool ignore_recs_denylist = 24; + * + * @param value The ignoreRecsDenylist to set. + * @return This builder for chaining. + */ + public Builder setIgnoreRecsDenylist(boolean value) { + + ignoreRecsDenylist_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * When the flag is enabled, the products in the denylist will not be filtered
+     * out in the recommendation filtering results.
+     * 
+ * + * bool ignore_recs_denylist = 24; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreRecsDenylist() { + bitField0_ = (bitField0_ & ~0x00020000); + ignoreRecsDenylist_ = false; + onChanged(); + return this; + } + private com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalizationSpec_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec, @@ -6552,7 +6649,7 @@ public Builder setEnableCategoryFilterLevelBytes(com.google.protobuf.ByteString * @return Whether the personalizationSpec field is set. */ public boolean hasPersonalizationSpec() { - return ((bitField0_ & 0x00020000) != 0); + return ((bitField0_ & 0x00040000) != 0); } /** * @@ -6626,7 +6723,7 @@ public Builder setPersonalizationSpec( } else { personalizationSpecBuilder_.setMessage(value); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -6662,7 +6759,7 @@ public Builder setPersonalizationSpec( } else { personalizationSpecBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -6694,7 +6791,7 @@ public Builder setPersonalizationSpec( public Builder mergePersonalizationSpec( com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec value) { if (personalizationSpecBuilder_ == null) { - if (((bitField0_ & 0x00020000) != 0) + if (((bitField0_ & 0x00040000) != 0) && personalizationSpec_ != null && personalizationSpec_ != com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec @@ -6707,7 +6804,7 @@ public Builder mergePersonalizationSpec( personalizationSpecBuilder_.mergeFrom(value); } if (personalizationSpec_ != null) { - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); } return this; @@ -6738,7 +6835,7 @@ public Builder mergePersonalizationSpec( *
*/ public Builder clearPersonalizationSpec() { - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00040000); personalizationSpec_ = null; if (personalizationSpecBuilder_ != null) { personalizationSpecBuilder_.dispose(); @@ -6774,7 +6871,7 @@ public Builder clearPersonalizationSpec() { */ public com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Builder getPersonalizationSpecBuilder() { - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return getPersonalizationSpecFieldBuilder().getBuilder(); } @@ -6858,9 +6955,9 @@ public Builder clearPersonalizationSpec() { private java.util.List solutionTypes_ = java.util.Collections.emptyList(); private void ensureSolutionTypesIsMutable() { - if (!((bitField0_ & 0x00040000) != 0)) { + if (!((bitField0_ & 0x00080000) != 0)) { solutionTypes_ = new java.util.ArrayList(solutionTypes_); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; } } /** @@ -7006,7 +7103,7 @@ public Builder addAllSolutionTypes( */ public Builder clearSolutionTypes() { solutionTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); onChanged(); return this; } diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigOrBuilder.java index 17bf411bf499..97ac4206bfe2 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigOrBuilder.java @@ -1176,6 +1176,20 @@ public interface ServingConfigOrBuilder */ com.google.protobuf.ByteString getEnableCategoryFilterLevelBytes(); + /** + * + * + *
+   * When the flag is enabled, the products in the denylist will not be filtered
+   * out in the recommendation filtering results.
+   * 
+ * + * bool ignore_recs_denylist = 24; + * + * @return The ignoreRecsDenylist. + */ + boolean getIgnoreRecsDenylist(); + /** * * diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigProto.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigProto.java index 9a5b3282946b..a1e77eeb3c23 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigProto.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigProto.java @@ -46,7 +46,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oogle/api/field_behavior.proto\032\031google/a" + "pi/resource.proto\032\'google/cloud/retail/v" + "2beta/common.proto\032/google/cloud/retail/" - + "v2beta/search_service.proto\"\210\010\n\rServingC" + + "v2beta/search_service.proto\"\246\010\n\rServingC" + "onfig\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\031\n\014display_name" + "\030\002 \001(\tB\003\340A\002\022\020\n\010model_id\030\003 \001(\t\022\035\n\025price_r" + "eranking_level\030\004 \001(\t\022\031\n\021facet_control_id" @@ -62,23 +62,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ersity_level\030\010 \001(\t\022O\n\016diversity_type\030\024 \001" + "(\01627.google.cloud.retail.v2beta.ServingC" + "onfig.DiversityType\022$\n\034enable_category_f" - + "ilter_level\030\020 \001(\t\022[\n\024personalization_spe" - + "c\030\025 \001(\0132=.google.cloud.retail.v2beta.Sea" - + "rchRequest.PersonalizationSpec\022H\n\016soluti" - + "on_types\030\023 \003(\0162(.google.cloud.retail.v2b" - + "eta.SolutionTypeB\006\340A\002\340A\005\"d\n\rDiversityTyp" - + "e\022\036\n\032DIVERSITY_TYPE_UNSPECIFIED\020\000\022\030\n\024RUL" - + "E_BASED_DIVERSITY\020\002\022\031\n\025DATA_DRIVEN_DIVER" - + "SITY\020\003:\205\001\352A\201\001\n#retail.googleapis.com/Ser" - + "vingConfig\022Zprojects/{project}/locations" - + "/{location}/catalogs/{catalog}/servingCo" - + "nfigs/{serving_config}B\321\001\n\036com.google.cl" - + "oud.retail.v2betaB\022ServingConfigProtoP\001Z" - + "6cloud.google.com/go/retail/apiv2beta/re" - + "tailpb;retailpb\242\002\006RETAIL\252\002\032Google.Cloud." - + "Retail.V2Beta\312\002\032Google\\Cloud\\Retail\\V2be" - + "ta\352\002\035Google::Cloud::Retail::V2betab\006prot" - + "o3" + + "ilter_level\030\020 \001(\t\022\034\n\024ignore_recs_denylis" + + "t\030\030 \001(\010\022[\n\024personalization_spec\030\025 \001(\0132=." + + "google.cloud.retail.v2beta.SearchRequest" + + ".PersonalizationSpec\022H\n\016solution_types\030\023" + + " \003(\0162(.google.cloud.retail.v2beta.Soluti" + + "onTypeB\006\340A\002\340A\005\"d\n\rDiversityType\022\036\n\032DIVER" + + "SITY_TYPE_UNSPECIFIED\020\000\022\030\n\024RULE_BASED_DI" + + "VERSITY\020\002\022\031\n\025DATA_DRIVEN_DIVERSITY\020\003:\205\001\352" + + "A\201\001\n#retail.googleapis.com/ServingConfig" + + "\022Zprojects/{project}/locations/{location" + + "}/catalogs/{catalog}/servingConfigs/{ser" + + "ving_config}B\321\001\n\036com.google.cloud.retail" + + ".v2betaB\022ServingConfigProtoP\001Z6cloud.goo" + + "gle.com/go/retail/apiv2beta/retailpb;ret" + + "ailpb\242\002\006RETAIL\252\002\032Google.Cloud.Retail.V2B" + + "eta\312\002\032Google\\Cloud\\Retail\\V2beta\352\002\035Googl" + + "e::Cloud::Retail::V2betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -112,6 +112,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DiversityLevel", "DiversityType", "EnableCategoryFilterLevel", + "IgnoreRecsDenylist", "PersonalizationSpec", "SolutionTypes", }); diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEvent.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEvent.java index 8667b363f39f..54645f865ad2 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEvent.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEvent.java @@ -102,6 +102,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -136,6 +137,7 @@ public java.lang.String getEventType() { * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -1661,8 +1663,8 @@ public com.google.protobuf.ByteString getPageViewIdBytes() { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; @@ -1688,8 +1690,8 @@ public java.lang.String getEntity() { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; @@ -2701,6 +2703,7 @@ public Builder mergeFrom( * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -2734,6 +2737,7 @@ public java.lang.String getEventType() { * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -2767,6 +2771,7 @@ public com.google.protobuf.ByteString getEventTypeBytes() { * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -2799,6 +2804,7 @@ public Builder setEventType(java.lang.String value) { * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -2827,6 +2833,7 @@ public Builder clearEventType() { * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -6812,8 +6819,8 @@ public Builder setPageViewIdBytes(com.google.protobuf.ByteString value) { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; @@ -6838,8 +6845,8 @@ public java.lang.String getEntity() { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; @@ -6864,8 +6871,8 @@ public com.google.protobuf.ByteString getEntityBytes() { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; @@ -6889,8 +6896,8 @@ public Builder setEntity(java.lang.String value) { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; @@ -6910,8 +6917,8 @@ public Builder clearEntity() { * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventOrBuilder.java b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventOrBuilder.java index ccc51e444723..696ed6054fd1 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventOrBuilder.java +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventOrBuilder.java @@ -31,6 +31,7 @@ public interface UserEventOrBuilder * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -54,6 +55,7 @@ public interface UserEventOrBuilder * Required. User event type. Allowed values are: * * * `add-to-cart`: Products being added to cart. + * * `remove-from-cart`: Products being removed from cart. * * `category-page-view`: Special pages such as sale or promotion pages * viewed. * * `detail-page-view`: Products detail page viewed. @@ -1163,8 +1165,8 @@ com.google.cloud.retail.v2beta.CustomAttribute getAttributesOrDefault( * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; @@ -1179,8 +1181,8 @@ com.google.cloud.retail.v2beta.CustomAttribute getAttributesOrDefault( * The entity for customers that may run multiple different entities, domains, * sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, * `google.com`, `youtube.com`, etc. - * It is recommended to set this field to get better per-entity search, - * completion and prediction results. + * We recommend that you set this field to get better per-entity search, + * completion, and prediction results. * * * string entity = 23; diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog.proto b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog.proto index f5164dfc97bf..c8bca58e65a8 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog.proto +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog.proto @@ -20,6 +20,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/retail/v2beta/common.proto"; import "google/cloud/retail/v2beta/import_config.proto"; +import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Retail.V2Beta"; option go_package = "cloud.google.com/go/retail/apiv2beta/retailpb;retailpb"; @@ -87,6 +88,124 @@ message ProductLevelConfig { // Catalog level attribute config for an attribute. For example, if customers // want to enable/disable facet for a specific attribute. message CatalogAttribute { + // Possible options for the facet that corresponds to the current attribute + // config. + message FacetConfig { + // [Facet values][google.cloud.retail.v2beta.SearchResponse.Facet.values] to + // ignore on [facets][google.cloud.retail.v2beta.SearchResponse.Facet] + // during the specified time range for the given + // [SearchResponse.Facet.key][google.cloud.retail.v2beta.SearchResponse.Facet.key] + // attribute. + message IgnoredFacetValues { + // List of facet values to ignore for the following time range. The facet + // values are the same as the attribute values. There is a limit of 10 + // values per instance of IgnoredFacetValues. Each value can have at most + // 128 characters. + repeated string values = 1; + + // Time range for the current list of facet values to ignore. + // If multiple time ranges are specified for an facet value for the + // current attribute, consider all of them. If both are empty, ignore + // always. If start time and end time are set, then start time + // must be before end time. + // If start time is not empty and end time is empty, then will ignore + // these facet values after the start time. + google.protobuf.Timestamp start_time = 2; + + // If start time is empty and end time is not empty, then ignore these + // facet values before end time. + google.protobuf.Timestamp end_time = 3; + } + + // Replaces a set of textual facet values by the same (possibly different) + // merged facet value. Each facet value should appear at most once as a + // value per + // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]. This + // feature is available only for textual custom attributes. + message MergedFacetValue { + // All the facet values that are replaces by the same + // [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value] + // that follows. The maximum number of values per MergedFacetValue is 25. + // Each value can have up to 128 characters. + repeated string values = 1; + + // All the previous values are replaced by this merged facet value. + // This merged_value must be non-empty and can have up to 128 characters. + string merged_value = 2; + } + + // The current facet key (i.e. attribute config) maps into the + // [merged_facet_key][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet.merged_facet_key]. + // A facet key can have at most one child. The current facet key and the + // merged facet key need both to be textual custom attributes or both + // numerical custom attributes (same type). + message MergedFacet { + // The merged facet key should be a valid facet key that is different than + // the facet key of the current catalog attribute. We refer this is + // merged facet key as the child of the current catalog attribute. This + // merged facet key can't be a parent of another facet key (i.e. no + // directed path of length 2). This merged facet key needs to be either a + // textual custom attribute or a numerical custom attribute. + string merged_facet_key = 1; + } + + // Options to rerank based on facet values engaged by the user for the + // current key. That key needs to be a custom textual key and facetable. + // To use this control, you also need to pass all the facet keys engaged by + // the user in the request using the field [SearchRequest.FacetSpec]. In + // particular, if you don't pass the facet keys engaged that you want to + // rerank on, this control won't be effective. Moreover, to obtain better + // results, the facet values that you want to rerank on should be close to + // English (ideally made of words, underscores, and spaces). + message RerankConfig { + // If set to true, then we also rerank the dynamic facets based on the + // facet values engaged by the user for the current attribute key during + // serving. + bool rerank_facet = 1; + + // If empty, rerank on all facet values for the current key. Otherwise, + // will rerank on the facet values from this list only. + repeated string facet_values = 2; + } + + // If you don't set the facet + // [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals] + // in the request to a numerical attribute, then we use the computed + // intervals with rounded bounds obtained from all its product numerical + // attribute values. The computed intervals might not be ideal for some + // attributes. Therefore, we give you the option to overwrite them with the + // facet_intervals field. The maximum of facet intervals per + // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40. + // Each interval must have a lower bound or an upper bound. If both bounds + // are provided, then the lower bound must be smaller or equal than the + // upper bound. + repeated Interval facet_intervals = 1; + + // Each instance represents a list of attribute values to ignore as facet + // values for a specific time range. The maximum number of instances per + // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25. + repeated IgnoredFacetValues ignored_facet_values = 2; + + // Each instance replaces a list of facet values by a merged facet + // value. If a facet value is not in any list, then it will stay the same. + // To avoid conflicts, only paths of length 1 are accepted. In other words, + // if "dark_blue" merged into "BLUE", then the latter can't merge into + // "blues" because this would create a path of length 2. The maximum number + // of instances of MergedFacetValue per + // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100. + // This feature is available only for textual custom attributes. + repeated MergedFacetValue merged_facet_values = 3; + + // Use this field only if you want to merge a facet key into another facet + // key. + MergedFacet merged_facet = 4; + + // Set this field only if you want to rerank based on facet values engaged + // by the user for the current key. This option is only possible for custom + // facetable textual keys. + RerankConfig rerank_config = 5; + } + // The type of an attribute. enum AttributeType { // The type of the attribute is unknown. @@ -210,7 +329,9 @@ message CatalogAttribute { // are indexed so that it can be filtered, faceted, or boosted in // [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. // - // Must be specified, otherwise throws INVALID_FORMAT error. + // Must be specified when + // [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + // is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. IndexableOption indexable_option = 5; // If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic @@ -232,7 +353,9 @@ message CatalogAttribute { // [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as // there are no text values associated to numerical attributes. // - // Must be specified, otherwise throws INVALID_FORMAT error. + // Must be specified, when + // [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + // is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. SearchableOption searchable_option = 7; // When @@ -254,6 +377,9 @@ message CatalogAttribute { // results. If unset, the server behavior defaults to // [RETRIEVABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED]. RetrievableOption retrievable_option = 12; + + // Contains facet options. + FacetConfig facet_config = 13; } // Catalog level attribute config. @@ -343,8 +469,8 @@ message CompletionConfig { // Output only. Name of the LRO corresponding to the latest suggestion terms // list import. // - // Can use [GetOperation][google.longrunning.Operations.GetOperation] API to - // retrieve the latest state of the Long Running Operation. + // Can use [GetOperation][google.longrunning.Operations.GetOperation] API + // method to retrieve the latest state of the Long Running Operation. string last_suggestions_import_operation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -374,10 +500,10 @@ message CompletionConfig { } // Represents a link between a Merchant Center account and a branch. -// Once a link is established, products from the linked merchant center account -// will be streamed to the linked branch. +// After a link is established, products from the linked Merchant Center account +// are streamed to the linked branch. message MerchantCenterLink { - // Required. The linked [Merchant center account + // Required. The linked [Merchant Center account // ID](https://developers.google.com/shopping-content/guides/accountstatuses). // The account must be a standalone account or a sub-account of a MCA. int64 merchant_center_account_id = 1 [(google.api.field_behavior) = REQUIRED]; @@ -387,7 +513,7 @@ message MerchantCenterLink { // empty value will use the currently configured default branch. However, // changing the default branch later on won't change the linked branch here. // - // A single branch ID can only have one linked merchant center account ID. + // A single branch ID can only have one linked Merchant Center account ID. string branch_id = 2; // String representing the destination to import for, all if left empty. @@ -469,8 +595,8 @@ message Catalog { [(google.api.field_behavior) = REQUIRED]; // The Merchant Center linking configuration. - // Once a link is added, the data stream from Merchant Center to Cloud Retail + // After a link is added, the data stream from Merchant Center to Cloud Retail // will be enabled automatically. The requester must have access to the - // merchant center account in order to make changes to this field. + // Merchant Center account in order to make changes to this field. MerchantCenterLinkingConfig merchant_center_linking_config = 6; } diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/common.proto b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/common.proto index 09912ca5ac44..b0a522235d8c 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/common.proto +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/common.proto @@ -124,6 +124,12 @@ message Condition { // Range of time(s) specifying when Condition is active. // Condition true if any time range matches. repeated TimeRange active_time_range = 3; + + // Used to support browse uses cases. + // A list (up to 10 entries) of categories or departments. + // The format should be the same as + // [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; + repeated string page_categories = 4; } // A rule is a condition-action pair @@ -173,17 +179,19 @@ message Rule { } // * Rule Condition: - // - No - // [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms] - // provided is a global match. - // - 1 or more - // [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms] - // provided are combined with OR operator. + // - No + // [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms] + // provided is a global match. + // - 1 or more + // [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms] + // provided are combined with OR operator. + // // * Action Input: The request query and filter that are applied to the // retrieved products, in addition to any filters already provided with the // SearchRequest. The AND operator is used to combine the query's existing // filters with the filter rule(s). NOTE: May result in 0 results when // filters conflict. + // // * Action Result: Filters the returned objects to be ONLY those that passed // the filter. message FilterAction { @@ -193,9 +201,8 @@ message Rule { // set. // * Filter syntax is identical to // [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. - // See more - // details at the Retail Search - // [user guide](/retail/search/docs/filter-and-order#filter). + // For more + // information, see [Filter](/retail/docs/filter-and-order#filter). // * To filter products with product ID "product_1" or "product_2", and // color // "Red" or "Blue":
@@ -208,7 +215,7 @@ message Rule { // Redirects a shopper to a specific page. // // * Rule Condition: - // - Must specify + // Must specify // [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]. // * Action Input: Request Query // * Action Result: Redirects shopper to provided uri. @@ -290,6 +297,78 @@ message Rule { repeated string ignore_terms = 1; } + // Force returns an attribute/facet in the request around a certain position + // or above. + // + // * Rule Condition: + // Must specify non-empty + // [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms] + // (for search only) or + // [Condition.page_categories][google.cloud.retail.v2beta.Condition.page_categories] + // (for browse only), but can't specify both. + // + // * Action Inputs: attribute name, position + // + // * Action Result: Will force return a facet key around a certain position + // or above if the condition is satisfied. + // + // Example: Suppose the query is "shoes", the + // [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms] + // is "shoes", the + // [ForceReturnFacetAction.FacetPositionAdjustment.attribute_name][google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment.attribute_name] + // is "size" and the + // [ForceReturnFacetAction.FacetPositionAdjustment.position][google.cloud.retail.v2beta.Rule.ForceReturnFacetAction.FacetPositionAdjustment.position] + // is 8. + // + // Two cases: a) The facet key "size" is not already in the top 8 slots, then + // the facet "size" will appear at a position close to 8. b) The facet key + // "size" in among the top 8 positions in the request, then it will stay at + // its current rank. + message ForceReturnFacetAction { + // Each facet position adjustment consists of a single attribute name (i.e. + // facet key) along with a specified position. + message FacetPositionAdjustment { + // The attribute name to force return as a facet. Each attribute name + // should be a valid attribute name, be non-empty and contain at most 80 + // characters long. + string attribute_name = 1; + + // This is the position in the request as explained above. It should be + // strictly positive be at most 100. + int32 position = 2; + } + + // Each instance corresponds to a force return attribute for the given + // condition. There can't be more 3 instances here. + repeated FacetPositionAdjustment facet_position_adjustments = 1; + } + + // Removes an attribute/facet in the request if is present. + // + // * Rule Condition: + // Must specify non-empty + // [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms] + // (for search only) or + // [Condition.page_categories][google.cloud.retail.v2beta.Condition.page_categories] + // (for browse only), but can't specify both. + // + // * Action Input: attribute name + // + // * Action Result: Will remove the attribute (as a facet) from the request + // if it is present. + // + // Example: Suppose the query is "shoes", the + // [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms] + // is "shoes" and the attribute name "size", then facet key "size" will be + // removed from the request (if it is present). + message RemoveFacetAction { + // The attribute names (i.e. facet keys) to remove from the dynamic facets + // (if present in the request). There can't be more 3 attribute names. + // Each attribute name should be a valid attribute name, be non-empty and + // contain at most 80 characters. + repeated string attribute_names = 1; + } + // An action must be provided. oneof action { // A boost action. @@ -316,6 +395,12 @@ message Rule { // Treats a set of terms as synonyms of one another. TwowaySynonymsAction twoway_synonyms_action = 11; + + // Force returns an attribute as a facet in the request. + ForceReturnFacetAction force_return_facet_action = 12; + + // Remove an attribute as a facet in the request (if present). + RemoveFacetAction remove_facet_action = 13; } // Required. The condition that triggers the rule. diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/completion_service.proto b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/completion_service.proto index 3e05448b0d12..ebf7fdb25ed3 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/completion_service.proto +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/completion_service.proto @@ -151,10 +151,15 @@ message CompleteQueryRequest { // capped by 20. int32 max_suggestions = 5; - // The entity for customers that may run multiple different entities, domains, - // sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, + // If true, attribute suggestions are enabled and provided in response. + // + // This field is only available for "cloud-retail" dataset. + bool enable_attribute_suggestions = 9; + + // The entity for customers who run multiple entities, domains, sites, or + // regions, for example, `Google US`, `Google Ads`, `Waymo`, // `google.com`, `youtube.com`, etc. - // If this is set, it should be exactly matched with + // If this is set, it must be an exact match with // [UserEvent.entity][google.cloud.retail.v2beta.UserEvent.entity] to get // per-entity autocomplete results. string entity = 10; @@ -179,8 +184,10 @@ message CompleteQueryResponse { map attributes = 2; } - // Recent search of this user. + // Deprecated: Recent search of this user. message RecentSearchResult { + option deprecated = true; + // The recent search query. string recent_search = 1; } @@ -195,9 +202,9 @@ message CompleteQueryResponse { // attribution of complete model performance. string attribution_token = 2; - // Matched recent searches of this user. The maximum number of recent searches - // is 10. This field is a restricted feature. Contact Retail Search support - // team if you are interested in enabling it. + // Deprecated. Matched recent searches of this user. The maximum number of + // recent searches is 10. This field is a restricted feature. If you want to + // enable it, contact Retail Search support. // // This feature is only available when // [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id] @@ -216,5 +223,5 @@ message CompleteQueryResponse { // // Recent searches are deduplicated. More recent searches will be reserved // when duplication happens. - repeated RecentSearchResult recent_search_results = 3; + repeated RecentSearchResult recent_search_results = 3 [deprecated = true]; } diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/import_config.proto b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/import_config.proto index 591039611ee6..f5e67023bcb8 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/import_config.proto +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/import_config.proto @@ -196,7 +196,8 @@ message ImportProductsRequest { ImportErrorsConfig errors_config = 3; // Indicates which fields in the provided imported `products` to update. If - // not set, all fields are updated. + // not set, all fields are updated. If provided, only the existing product + // fields are updated. Missing products will not be created. google.protobuf.FieldMask update_mask = 4; // The mode of reconciliation between existing products and the products to be @@ -212,9 +213,14 @@ message ImportProductsRequest { // Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has // to be within the same project as // [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent]. - // Make sure that `service-@gcp-sa-retail.iam.gserviceaccount.com` has the - // `pubsub.topics.publish` IAM permission on the topic. + // Make sure that both + // `cloud-retail-customer-data-access@system.gserviceaccount.com` and + // `service-@gcp-sa-retail.iam.gserviceaccount.com` + // have the `pubsub.topics.publish` IAM permission on the topic. + // + // Only supported when + // [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode] + // is set to `FULL`. string notification_pubsub_topic = 7; } diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/model.proto b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/model.proto index 3334fe81b611..e9916f6696b3 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/model.proto +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/model.proto @@ -50,6 +50,25 @@ message Model { [(google.api.field_behavior) = OPTIONAL]; } + // Additional configs for the frequently-bought-together model type. + message FrequentlyBoughtTogetherFeaturesConfig { + // Optional. Specifies the context of the model when it is used in predict + // requests. Can only be set for the `frequently-bought-together` type. If + // it isn't specified, it defaults to + // [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2beta.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS]. + ContextProductsType context_products_type = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Additional model features config. + message ModelFeaturesConfig { + oneof type_dedicated_config { + // Additional configs for frequently-bought-together models. + FrequentlyBoughtTogetherFeaturesConfig frequently_bought_together_config = + 1; + } + } + // The serving state of the model. enum ServingState { // Unspecified serving state. @@ -118,6 +137,22 @@ message Model { DATA_ERROR = 2; } + // Use single or multiple context products for recommendations. + enum ContextProductsType { + // Unspecified default value, should never be explicitly set. + // Defaults to + // [MULTIPLE_CONTEXT_PRODUCTS][google.cloud.retail.v2beta.Model.ContextProductsType.MULTIPLE_CONTEXT_PRODUCTS]. + CONTEXT_PRODUCTS_TYPE_UNSPECIFIED = 0; + + // Use only a single product as context for the recommendation. Typically + // used on pages like add-to-cart or product details. + SINGLE_CONTEXT_PRODUCT = 1; + + // Use one or multiple products as context for the recommendation. Typically + // used on shopping cart pages. + MULTIPLE_CONTEXT_PRODUCTS = 2; + } + // Required. The fully qualified resource name of the model. // // Format: @@ -236,4 +271,8 @@ message Model { // PageOptimizationConfig. repeated ServingConfigList serving_config_lists = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Additional model features config. + ModelFeaturesConfig model_features_config = 22 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product.proto b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product.proto index 0d75f6e88054..31e076625f5e 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product.proto +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product.proto @@ -103,24 +103,22 @@ message Product { } oneof expiration { - // The timestamp when this product becomes unavailable for - // [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. - // Note that this is only applicable to - // [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and - // [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION], - // and ignored for - // [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In - // general, we suggest the users to delete the stale products explicitly, - // instead of using this field to determine staleness. + // Note that this field is applied in the following ways: // - // If it is set, the [Product][google.cloud.retail.v2beta.Product] is not - // available for - // [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search] - // after [expire_time][google.cloud.retail.v2beta.Product.expire_time]. - // However, the product can still be retrieved by - // [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] - // and - // [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + // * If the [Product][google.cloud.retail.v2beta.Product] is already expired + // when it is uploaded, this product + // is not indexed for search. + // + // * If the [Product][google.cloud.retail.v2beta.Product] is not expired + // when it is uploaded, only the + // [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]'s and + // [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION]'s + // expireTime is respected, and + // [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]'s + // expireTime is not used. + // + // In general, we suggest the users to delete the stale + // products explicitly, instead of using this field to determine staleness. // // [expire_time][google.cloud.retail.v2beta.Product.expire_time] must be // later than @@ -263,9 +261,10 @@ message Product { // error is returned. // // At most 250 values are allowed per - // [Product][google.cloud.retail.v2beta.Product]. Empty values are not - // allowed. Each value must be a UTF-8 encoded string with a length limit of - // 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. + // [Product][google.cloud.retail.v2beta.Product] unless overridden through the + // Google Cloud console. Empty values are not allowed. Each value must be a + // UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an + // INVALID_ARGUMENT error is returned. // // Corresponding properties: Google Merchant Center property // [google_product_category][mc_google_product_category]. Schema.org property @@ -287,9 +286,10 @@ message Product { // The brands of the product. // - // A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded - // string with a length limit of 1,000 characters. Otherwise, an - // INVALID_ARGUMENT error is returned. + // A maximum of 30 brands are allowed unless overridden through the Google + // Cloud console. Each + // brand must be a UTF-8 encoded string with a length limit of 1,000 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // Corresponding properties: Google Merchant Center property // [brand](https://support.google.com/merchants/answer/6324351). Schema.org diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product_service.proto b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product_service.proto index a569ef378b5e..77b59b5d48f3 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product_service.proto +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product_service.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/retail/v2beta/common.proto"; import "google/cloud/retail/v2beta/import_config.proto"; import "google/cloud/retail/v2beta/product.proto"; +import "google/cloud/retail/v2beta/purge_config.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -86,6 +87,35 @@ service ProductService { option (google.api.method_signature) = "name"; } + // Permanently deletes all selected + // [Product][google.cloud.retail.v2beta.Product]s under a branch. + // + // This process is asynchronous. If the request is valid, the removal will be + // enqueued and processed offline. Depending on the number of + // [Product][google.cloud.retail.v2beta.Product]s, this operation could take + // hours to complete. Before the operation completes, some + // [Product][google.cloud.retail.v2beta.Product]s may still be returned by + // [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + // + // Depending on the number of [Product][google.cloud.retail.v2beta.Product]s, + // this operation could take hours to complete. To get a sample of + // [Product][google.cloud.retail.v2beta.Product]s that would be deleted, set + // [PurgeProductsRequest.force][google.cloud.retail.v2beta.PurgeProductsRequest.force] + // to false. + rpc PurgeProducts(PurgeProductsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta/{parent=projects/*/locations/*/catalogs/*/branches/*}/products:purge" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.retail.v2beta.PurgeProductsResponse" + metadata_type: "google.cloud.retail.v2beta.PurgeProductsMetadata" + }; + } + // Bulk import of multiple [Product][google.cloud.retail.v2beta.Product]s. // // Request processing may be synchronous. @@ -166,10 +196,11 @@ service ProductService { }; } - // It is recommended to use the + // We recommend that you use the // [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] - // method instead of - // [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]. + // method instead of the + // [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces] + // method. // [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] // achieves the same results but provides more fine-grained control over // ingesting local inventory data. @@ -208,10 +239,11 @@ service ProductService { }; } - // It is recommended to use the + // We recommend that you use the // [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] - // method instead of - // [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + // method instead of the + // [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces] + // method. // [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] // achieves the same results but provides more fine-grained control over // ingesting local inventory data. diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/promotion.proto b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/promotion.proto index 2950797704e5..ebd30a2845bf 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/promotion.proto +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/promotion.proto @@ -34,7 +34,7 @@ message Promotion { // id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is // returned. // - // Google Merchant Center property - // [promotion](https://support.google.com/merchants/answer/7050148). + // Corresponds to Google Merchant Center property + // [promotion_id](https://support.google.com/merchants/answer/7050148). string promotion_id = 1; } diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/purge_config.proto b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/purge_config.proto index 5c32819541da..037e3aed5894 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/purge_config.proto +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/purge_config.proto @@ -18,6 +18,7 @@ package google.cloud.retail.v2beta; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Retail.V2Beta"; option go_package = "cloud.google.com/go/retail/apiv2beta/retailpb;retailpb"; @@ -32,6 +33,96 @@ option ruby_package = "Google::Cloud::Retail::V2beta"; // This will be returned by the google.longrunning.Operation.metadata field. message PurgeMetadata {} +// Metadata related to the progress of the PurgeProducts operation. +// This will be returned by the google.longrunning.Operation.metadata field. +message PurgeProductsMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; + + // Count of entries that were deleted successfully. + int64 success_count = 3; + + // Count of entries that encountered errors while processing. + int64 failure_count = 4; +} + +// Request message for PurgeProducts method. +message PurgeProductsRequest { + // Required. The resource name of the branch under which the products are + // created. The format is + // `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "retail.googleapis.com/Branch" } + ]; + + // Required. The filter string to specify the products to be deleted with a + // length limit of 5,000 characters. + // + // Empty string filter is not allowed. "*" implies delete all items in a + // branch. + // + // The eligible fields for filtering are: + // + // * `availability`: Double quoted + // [Product.availability][google.cloud.retail.v2beta.Product.availability] + // string. + // * `create_time` : in ISO 8601 "zulu" format. + // + // Supported syntax: + // + // * Comparators (">", "<", ">=", "<=", "="). + // Examples: + // * create_time <= "2015-02-13T17:05:46Z" + // * availability = "IN_STOCK" + // + // * Conjunctions ("AND") + // Examples: + // * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER" + // + // * Disjunctions ("OR") + // Examples: + // * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK" + // + // * Can support nested queries. + // Examples: + // * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER") + // OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK") + // + // * Filter Limits: + // * Filter should not contain more than 6 conditions. + // * Max nesting depth should not exceed 2 levels. + // + // Examples queries: + // * Delete back order products created before a timestamp. + // create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER" + string filter = 2 [(google.api.field_behavior) = REQUIRED]; + + // Actually perform the purge. + // If `force` is set to false, the method will return the expected purge count + // without deleting any products. + bool force = 3; +} + +// Response of the PurgeProductsRequest. If the long running operation is +// successfully done, then this message is returned by the +// google.longrunning.Operations.response field. +message PurgeProductsResponse { + // The total count of products purged as a result of the operation. + int64 purge_count = 1; + + // A sample of the product names that will be deleted. + // Only populated if `force` is set to false. A max of 100 names will be + // returned and the names are chosen at random. + repeated string purge_sample = 2 [ + (google.api.resource_reference) = { type: "retail.googleapis.com/Product" } + ]; +} + // Request message for PurgeUserEvents method. message PurgeUserEventsRequest { // Required. The resource name of the catalog under which the events are diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/search_service.proto b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/search_service.proto index bd5d66737287..5768df56df22 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/search_service.proto +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/search_service.proto @@ -119,13 +119,13 @@ message SearchRequest { // values. Maximum number of intervals is 40. // // For all numerical facet keys that appear in the list of products from - // the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + // the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are // computed from their distribution weekly. If the model assigns a high // score to a numerical facet key and its intervals are not specified in - // the search request, these percentiles will become the bounds - // for its intervals and will be returned in the response. If the + // the search request, these percentiles become the bounds + // for its intervals and are returned in the response. If the // facet key intervals are specified in the request, then the specified - // intervals will be returned instead. + // intervals are returned instead. repeated Interval intervals = 2; // Only get facet for the given restricted values. For example, when using @@ -158,14 +158,14 @@ message SearchRequest { // Only get facet values that start with the given string prefix. For // example, suppose "categories" has three values "Women > Shoe", // "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - // "categories" facet will give only "Women > Shoe" and "Women > Dress". + // "categories" facet gives only "Women > Shoe" and "Women > Dress". // Only supported on textual fields. Maximum is 10. repeated string prefixes = 8; // Only get facet values that contains the given strings. For example, // suppose "categories" has three values "Women > Shoe", // "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - // "categories" facet will give only "Women > Shoe" and "Men > Shoe". + // "categories" facet gives only "Women > Shoe" and "Men > Shoe". // Only supported on textual fields. Maximum is 10. repeated string contains = 9; @@ -198,7 +198,7 @@ message SearchRequest { string order_by = 4; // The query that is used to compute facet for the given facet key. - // When provided, it will override the default behavior of facet + // When provided, it overrides the default behavior of facet // computation. The query syntax is the same as a filter expression. See // [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter] // for detail syntax and limitations. Notice that there is no limitation @@ -208,9 +208,9 @@ message SearchRequest { // // In the response, // [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value] - // will be always "1" and + // is always "1" and // [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count] - // will be the number of results that match the query. + // is the number of results that match the query. // // For example, you can set a customized facet for "shipToStore", // where @@ -218,7 +218,7 @@ message SearchRequest { // is "customizedShipToStore", and // [FacetKey.query][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.query] // is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")". - // Then the facet will count the products that are both in stock and ship + // Then the facet counts the products that are both in stock and ship // to store "123". string query = 5; @@ -269,15 +269,15 @@ message SearchRequest { // Enables dynamic position for this facet. If set to true, the position of // this facet among all facets in the response is determined by Google - // Retail Search. It will be ordered together with dynamic facets if dynamic + // Retail Search. It is ordered together with dynamic facets if dynamic // facets is enabled. If set to false, the position of this facet in the - // response will be the same as in the request, and it will be ranked before + // response is the same as in the request, and it is ranked before // the facets with dynamic position enable and all dynamic facets. // // For example, you may always want to have rating facet returned in // the response, but it's not necessarily to always display the rating facet // at the top. In that case, you can set enable_dynamic_position to true so - // that the position of rating facet in response will be determined by + // that the position of rating facet in response is determined by // Google Retail Search. // // Another example, assuming you have the following facets in the request: @@ -288,13 +288,13 @@ message SearchRequest { // // * "brands", enable_dynamic_position = false // - // And also you have a dynamic facets enable, which will generate a facet - // 'gender'. Then the final order of the facets in the response can be + // And also you have a dynamic facets enable, which generates a facet + // "gender". Then, the final order of the facets in the response can be // ("price", "brands", "rating", "gender") or ("price", "brands", "gender", // "rating") depends on how Google Retail Search orders "gender" and - // "rating" facets. However, notice that "price" and "brands" will always be - // ranked at 1st and 2nd position since their enable_dynamic_position are - // false. + // "rating" facets. However, notice that "price" and "brands" are always + // ranked at first and second position because their enable_dynamic_position + // values are false. bool enable_dynamic_position = 4; } @@ -492,7 +492,7 @@ message SearchRequest { // or the name of the legacy placement resource, such as // `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. // This field is used to identify the serving config name and the set - // of models that will be used to make the search. + // of models that are used to make the search. string placement = 1 [(google.api.field_behavior) = REQUIRED]; // The branch resource name, such as @@ -557,8 +557,8 @@ message SearchRequest { // The filter syntax consists of an expression language for constructing a // predicate from one or more fields of the products being filtered. Filter - // expression is case-sensitive. See more details at this [user - // guide](https://cloud.google.com/retail/docs/filter-and-order#filter). + // expression is case-sensitive. For more information, see + // [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter). // // If this field is unrecognizable, an INVALID_ARGUMENT is returned. string filter = 10; @@ -567,21 +567,21 @@ message SearchRequest { // checking any filters on the search page. // // The filter applied to every search request when quality improvement such as - // query expansion is needed. For example, if a query does not have enough - // results, an expanded query with - // [SearchRequest.canonical_filter][google.cloud.retail.v2beta.SearchRequest.canonical_filter] - // will be returned as a supplement of the original query. This field is - // strongly recommended to achieve high search quality. + // query expansion is needed. In the case a query does not have a sufficient + // amount of results this filter will be used to determine whether or not to + // enable the query expansion flow. The original filter will still be used for + // the query expanded search. + // This field is strongly recommended to achieve high search quality. // - // See [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter] - // for more details about filter syntax. + // For more information about filter syntax, see + // [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter]. string canonical_filter = 28; // The order in which products are returned. Products can be ordered by // a field in an [Product][google.cloud.retail.v2beta.Product] object. Leave - // it unset if ordered by relevance. OrderBy expression is case-sensitive. See - // more details at this [user - // guide](https://cloud.google.com/retail/docs/filter-and-order#order). + // it unset if ordered by relevance. OrderBy expression is case-sensitive. For + // more information, see + // [Order](https://cloud.google.com/retail/docs/filter-and-order#order). // // If this field is unrecognizable, an INVALID_ARGUMENT is returned. string order_by = 11; @@ -599,8 +599,8 @@ message SearchRequest { // textual facets can be dynamically generated. DynamicFacetSpec dynamic_facet_spec = 21 [deprecated = true]; - // Boost specification to boost certain products. See more details at this - // [user guide](https://cloud.google.com/retail/docs/boosting). + // Boost specification to boost certain products. For more information, see + // [Boost results](https://cloud.google.com/retail/docs/boosting). // // Notice that if both // [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] @@ -612,8 +612,8 @@ message SearchRequest { BoostSpec boost_spec = 13; // The query expansion specification that specifies the conditions under which - // query expansion will occur. See more details at this [user - // guide](https://cloud.google.com/retail/docs/result-size#query_expansion). + // query expansion occurs. For more information, see [Query + // expansion](https://cloud.google.com/retail/docs/result-size#query_expansion). QueryExpansionSpec query_expansion_spec = 14; // The keys to fetch and rollup the matching @@ -732,9 +732,9 @@ message SearchRequest { // key with multiple resources. // * Keys must start with a lowercase letter or international character. // - // See [Google Cloud - // Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - // for more details. + // For more information, see [Requirements for + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // in the Resource Manager documentation. map labels = 34; // The spell correction specification that specifies the mode under @@ -953,7 +953,7 @@ message SearchResponse { repeated ExperimentInfo experiment_info = 17; } -// Metadata for active A/B testing [Experiments][]. +// Metadata for active A/B testing [Experiment][]. message ExperimentInfo { // Metadata for active serving config A/B tests. message ServingConfigExperiment { @@ -966,8 +966,8 @@ message ExperimentInfo { }]; // The fully qualified resource name of the serving config - // [VariantArm.serving_config_id][] responsible for generating the search - // response. For example: + // [Experiment.VariantArm.serving_config_id][] responsible for generating + // the search response. For example: // `projects/*/locations/*/catalogs/*/servingConfigs/*`. string experiment_serving_config = 2 [(google.api.resource_reference) = { type: "retail.googleapis.com/ServingConfig" diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config.proto b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config.proto index ccc70237a303..94d0675d826c 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config.proto +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config.proto @@ -255,6 +255,10 @@ message ServingConfig { // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. string enable_category_filter_level = 16; + // When the flag is enabled, the products in the denylist will not be filtered + // out in the recommendation filtering results. + bool ignore_recs_denylist = 24; + // The specification for personalization spec. // // Can only be set if diff --git a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event.proto b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event.proto index e1b52903495f..aab2ae31a2d2 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event.proto +++ b/java-retail/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event.proto @@ -37,6 +37,7 @@ message UserEvent { // Required. User event type. Allowed values are: // // * `add-to-cart`: Products being added to cart. + // * `remove-from-cart`: Products being removed from cart. // * `category-page-view`: Special pages such as sale or promotion pages // viewed. // * `detail-page-view`: Products detail page viewed. @@ -272,8 +273,8 @@ message UserEvent { // The entity for customers that may run multiple different entities, domains, // sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, // `google.com`, `youtube.com`, etc. - // It is recommended to set this field to get better per-entity search, - // completion and prediction results. + // We recommend that you set this field to get better per-entity search, + // completion, and prediction results. string entity = 23; } diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/completionservice/completequery/AsyncCompleteQuery.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/completionservice/completequery/AsyncCompleteQuery.java index 961829b59ebc..6cf9c5ba4a7d 100644 --- a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/completionservice/completequery/AsyncCompleteQuery.java +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/completionservice/completequery/AsyncCompleteQuery.java @@ -46,6 +46,7 @@ public static void asyncCompleteQuery() throws Exception { .setDeviceType("deviceType781190832") .setDataset("dataset1443214456") .setMaxSuggestions(618824852) + .setEnableAttributeSuggestions(true) .setEntity("entity-1298275357") .build(); ApiFuture future = diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/completionservice/completequery/SyncCompleteQuery.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/completionservice/completequery/SyncCompleteQuery.java index 92d57264fb9c..9cc6697d6900 100644 --- a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/completionservice/completequery/SyncCompleteQuery.java +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/completionservice/completequery/SyncCompleteQuery.java @@ -45,6 +45,7 @@ public static void syncCompleteQuery() throws Exception { .setDeviceType("deviceType781190832") .setDataset("dataset1443214456") .setMaxSuggestions(618824852) + .setEnableAttributeSuggestions(true) .setEntity("entity-1298275357") .build(); CompleteQueryResponse response = completionServiceClient.completeQuery(request); diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/productservice/purgeproducts/AsyncPurgeProducts.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/productservice/purgeproducts/AsyncPurgeProducts.java new file mode 100644 index 000000000000..1ed9d450c635 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/productservice/purgeproducts/AsyncPurgeProducts.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2.samples; + +// [START retail_v2_generated_ProductService_PurgeProducts_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2.BranchName; +import com.google.cloud.retail.v2.ProductServiceClient; +import com.google.cloud.retail.v2.PurgeProductsRequest; +import com.google.longrunning.Operation; + +public class AsyncPurgeProducts { + + public static void main(String[] args) throws Exception { + asyncPurgeProducts(); + } + + public static void asyncPurgeProducts() 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 (ProductServiceClient productServiceClient = ProductServiceClient.create()) { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent( + BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + ApiFuture future = + productServiceClient.purgeProductsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END retail_v2_generated_ProductService_PurgeProducts_async] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/productservice/purgeproducts/AsyncPurgeProductsLRO.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/productservice/purgeproducts/AsyncPurgeProductsLRO.java new file mode 100644 index 000000000000..3f2a7d8a7aa3 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/productservice/purgeproducts/AsyncPurgeProductsLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2.samples; + +// [START retail_v2_generated_ProductService_PurgeProducts_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.retail.v2.BranchName; +import com.google.cloud.retail.v2.ProductServiceClient; +import com.google.cloud.retail.v2.PurgeProductsMetadata; +import com.google.cloud.retail.v2.PurgeProductsRequest; +import com.google.cloud.retail.v2.PurgeProductsResponse; + +public class AsyncPurgeProductsLRO { + + public static void main(String[] args) throws Exception { + asyncPurgeProductsLRO(); + } + + public static void asyncPurgeProductsLRO() 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 (ProductServiceClient productServiceClient = ProductServiceClient.create()) { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent( + BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + OperationFuture future = + productServiceClient.purgeProductsOperationCallable().futureCall(request); + // Do something. + PurgeProductsResponse response = future.get(); + } + } +} +// [END retail_v2_generated_ProductService_PurgeProducts_LRO_async] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/productservice/purgeproducts/SyncPurgeProducts.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/productservice/purgeproducts/SyncPurgeProducts.java new file mode 100644 index 000000000000..3b1275cc5250 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2/productservice/purgeproducts/SyncPurgeProducts.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2.samples; + +// [START retail_v2_generated_ProductService_PurgeProducts_sync] +import com.google.cloud.retail.v2.BranchName; +import com.google.cloud.retail.v2.ProductServiceClient; +import com.google.cloud.retail.v2.PurgeProductsRequest; +import com.google.cloud.retail.v2.PurgeProductsResponse; + +public class SyncPurgeProducts { + + public static void main(String[] args) throws Exception { + syncPurgeProducts(); + } + + public static void syncPurgeProducts() 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 (ProductServiceClient productServiceClient = ProductServiceClient.create()) { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent( + BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + PurgeProductsResponse response = productServiceClient.purgeProductsAsync(request).get(); + } + } +} +// [END retail_v2_generated_ProductService_PurgeProducts_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/create/SyncCreateSetCredentialsProvider.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..b8f8e1e4cc6c --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_BranchService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.retail.v2alpha.BranchServiceClient; +import com.google.cloud.retail.v2alpha.BranchServiceSettings; +import com.google.cloud.retail.v2alpha.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + BranchServiceSettings branchServiceSettings = + BranchServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + BranchServiceClient branchServiceClient = BranchServiceClient.create(branchServiceSettings); + } +} +// [END retail_v2alpha_generated_BranchService_Create_SetCredentialsProvider_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/create/SyncCreateSetCredentialsProvider1.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..5e9a32639df9 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,40 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_BranchService_Create_SetCredentialsProvider1_sync] +import com.google.cloud.retail.v2alpha.BranchServiceClient; +import com.google.cloud.retail.v2alpha.BranchServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() 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 + BranchServiceSettings branchServiceSettings = + BranchServiceSettings.newHttpJsonBuilder().build(); + BranchServiceClient branchServiceClient = BranchServiceClient.create(branchServiceSettings); + } +} +// [END retail_v2alpha_generated_BranchService_Create_SetCredentialsProvider1_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/create/SyncCreateSetEndpoint.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..b096fa0af56f --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_BranchService_Create_SetEndpoint_sync] +import com.google.cloud.retail.v2alpha.BranchServiceClient; +import com.google.cloud.retail.v2alpha.BranchServiceSettings; +import com.google.cloud.retail.v2alpha.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + BranchServiceSettings branchServiceSettings = + BranchServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + BranchServiceClient branchServiceClient = BranchServiceClient.create(branchServiceSettings); + } +} +// [END retail_v2alpha_generated_BranchService_Create_SetEndpoint_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/getbranch/AsyncGetBranch.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/getbranch/AsyncGetBranch.java new file mode 100644 index 000000000000..b4185a6b625d --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/getbranch/AsyncGetBranch.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_BranchService_GetBranch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.Branch; +import com.google.cloud.retail.v2alpha.BranchName; +import com.google.cloud.retail.v2alpha.BranchServiceClient; +import com.google.cloud.retail.v2alpha.BranchView; +import com.google.cloud.retail.v2alpha.GetBranchRequest; + +public class AsyncGetBranch { + + public static void main(String[] args) throws Exception { + asyncGetBranch(); + } + + public static void asyncGetBranch() 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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) { + GetBranchRequest request = + GetBranchRequest.newBuilder() + .setName(BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setView(BranchView.forNumber(0)) + .build(); + ApiFuture future = branchServiceClient.getBranchCallable().futureCall(request); + // Do something. + Branch response = future.get(); + } + } +} +// [END retail_v2alpha_generated_BranchService_GetBranch_async] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/getbranch/SyncGetBranch.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/getbranch/SyncGetBranch.java new file mode 100644 index 000000000000..873442b22ccd --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/getbranch/SyncGetBranch.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_BranchService_GetBranch_sync] +import com.google.cloud.retail.v2alpha.Branch; +import com.google.cloud.retail.v2alpha.BranchName; +import com.google.cloud.retail.v2alpha.BranchServiceClient; +import com.google.cloud.retail.v2alpha.BranchView; +import com.google.cloud.retail.v2alpha.GetBranchRequest; + +public class SyncGetBranch { + + public static void main(String[] args) throws Exception { + syncGetBranch(); + } + + public static void syncGetBranch() 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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) { + GetBranchRequest request = + GetBranchRequest.newBuilder() + .setName(BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setView(BranchView.forNumber(0)) + .build(); + Branch response = branchServiceClient.getBranch(request); + } + } +} +// [END retail_v2alpha_generated_BranchService_GetBranch_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/getbranch/SyncGetBranchBranchname.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/getbranch/SyncGetBranchBranchname.java new file mode 100644 index 000000000000..4ced16fb0b1d --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/getbranch/SyncGetBranchBranchname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_BranchService_GetBranch_Branchname_sync] +import com.google.cloud.retail.v2alpha.Branch; +import com.google.cloud.retail.v2alpha.BranchName; +import com.google.cloud.retail.v2alpha.BranchServiceClient; + +public class SyncGetBranchBranchname { + + public static void main(String[] args) throws Exception { + syncGetBranchBranchname(); + } + + public static void syncGetBranchBranchname() 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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) { + BranchName name = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"); + Branch response = branchServiceClient.getBranch(name); + } + } +} +// [END retail_v2alpha_generated_BranchService_GetBranch_Branchname_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/getbranch/SyncGetBranchString.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/getbranch/SyncGetBranchString.java new file mode 100644 index 000000000000..a6c3b18bb8fd --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/getbranch/SyncGetBranchString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_BranchService_GetBranch_String_sync] +import com.google.cloud.retail.v2alpha.Branch; +import com.google.cloud.retail.v2alpha.BranchName; +import com.google.cloud.retail.v2alpha.BranchServiceClient; + +public class SyncGetBranchString { + + public static void main(String[] args) throws Exception { + syncGetBranchString(); + } + + public static void syncGetBranchString() 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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) { + String name = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString(); + Branch response = branchServiceClient.getBranch(name); + } + } +} +// [END retail_v2alpha_generated_BranchService_GetBranch_String_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/listbranches/AsyncListBranches.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/listbranches/AsyncListBranches.java new file mode 100644 index 000000000000..606ebb995bcf --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/listbranches/AsyncListBranches.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_BranchService_ListBranches_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.BranchServiceClient; +import com.google.cloud.retail.v2alpha.BranchView; +import com.google.cloud.retail.v2alpha.CatalogName; +import com.google.cloud.retail.v2alpha.ListBranchesRequest; +import com.google.cloud.retail.v2alpha.ListBranchesResponse; + +public class AsyncListBranches { + + public static void main(String[] args) throws Exception { + asyncListBranches(); + } + + public static void asyncListBranches() 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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) { + ListBranchesRequest request = + ListBranchesRequest.newBuilder() + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + .setView(BranchView.forNumber(0)) + .build(); + ApiFuture future = + branchServiceClient.listBranchesCallable().futureCall(request); + // Do something. + ListBranchesResponse response = future.get(); + } + } +} +// [END retail_v2alpha_generated_BranchService_ListBranches_async] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/listbranches/SyncListBranches.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/listbranches/SyncListBranches.java new file mode 100644 index 000000000000..9ee521037224 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/listbranches/SyncListBranches.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_BranchService_ListBranches_sync] +import com.google.cloud.retail.v2alpha.BranchServiceClient; +import com.google.cloud.retail.v2alpha.BranchView; +import com.google.cloud.retail.v2alpha.CatalogName; +import com.google.cloud.retail.v2alpha.ListBranchesRequest; +import com.google.cloud.retail.v2alpha.ListBranchesResponse; + +public class SyncListBranches { + + public static void main(String[] args) throws Exception { + syncListBranches(); + } + + public static void syncListBranches() 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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) { + ListBranchesRequest request = + ListBranchesRequest.newBuilder() + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + .setView(BranchView.forNumber(0)) + .build(); + ListBranchesResponse response = branchServiceClient.listBranches(request); + } + } +} +// [END retail_v2alpha_generated_BranchService_ListBranches_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/listbranches/SyncListBranchesCatalogname.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/listbranches/SyncListBranchesCatalogname.java new file mode 100644 index 000000000000..b1376f4e2b6b --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/listbranches/SyncListBranchesCatalogname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_BranchService_ListBranches_Catalogname_sync] +import com.google.cloud.retail.v2alpha.BranchServiceClient; +import com.google.cloud.retail.v2alpha.CatalogName; +import com.google.cloud.retail.v2alpha.ListBranchesResponse; + +public class SyncListBranchesCatalogname { + + public static void main(String[] args) throws Exception { + syncListBranchesCatalogname(); + } + + public static void syncListBranchesCatalogname() 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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) { + CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + ListBranchesResponse response = branchServiceClient.listBranches(parent); + } + } +} +// [END retail_v2alpha_generated_BranchService_ListBranches_Catalogname_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/listbranches/SyncListBranchesString.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/listbranches/SyncListBranchesString.java new file mode 100644 index 000000000000..3aa8c4dc6819 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservice/listbranches/SyncListBranchesString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_BranchService_ListBranches_String_sync] +import com.google.cloud.retail.v2alpha.BranchServiceClient; +import com.google.cloud.retail.v2alpha.CatalogName; +import com.google.cloud.retail.v2alpha.ListBranchesResponse; + +public class SyncListBranchesString { + + public static void main(String[] args) throws Exception { + syncListBranchesString(); + } + + public static void syncListBranchesString() 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 (BranchServiceClient branchServiceClient = BranchServiceClient.create()) { + String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString(); + ListBranchesResponse response = branchServiceClient.listBranches(parent); + } + } +} +// [END retail_v2alpha_generated_BranchService_ListBranches_String_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservicesettings/listbranches/SyncListBranches.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservicesettings/listbranches/SyncListBranches.java new file mode 100644 index 000000000000..a0b43d6e2615 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/branchservicesettings/listbranches/SyncListBranches.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_BranchServiceSettings_ListBranches_sync] +import com.google.cloud.retail.v2alpha.BranchServiceSettings; +import java.time.Duration; + +public class SyncListBranches { + + public static void main(String[] args) throws Exception { + syncListBranches(); + } + + public static void syncListBranches() 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 + BranchServiceSettings.Builder branchServiceSettingsBuilder = BranchServiceSettings.newBuilder(); + branchServiceSettingsBuilder + .listBranchesSettings() + .setRetrySettings( + branchServiceSettingsBuilder + .listBranchesSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + BranchServiceSettings branchServiceSettings = branchServiceSettingsBuilder.build(); + } +} +// [END retail_v2alpha_generated_BranchServiceSettings_ListBranches_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/acceptterms/AsyncAcceptTerms.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/acceptterms/AsyncAcceptTerms.java new file mode 100644 index 000000000000..c003a8d3c830 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/acceptterms/AsyncAcceptTerms.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_AcceptTerms_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.AcceptTermsRequest; +import com.google.cloud.retail.v2alpha.Project; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.RetailProjectName; + +public class AsyncAcceptTerms { + + public static void main(String[] args) throws Exception { + asyncAcceptTerms(); + } + + public static void asyncAcceptTerms() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + AcceptTermsRequest request = + AcceptTermsRequest.newBuilder() + .setProject(RetailProjectName.of("[PROJECT]").toString()) + .build(); + ApiFuture future = projectServiceClient.acceptTermsCallable().futureCall(request); + // Do something. + Project response = future.get(); + } + } +} +// [END retail_v2alpha_generated_ProjectService_AcceptTerms_async] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/acceptterms/SyncAcceptTerms.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/acceptterms/SyncAcceptTerms.java new file mode 100644 index 000000000000..40f7c908b5ec --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/acceptterms/SyncAcceptTerms.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_AcceptTerms_sync] +import com.google.cloud.retail.v2alpha.AcceptTermsRequest; +import com.google.cloud.retail.v2alpha.Project; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.RetailProjectName; + +public class SyncAcceptTerms { + + public static void main(String[] args) throws Exception { + syncAcceptTerms(); + } + + public static void syncAcceptTerms() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + AcceptTermsRequest request = + AcceptTermsRequest.newBuilder() + .setProject(RetailProjectName.of("[PROJECT]").toString()) + .build(); + Project response = projectServiceClient.acceptTerms(request); + } + } +} +// [END retail_v2alpha_generated_ProjectService_AcceptTerms_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/acceptterms/SyncAcceptTermsRetailprojectname.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/acceptterms/SyncAcceptTermsRetailprojectname.java new file mode 100644 index 000000000000..3eb35245a7b5 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/acceptterms/SyncAcceptTermsRetailprojectname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_AcceptTerms_Retailprojectname_sync] +import com.google.cloud.retail.v2alpha.Project; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.RetailProjectName; + +public class SyncAcceptTermsRetailprojectname { + + public static void main(String[] args) throws Exception { + syncAcceptTermsRetailprojectname(); + } + + public static void syncAcceptTermsRetailprojectname() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + RetailProjectName project = RetailProjectName.of("[PROJECT]"); + Project response = projectServiceClient.acceptTerms(project); + } + } +} +// [END retail_v2alpha_generated_ProjectService_AcceptTerms_Retailprojectname_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/acceptterms/SyncAcceptTermsString.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/acceptterms/SyncAcceptTermsString.java new file mode 100644 index 000000000000..5bd6d89077a9 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/acceptterms/SyncAcceptTermsString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_AcceptTerms_String_sync] +import com.google.cloud.retail.v2alpha.Project; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.RetailProjectName; + +public class SyncAcceptTermsString { + + public static void main(String[] args) throws Exception { + syncAcceptTermsString(); + } + + public static void syncAcceptTermsString() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + String project = RetailProjectName.of("[PROJECT]").toString(); + Project response = projectServiceClient.acceptTerms(project); + } + } +} +// [END retail_v2alpha_generated_ProjectService_AcceptTerms_String_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/create/SyncCreateSetCredentialsProvider.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..fb9c8cf2c8e2 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.ProjectServiceSettings; +import com.google.cloud.retail.v2alpha.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProjectServiceSettings projectServiceSettings = + ProjectServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ProjectServiceClient projectServiceClient = ProjectServiceClient.create(projectServiceSettings); + } +} +// [END retail_v2alpha_generated_ProjectService_Create_SetCredentialsProvider_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/create/SyncCreateSetCredentialsProvider1.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..1ccb6159454d --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,40 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_Create_SetCredentialsProvider1_sync] +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.ProjectServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() 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 + ProjectServiceSettings projectServiceSettings = + ProjectServiceSettings.newHttpJsonBuilder().build(); + ProjectServiceClient projectServiceClient = ProjectServiceClient.create(projectServiceSettings); + } +} +// [END retail_v2alpha_generated_ProjectService_Create_SetCredentialsProvider1_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/create/SyncCreateSetEndpoint.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..a7001e3e046c --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_Create_SetEndpoint_sync] +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.ProjectServiceSettings; +import com.google.cloud.retail.v2alpha.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProjectServiceSettings projectServiceSettings = + ProjectServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + ProjectServiceClient projectServiceClient = ProjectServiceClient.create(projectServiceSettings); + } +} +// [END retail_v2alpha_generated_ProjectService_Create_SetEndpoint_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/enrollsolution/AsyncEnrollSolution.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/enrollsolution/AsyncEnrollSolution.java new file mode 100644 index 000000000000..5cea01edcb14 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/enrollsolution/AsyncEnrollSolution.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_EnrollSolution_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.EnrollSolutionRequest; +import com.google.cloud.retail.v2alpha.ProjectName; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.SolutionType; +import com.google.longrunning.Operation; + +public class AsyncEnrollSolution { + + public static void main(String[] args) throws Exception { + asyncEnrollSolution(); + } + + public static void asyncEnrollSolution() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + EnrollSolutionRequest request = + EnrollSolutionRequest.newBuilder() + .setProject(ProjectName.of("[PROJECT]").toString()) + .setSolution(SolutionType.forNumber(0)) + .build(); + ApiFuture future = + projectServiceClient.enrollSolutionCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END retail_v2alpha_generated_ProjectService_EnrollSolution_async] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/enrollsolution/AsyncEnrollSolutionLRO.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/enrollsolution/AsyncEnrollSolutionLRO.java new file mode 100644 index 000000000000..7aff2e1865fc --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/enrollsolution/AsyncEnrollSolutionLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_EnrollSolution_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.retail.v2alpha.EnrollSolutionMetadata; +import com.google.cloud.retail.v2alpha.EnrollSolutionRequest; +import com.google.cloud.retail.v2alpha.EnrollSolutionResponse; +import com.google.cloud.retail.v2alpha.ProjectName; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.SolutionType; + +public class AsyncEnrollSolutionLRO { + + public static void main(String[] args) throws Exception { + asyncEnrollSolutionLRO(); + } + + public static void asyncEnrollSolutionLRO() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + EnrollSolutionRequest request = + EnrollSolutionRequest.newBuilder() + .setProject(ProjectName.of("[PROJECT]").toString()) + .setSolution(SolutionType.forNumber(0)) + .build(); + OperationFuture future = + projectServiceClient.enrollSolutionOperationCallable().futureCall(request); + // Do something. + EnrollSolutionResponse response = future.get(); + } + } +} +// [END retail_v2alpha_generated_ProjectService_EnrollSolution_LRO_async] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/enrollsolution/SyncEnrollSolution.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/enrollsolution/SyncEnrollSolution.java new file mode 100644 index 000000000000..832806ff0a42 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/enrollsolution/SyncEnrollSolution.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_EnrollSolution_sync] +import com.google.cloud.retail.v2alpha.EnrollSolutionRequest; +import com.google.cloud.retail.v2alpha.EnrollSolutionResponse; +import com.google.cloud.retail.v2alpha.ProjectName; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.SolutionType; + +public class SyncEnrollSolution { + + public static void main(String[] args) throws Exception { + syncEnrollSolution(); + } + + public static void syncEnrollSolution() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + EnrollSolutionRequest request = + EnrollSolutionRequest.newBuilder() + .setProject(ProjectName.of("[PROJECT]").toString()) + .setSolution(SolutionType.forNumber(0)) + .build(); + EnrollSolutionResponse response = projectServiceClient.enrollSolutionAsync(request).get(); + } + } +} +// [END retail_v2alpha_generated_ProjectService_EnrollSolution_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getalertconfig/AsyncGetAlertConfig.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getalertconfig/AsyncGetAlertConfig.java new file mode 100644 index 000000000000..52a7db7fee70 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getalertconfig/AsyncGetAlertConfig.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_GetAlertConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.AlertConfig; +import com.google.cloud.retail.v2alpha.AlertConfigName; +import com.google.cloud.retail.v2alpha.GetAlertConfigRequest; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; + +public class AsyncGetAlertConfig { + + public static void main(String[] args) throws Exception { + asyncGetAlertConfig(); + } + + public static void asyncGetAlertConfig() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + GetAlertConfigRequest request = + GetAlertConfigRequest.newBuilder() + .setName(AlertConfigName.of("[PROJECT]").toString()) + .build(); + ApiFuture future = + projectServiceClient.getAlertConfigCallable().futureCall(request); + // Do something. + AlertConfig response = future.get(); + } + } +} +// [END retail_v2alpha_generated_ProjectService_GetAlertConfig_async] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getalertconfig/SyncGetAlertConfig.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getalertconfig/SyncGetAlertConfig.java new file mode 100644 index 000000000000..45e183d63502 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getalertconfig/SyncGetAlertConfig.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_GetAlertConfig_sync] +import com.google.cloud.retail.v2alpha.AlertConfig; +import com.google.cloud.retail.v2alpha.AlertConfigName; +import com.google.cloud.retail.v2alpha.GetAlertConfigRequest; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; + +public class SyncGetAlertConfig { + + public static void main(String[] args) throws Exception { + syncGetAlertConfig(); + } + + public static void syncGetAlertConfig() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + GetAlertConfigRequest request = + GetAlertConfigRequest.newBuilder() + .setName(AlertConfigName.of("[PROJECT]").toString()) + .build(); + AlertConfig response = projectServiceClient.getAlertConfig(request); + } + } +} +// [END retail_v2alpha_generated_ProjectService_GetAlertConfig_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getalertconfig/SyncGetAlertConfigAlertconfigname.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getalertconfig/SyncGetAlertConfigAlertconfigname.java new file mode 100644 index 000000000000..583bb0074855 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getalertconfig/SyncGetAlertConfigAlertconfigname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_GetAlertConfig_Alertconfigname_sync] +import com.google.cloud.retail.v2alpha.AlertConfig; +import com.google.cloud.retail.v2alpha.AlertConfigName; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; + +public class SyncGetAlertConfigAlertconfigname { + + public static void main(String[] args) throws Exception { + syncGetAlertConfigAlertconfigname(); + } + + public static void syncGetAlertConfigAlertconfigname() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + AlertConfigName name = AlertConfigName.of("[PROJECT]"); + AlertConfig response = projectServiceClient.getAlertConfig(name); + } + } +} +// [END retail_v2alpha_generated_ProjectService_GetAlertConfig_Alertconfigname_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getalertconfig/SyncGetAlertConfigString.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getalertconfig/SyncGetAlertConfigString.java new file mode 100644 index 000000000000..e296dc1c0e2f --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getalertconfig/SyncGetAlertConfigString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_GetAlertConfig_String_sync] +import com.google.cloud.retail.v2alpha.AlertConfig; +import com.google.cloud.retail.v2alpha.AlertConfigName; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; + +public class SyncGetAlertConfigString { + + public static void main(String[] args) throws Exception { + syncGetAlertConfigString(); + } + + public static void syncGetAlertConfigString() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + String name = AlertConfigName.of("[PROJECT]").toString(); + AlertConfig response = projectServiceClient.getAlertConfig(name); + } + } +} +// [END retail_v2alpha_generated_ProjectService_GetAlertConfig_String_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getloggingconfig/AsyncGetLoggingConfig.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getloggingconfig/AsyncGetLoggingConfig.java new file mode 100644 index 000000000000..2b1bf28a66a3 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getloggingconfig/AsyncGetLoggingConfig.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_GetLoggingConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.GetLoggingConfigRequest; +import com.google.cloud.retail.v2alpha.LoggingConfig; +import com.google.cloud.retail.v2alpha.LoggingConfigName; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; + +public class AsyncGetLoggingConfig { + + public static void main(String[] args) throws Exception { + asyncGetLoggingConfig(); + } + + public static void asyncGetLoggingConfig() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + GetLoggingConfigRequest request = + GetLoggingConfigRequest.newBuilder() + .setName(LoggingConfigName.of("[PROJECT]").toString()) + .build(); + ApiFuture future = + projectServiceClient.getLoggingConfigCallable().futureCall(request); + // Do something. + LoggingConfig response = future.get(); + } + } +} +// [END retail_v2alpha_generated_ProjectService_GetLoggingConfig_async] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getloggingconfig/SyncGetLoggingConfig.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getloggingconfig/SyncGetLoggingConfig.java new file mode 100644 index 000000000000..6e819ee39d99 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getloggingconfig/SyncGetLoggingConfig.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_GetLoggingConfig_sync] +import com.google.cloud.retail.v2alpha.GetLoggingConfigRequest; +import com.google.cloud.retail.v2alpha.LoggingConfig; +import com.google.cloud.retail.v2alpha.LoggingConfigName; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; + +public class SyncGetLoggingConfig { + + public static void main(String[] args) throws Exception { + syncGetLoggingConfig(); + } + + public static void syncGetLoggingConfig() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + GetLoggingConfigRequest request = + GetLoggingConfigRequest.newBuilder() + .setName(LoggingConfigName.of("[PROJECT]").toString()) + .build(); + LoggingConfig response = projectServiceClient.getLoggingConfig(request); + } + } +} +// [END retail_v2alpha_generated_ProjectService_GetLoggingConfig_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getloggingconfig/SyncGetLoggingConfigLoggingconfigname.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getloggingconfig/SyncGetLoggingConfigLoggingconfigname.java new file mode 100644 index 000000000000..74bab7cd675c --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getloggingconfig/SyncGetLoggingConfigLoggingconfigname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_GetLoggingConfig_Loggingconfigname_sync] +import com.google.cloud.retail.v2alpha.LoggingConfig; +import com.google.cloud.retail.v2alpha.LoggingConfigName; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; + +public class SyncGetLoggingConfigLoggingconfigname { + + public static void main(String[] args) throws Exception { + syncGetLoggingConfigLoggingconfigname(); + } + + public static void syncGetLoggingConfigLoggingconfigname() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + LoggingConfigName name = LoggingConfigName.of("[PROJECT]"); + LoggingConfig response = projectServiceClient.getLoggingConfig(name); + } + } +} +// [END retail_v2alpha_generated_ProjectService_GetLoggingConfig_Loggingconfigname_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getloggingconfig/SyncGetLoggingConfigString.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getloggingconfig/SyncGetLoggingConfigString.java new file mode 100644 index 000000000000..bad6b045117b --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getloggingconfig/SyncGetLoggingConfigString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_GetLoggingConfig_String_sync] +import com.google.cloud.retail.v2alpha.LoggingConfig; +import com.google.cloud.retail.v2alpha.LoggingConfigName; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; + +public class SyncGetLoggingConfigString { + + public static void main(String[] args) throws Exception { + syncGetLoggingConfigString(); + } + + public static void syncGetLoggingConfigString() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + String name = LoggingConfigName.of("[PROJECT]").toString(); + LoggingConfig response = projectServiceClient.getLoggingConfig(name); + } + } +} +// [END retail_v2alpha_generated_ProjectService_GetLoggingConfig_String_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getproject/AsyncGetProject.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getproject/AsyncGetProject.java new file mode 100644 index 000000000000..04e08a9ab1a8 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getproject/AsyncGetProject.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_GetProject_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.GetProjectRequest; +import com.google.cloud.retail.v2alpha.Project; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.RetailProjectName; + +public class AsyncGetProject { + + public static void main(String[] args) throws Exception { + asyncGetProject(); + } + + public static void asyncGetProject() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + GetProjectRequest request = + GetProjectRequest.newBuilder() + .setName(RetailProjectName.of("[PROJECT]").toString()) + .build(); + ApiFuture future = projectServiceClient.getProjectCallable().futureCall(request); + // Do something. + Project response = future.get(); + } + } +} +// [END retail_v2alpha_generated_ProjectService_GetProject_async] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getproject/SyncGetProject.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getproject/SyncGetProject.java new file mode 100644 index 000000000000..3ece47f967ff --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getproject/SyncGetProject.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_GetProject_sync] +import com.google.cloud.retail.v2alpha.GetProjectRequest; +import com.google.cloud.retail.v2alpha.Project; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.RetailProjectName; + +public class SyncGetProject { + + public static void main(String[] args) throws Exception { + syncGetProject(); + } + + public static void syncGetProject() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + GetProjectRequest request = + GetProjectRequest.newBuilder() + .setName(RetailProjectName.of("[PROJECT]").toString()) + .build(); + Project response = projectServiceClient.getProject(request); + } + } +} +// [END retail_v2alpha_generated_ProjectService_GetProject_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getproject/SyncGetProjectRetailprojectname.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getproject/SyncGetProjectRetailprojectname.java new file mode 100644 index 000000000000..9e5f3c94cf94 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getproject/SyncGetProjectRetailprojectname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_GetProject_Retailprojectname_sync] +import com.google.cloud.retail.v2alpha.Project; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.RetailProjectName; + +public class SyncGetProjectRetailprojectname { + + public static void main(String[] args) throws Exception { + syncGetProjectRetailprojectname(); + } + + public static void syncGetProjectRetailprojectname() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + RetailProjectName name = RetailProjectName.of("[PROJECT]"); + Project response = projectServiceClient.getProject(name); + } + } +} +// [END retail_v2alpha_generated_ProjectService_GetProject_Retailprojectname_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getproject/SyncGetProjectString.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getproject/SyncGetProjectString.java new file mode 100644 index 000000000000..52be2f96eca8 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/getproject/SyncGetProjectString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_GetProject_String_sync] +import com.google.cloud.retail.v2alpha.Project; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.RetailProjectName; + +public class SyncGetProjectString { + + public static void main(String[] args) throws Exception { + syncGetProjectString(); + } + + public static void syncGetProjectString() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + String name = RetailProjectName.of("[PROJECT]").toString(); + Project response = projectServiceClient.getProject(name); + } + } +} +// [END retail_v2alpha_generated_ProjectService_GetProject_String_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/listenrolledsolutions/AsyncListEnrolledSolutions.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/listenrolledsolutions/AsyncListEnrolledSolutions.java new file mode 100644 index 000000000000..52addf7fdfec --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/listenrolledsolutions/AsyncListEnrolledSolutions.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_ListEnrolledSolutions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest; +import com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse; +import com.google.cloud.retail.v2alpha.ProjectName; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; + +public class AsyncListEnrolledSolutions { + + public static void main(String[] args) throws Exception { + asyncListEnrolledSolutions(); + } + + public static void asyncListEnrolledSolutions() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + ListEnrolledSolutionsRequest request = + ListEnrolledSolutionsRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .build(); + ApiFuture future = + projectServiceClient.listEnrolledSolutionsCallable().futureCall(request); + // Do something. + ListEnrolledSolutionsResponse response = future.get(); + } + } +} +// [END retail_v2alpha_generated_ProjectService_ListEnrolledSolutions_async] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/listenrolledsolutions/SyncListEnrolledSolutions.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/listenrolledsolutions/SyncListEnrolledSolutions.java new file mode 100644 index 000000000000..c919e31d9d72 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/listenrolledsolutions/SyncListEnrolledSolutions.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_ListEnrolledSolutions_sync] +import com.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest; +import com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse; +import com.google.cloud.retail.v2alpha.ProjectName; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; + +public class SyncListEnrolledSolutions { + + public static void main(String[] args) throws Exception { + syncListEnrolledSolutions(); + } + + public static void syncListEnrolledSolutions() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + ListEnrolledSolutionsRequest request = + ListEnrolledSolutionsRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .build(); + ListEnrolledSolutionsResponse response = projectServiceClient.listEnrolledSolutions(request); + } + } +} +// [END retail_v2alpha_generated_ProjectService_ListEnrolledSolutions_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/listenrolledsolutions/SyncListEnrolledSolutionsProjectname.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/listenrolledsolutions/SyncListEnrolledSolutionsProjectname.java new file mode 100644 index 000000000000..b33b1775b1ef --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/listenrolledsolutions/SyncListEnrolledSolutionsProjectname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_ListEnrolledSolutions_Projectname_sync] +import com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse; +import com.google.cloud.retail.v2alpha.ProjectName; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; + +public class SyncListEnrolledSolutionsProjectname { + + public static void main(String[] args) throws Exception { + syncListEnrolledSolutionsProjectname(); + } + + public static void syncListEnrolledSolutionsProjectname() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + ProjectName parent = ProjectName.of("[PROJECT]"); + ListEnrolledSolutionsResponse response = projectServiceClient.listEnrolledSolutions(parent); + } + } +} +// [END retail_v2alpha_generated_ProjectService_ListEnrolledSolutions_Projectname_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/listenrolledsolutions/SyncListEnrolledSolutionsString.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/listenrolledsolutions/SyncListEnrolledSolutionsString.java new file mode 100644 index 000000000000..fc28b4fc855c --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/listenrolledsolutions/SyncListEnrolledSolutionsString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_ListEnrolledSolutions_String_sync] +import com.google.cloud.retail.v2alpha.ListEnrolledSolutionsResponse; +import com.google.cloud.retail.v2alpha.ProjectName; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; + +public class SyncListEnrolledSolutionsString { + + public static void main(String[] args) throws Exception { + syncListEnrolledSolutionsString(); + } + + public static void syncListEnrolledSolutionsString() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + String parent = ProjectName.of("[PROJECT]").toString(); + ListEnrolledSolutionsResponse response = projectServiceClient.listEnrolledSolutions(parent); + } + } +} +// [END retail_v2alpha_generated_ProjectService_ListEnrolledSolutions_String_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updatealertconfig/AsyncUpdateAlertConfig.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updatealertconfig/AsyncUpdateAlertConfig.java new file mode 100644 index 000000000000..7a0d31404be6 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updatealertconfig/AsyncUpdateAlertConfig.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_UpdateAlertConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.AlertConfig; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateAlertConfig { + + public static void main(String[] args) throws Exception { + asyncUpdateAlertConfig(); + } + + public static void asyncUpdateAlertConfig() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + UpdateAlertConfigRequest request = + UpdateAlertConfigRequest.newBuilder() + .setAlertConfig(AlertConfig.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + projectServiceClient.updateAlertConfigCallable().futureCall(request); + // Do something. + AlertConfig response = future.get(); + } + } +} +// [END retail_v2alpha_generated_ProjectService_UpdateAlertConfig_async] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updatealertconfig/SyncUpdateAlertConfig.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updatealertconfig/SyncUpdateAlertConfig.java new file mode 100644 index 000000000000..b5763813d901 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updatealertconfig/SyncUpdateAlertConfig.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_UpdateAlertConfig_sync] +import com.google.cloud.retail.v2alpha.AlertConfig; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.UpdateAlertConfigRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAlertConfig { + + public static void main(String[] args) throws Exception { + syncUpdateAlertConfig(); + } + + public static void syncUpdateAlertConfig() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + UpdateAlertConfigRequest request = + UpdateAlertConfigRequest.newBuilder() + .setAlertConfig(AlertConfig.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + AlertConfig response = projectServiceClient.updateAlertConfig(request); + } + } +} +// [END retail_v2alpha_generated_ProjectService_UpdateAlertConfig_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updatealertconfig/SyncUpdateAlertConfigAlertconfigFieldmask.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updatealertconfig/SyncUpdateAlertConfigAlertconfigFieldmask.java new file mode 100644 index 000000000000..12d29d751b00 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updatealertconfig/SyncUpdateAlertConfigAlertconfigFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_UpdateAlertConfig_AlertconfigFieldmask_sync] +import com.google.cloud.retail.v2alpha.AlertConfig; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAlertConfigAlertconfigFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateAlertConfigAlertconfigFieldmask(); + } + + public static void syncUpdateAlertConfigAlertconfigFieldmask() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + AlertConfig alertConfig = AlertConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + AlertConfig response = projectServiceClient.updateAlertConfig(alertConfig, updateMask); + } + } +} +// [END retail_v2alpha_generated_ProjectService_UpdateAlertConfig_AlertconfigFieldmask_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updateloggingconfig/AsyncUpdateLoggingConfig.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updateloggingconfig/AsyncUpdateLoggingConfig.java new file mode 100644 index 000000000000..df70b8f9f3a1 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updateloggingconfig/AsyncUpdateLoggingConfig.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_UpdateLoggingConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.LoggingConfig; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateLoggingConfig { + + public static void main(String[] args) throws Exception { + asyncUpdateLoggingConfig(); + } + + public static void asyncUpdateLoggingConfig() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + UpdateLoggingConfigRequest request = + UpdateLoggingConfigRequest.newBuilder() + .setLoggingConfig(LoggingConfig.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + projectServiceClient.updateLoggingConfigCallable().futureCall(request); + // Do something. + LoggingConfig response = future.get(); + } + } +} +// [END retail_v2alpha_generated_ProjectService_UpdateLoggingConfig_async] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updateloggingconfig/SyncUpdateLoggingConfig.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updateloggingconfig/SyncUpdateLoggingConfig.java new file mode 100644 index 000000000000..7f7ebfbc1cde --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updateloggingconfig/SyncUpdateLoggingConfig.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_UpdateLoggingConfig_sync] +import com.google.cloud.retail.v2alpha.LoggingConfig; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateLoggingConfig { + + public static void main(String[] args) throws Exception { + syncUpdateLoggingConfig(); + } + + public static void syncUpdateLoggingConfig() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + UpdateLoggingConfigRequest request = + UpdateLoggingConfigRequest.newBuilder() + .setLoggingConfig(LoggingConfig.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + LoggingConfig response = projectServiceClient.updateLoggingConfig(request); + } + } +} +// [END retail_v2alpha_generated_ProjectService_UpdateLoggingConfig_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updateloggingconfig/SyncUpdateLoggingConfigLoggingconfigFieldmask.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updateloggingconfig/SyncUpdateLoggingConfigLoggingconfigFieldmask.java new file mode 100644 index 000000000000..ff68e6dce377 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservice/updateloggingconfig/SyncUpdateLoggingConfigLoggingconfigFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectService_UpdateLoggingConfig_LoggingconfigFieldmask_sync] +import com.google.cloud.retail.v2alpha.LoggingConfig; +import com.google.cloud.retail.v2alpha.ProjectServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateLoggingConfigLoggingconfigFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateLoggingConfigLoggingconfigFieldmask(); + } + + public static void syncUpdateLoggingConfigLoggingconfigFieldmask() 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 (ProjectServiceClient projectServiceClient = ProjectServiceClient.create()) { + LoggingConfig loggingConfig = LoggingConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + LoggingConfig response = projectServiceClient.updateLoggingConfig(loggingConfig, updateMask); + } + } +} +// [END retail_v2alpha_generated_ProjectService_UpdateLoggingConfig_LoggingconfigFieldmask_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservicesettings/getproject/SyncGetProject.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservicesettings/getproject/SyncGetProject.java new file mode 100644 index 000000000000..a822807ed97c --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/projectservicesettings/getproject/SyncGetProject.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.samples; + +// [START retail_v2alpha_generated_ProjectServiceSettings_GetProject_sync] +import com.google.cloud.retail.v2alpha.ProjectServiceSettings; +import java.time.Duration; + +public class SyncGetProject { + + public static void main(String[] args) throws Exception { + syncGetProject(); + } + + public static void syncGetProject() 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 + ProjectServiceSettings.Builder projectServiceSettingsBuilder = + ProjectServiceSettings.newBuilder(); + projectServiceSettingsBuilder + .getProjectSettings() + .setRetrySettings( + projectServiceSettingsBuilder + .getProjectSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ProjectServiceSettings projectServiceSettings = projectServiceSettingsBuilder.build(); + } +} +// [END retail_v2alpha_generated_ProjectServiceSettings_GetProject_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/branchservicestubsettings/listbranches/SyncListBranches.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/branchservicestubsettings/listbranches/SyncListBranches.java new file mode 100644 index 000000000000..4f1a29000101 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/branchservicestubsettings/listbranches/SyncListBranches.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.stub.samples; + +// [START retail_v2alpha_generated_BranchServiceStubSettings_ListBranches_sync] +import com.google.cloud.retail.v2alpha.stub.BranchServiceStubSettings; +import java.time.Duration; + +public class SyncListBranches { + + public static void main(String[] args) throws Exception { + syncListBranches(); + } + + public static void syncListBranches() 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 + BranchServiceStubSettings.Builder branchServiceSettingsBuilder = + BranchServiceStubSettings.newBuilder(); + branchServiceSettingsBuilder + .listBranchesSettings() + .setRetrySettings( + branchServiceSettingsBuilder + .listBranchesSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + BranchServiceStubSettings branchServiceSettings = branchServiceSettingsBuilder.build(); + } +} +// [END retail_v2alpha_generated_BranchServiceStubSettings_ListBranches_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/projectservicestubsettings/getproject/SyncGetProject.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/projectservicestubsettings/getproject/SyncGetProject.java new file mode 100644 index 000000000000..ff1e5b3dac11 --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/projectservicestubsettings/getproject/SyncGetProject.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2alpha.stub.samples; + +// [START retail_v2alpha_generated_ProjectServiceStubSettings_GetProject_sync] +import com.google.cloud.retail.v2alpha.stub.ProjectServiceStubSettings; +import java.time.Duration; + +public class SyncGetProject { + + public static void main(String[] args) throws Exception { + syncGetProject(); + } + + public static void syncGetProject() 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 + ProjectServiceStubSettings.Builder projectServiceSettingsBuilder = + ProjectServiceStubSettings.newBuilder(); + projectServiceSettingsBuilder + .getProjectSettings() + .setRetrySettings( + projectServiceSettingsBuilder + .getProjectSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ProjectServiceStubSettings projectServiceSettings = projectServiceSettingsBuilder.build(); + } +} +// [END retail_v2alpha_generated_ProjectServiceStubSettings_GetProject_sync] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/completionservice/completequery/AsyncCompleteQuery.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/completionservice/completequery/AsyncCompleteQuery.java index 622d6462b5b2..02865189263d 100644 --- a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/completionservice/completequery/AsyncCompleteQuery.java +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/completionservice/completequery/AsyncCompleteQuery.java @@ -46,6 +46,7 @@ public static void asyncCompleteQuery() throws Exception { .setDeviceType("deviceType781190832") .setDataset("dataset1443214456") .setMaxSuggestions(618824852) + .setEnableAttributeSuggestions(true) .setEntity("entity-1298275357") .build(); ApiFuture future = diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/completionservice/completequery/SyncCompleteQuery.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/completionservice/completequery/SyncCompleteQuery.java index a01680d13026..d161ac427514 100644 --- a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/completionservice/completequery/SyncCompleteQuery.java +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/completionservice/completequery/SyncCompleteQuery.java @@ -45,6 +45,7 @@ public static void syncCompleteQuery() throws Exception { .setDeviceType("deviceType781190832") .setDataset("dataset1443214456") .setMaxSuggestions(618824852) + .setEnableAttributeSuggestions(true) .setEntity("entity-1298275357") .build(); CompleteQueryResponse response = completionServiceClient.completeQuery(request); diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/productservice/purgeproducts/AsyncPurgeProducts.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/productservice/purgeproducts/AsyncPurgeProducts.java new file mode 100644 index 000000000000..253cb19a492a --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/productservice/purgeproducts/AsyncPurgeProducts.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2beta.samples; + +// [START retail_v2beta_generated_ProductService_PurgeProducts_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2beta.BranchName; +import com.google.cloud.retail.v2beta.ProductServiceClient; +import com.google.cloud.retail.v2beta.PurgeProductsRequest; +import com.google.longrunning.Operation; + +public class AsyncPurgeProducts { + + public static void main(String[] args) throws Exception { + asyncPurgeProducts(); + } + + public static void asyncPurgeProducts() 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 (ProductServiceClient productServiceClient = ProductServiceClient.create()) { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent( + BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + ApiFuture future = + productServiceClient.purgeProductsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END retail_v2beta_generated_ProductService_PurgeProducts_async] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/productservice/purgeproducts/AsyncPurgeProductsLRO.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/productservice/purgeproducts/AsyncPurgeProductsLRO.java new file mode 100644 index 000000000000..e23bac68f39f --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/productservice/purgeproducts/AsyncPurgeProductsLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2beta.samples; + +// [START retail_v2beta_generated_ProductService_PurgeProducts_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.retail.v2beta.BranchName; +import com.google.cloud.retail.v2beta.ProductServiceClient; +import com.google.cloud.retail.v2beta.PurgeProductsMetadata; +import com.google.cloud.retail.v2beta.PurgeProductsRequest; +import com.google.cloud.retail.v2beta.PurgeProductsResponse; + +public class AsyncPurgeProductsLRO { + + public static void main(String[] args) throws Exception { + asyncPurgeProductsLRO(); + } + + public static void asyncPurgeProductsLRO() 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 (ProductServiceClient productServiceClient = ProductServiceClient.create()) { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent( + BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + OperationFuture future = + productServiceClient.purgeProductsOperationCallable().futureCall(request); + // Do something. + PurgeProductsResponse response = future.get(); + } + } +} +// [END retail_v2beta_generated_ProductService_PurgeProducts_LRO_async] diff --git a/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/productservice/purgeproducts/SyncPurgeProducts.java b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/productservice/purgeproducts/SyncPurgeProducts.java new file mode 100644 index 000000000000..e0104f55f99c --- /dev/null +++ b/java-retail/samples/snippets/generated/com/google/cloud/retail/v2beta/productservice/purgeproducts/SyncPurgeProducts.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2beta.samples; + +// [START retail_v2beta_generated_ProductService_PurgeProducts_sync] +import com.google.cloud.retail.v2beta.BranchName; +import com.google.cloud.retail.v2beta.ProductServiceClient; +import com.google.cloud.retail.v2beta.PurgeProductsRequest; +import com.google.cloud.retail.v2beta.PurgeProductsResponse; + +public class SyncPurgeProducts { + + public static void main(String[] args) throws Exception { + syncPurgeProducts(); + } + + public static void syncPurgeProducts() 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 (ProductServiceClient productServiceClient = ProductServiceClient.create()) { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent( + BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + PurgeProductsResponse response = productServiceClient.purgeProductsAsync(request).get(); + } + } +} +// [END retail_v2beta_generated_ProductService_PurgeProducts_sync] diff --git a/java-securitycentermanagement/README.md b/java-securitycentermanagement/README.md index 61ff6b693569..909cdfc4ad41 100644 --- a/java-securitycentermanagement/README.md +++ b/java-securitycentermanagement/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-securitycentermanagement.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securitycentermanagement/0.12.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securitycentermanagement/0.13.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-securitycentermanagement/proto-google-cloud-securitycentermanagement-v1/src/main/java/com/google/cloud/securitycentermanagement/v1/UpdateSecurityCenterServiceRequest.java b/java-securitycentermanagement/proto-google-cloud-securitycentermanagement-v1/src/main/java/com/google/cloud/securitycentermanagement/v1/UpdateSecurityCenterServiceRequest.java index f391688f7357..638684da2a62 100644 --- a/java-securitycentermanagement/proto-google-cloud-securitycentermanagement-v1/src/main/java/com/google/cloud/securitycentermanagement/v1/UpdateSecurityCenterServiceRequest.java +++ b/java-securitycentermanagement/proto-google-cloud-securitycentermanagement-v1/src/main/java/com/google/cloud/securitycentermanagement/v1/UpdateSecurityCenterServiceRequest.java @@ -186,13 +186,13 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
-   * Optional. When set to true, only validations (including IAM checks) will
+   * Optional. When set to true, only validations (including IAM checks) will be
    * done for the request (service will not be updated). An OK response
-   * indicates the request is valid while an error response indicates the
-   * request is invalid. Note that a subsequent request to actually update the
-   * service could still fail because 1. the state could have changed (e.g. IAM
-   * permission lost) or
-   * 2. A failure occurred while trying to delete the module.
+   * indicates that the request is valid, while an error response indicates that
+   * the request is invalid. Note that a subsequent request to actually update
+   * the service could still fail for one of the following reasons:
+   * - The state could have changed (e.g. IAM permission lost).
+   * - A failure occurred while trying to delete the module.
    * 
* * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1089,13 +1089,13 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
-     * Optional. When set to true, only validations (including IAM checks) will
+     * Optional. When set to true, only validations (including IAM checks) will be
      * done for the request (service will not be updated). An OK response
-     * indicates the request is valid while an error response indicates the
-     * request is invalid. Note that a subsequent request to actually update the
-     * service could still fail because 1. the state could have changed (e.g. IAM
-     * permission lost) or
-     * 2. A failure occurred while trying to delete the module.
+     * indicates that the request is valid, while an error response indicates that
+     * the request is invalid. Note that a subsequent request to actually update
+     * the service could still fail for one of the following reasons:
+     * - The state could have changed (e.g. IAM permission lost).
+     * - A failure occurred while trying to delete the module.
      * 
* * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1110,13 +1110,13 @@ public boolean getValidateOnly() { * * *
-     * Optional. When set to true, only validations (including IAM checks) will
+     * Optional. When set to true, only validations (including IAM checks) will be
      * done for the request (service will not be updated). An OK response
-     * indicates the request is valid while an error response indicates the
-     * request is invalid. Note that a subsequent request to actually update the
-     * service could still fail because 1. the state could have changed (e.g. IAM
-     * permission lost) or
-     * 2. A failure occurred while trying to delete the module.
+     * indicates that the request is valid, while an error response indicates that
+     * the request is invalid. Note that a subsequent request to actually update
+     * the service could still fail for one of the following reasons:
+     * - The state could have changed (e.g. IAM permission lost).
+     * - A failure occurred while trying to delete the module.
      * 
* * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1135,13 +1135,13 @@ public Builder setValidateOnly(boolean value) { * * *
-     * Optional. When set to true, only validations (including IAM checks) will
+     * Optional. When set to true, only validations (including IAM checks) will be
      * done for the request (service will not be updated). An OK response
-     * indicates the request is valid while an error response indicates the
-     * request is invalid. Note that a subsequent request to actually update the
-     * service could still fail because 1. the state could have changed (e.g. IAM
-     * permission lost) or
-     * 2. A failure occurred while trying to delete the module.
+     * indicates that the request is valid, while an error response indicates that
+     * the request is invalid. Note that a subsequent request to actually update
+     * the service could still fail for one of the following reasons:
+     * - The state could have changed (e.g. IAM permission lost).
+     * - A failure occurred while trying to delete the module.
      * 
* * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-securitycentermanagement/proto-google-cloud-securitycentermanagement-v1/src/main/java/com/google/cloud/securitycentermanagement/v1/UpdateSecurityCenterServiceRequestOrBuilder.java b/java-securitycentermanagement/proto-google-cloud-securitycentermanagement-v1/src/main/java/com/google/cloud/securitycentermanagement/v1/UpdateSecurityCenterServiceRequestOrBuilder.java index 9f27c9beac30..98c2205ca1ca 100644 --- a/java-securitycentermanagement/proto-google-cloud-securitycentermanagement-v1/src/main/java/com/google/cloud/securitycentermanagement/v1/UpdateSecurityCenterServiceRequestOrBuilder.java +++ b/java-securitycentermanagement/proto-google-cloud-securitycentermanagement-v1/src/main/java/com/google/cloud/securitycentermanagement/v1/UpdateSecurityCenterServiceRequestOrBuilder.java @@ -117,13 +117,13 @@ public interface UpdateSecurityCenterServiceRequestOrBuilder * * *
-   * Optional. When set to true, only validations (including IAM checks) will
+   * Optional. When set to true, only validations (including IAM checks) will be
    * done for the request (service will not be updated). An OK response
-   * indicates the request is valid while an error response indicates the
-   * request is invalid. Note that a subsequent request to actually update the
-   * service could still fail because 1. the state could have changed (e.g. IAM
-   * permission lost) or
-   * 2. A failure occurred while trying to delete the module.
+   * indicates that the request is valid, while an error response indicates that
+   * the request is invalid. Note that a subsequent request to actually update
+   * the service could still fail for one of the following reasons:
+   * - The state could have changed (e.g. IAM permission lost).
+   * - A failure occurred while trying to delete the module.
    * 
* * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-securitycentermanagement/proto-google-cloud-securitycentermanagement-v1/src/main/proto/google/cloud/securitycentermanagement/v1/security_center_management.proto b/java-securitycentermanagement/proto-google-cloud-securitycentermanagement-v1/src/main/proto/google/cloud/securitycentermanagement/v1/security_center_management.proto index bf63b1b53112..de29caf7655a 100644 --- a/java-securitycentermanagement/proto-google-cloud-securitycentermanagement-v1/src/main/proto/google/cloud/securitycentermanagement/v1/security_center_management.proto +++ b/java-securitycentermanagement/proto-google-cloud-securitycentermanagement-v1/src/main/proto/google/cloud/securitycentermanagement/v1/security_center_management.proto @@ -1667,12 +1667,12 @@ message UpdateSecurityCenterServiceRequest { google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. When set to true, only validations (including IAM checks) will + // Optional. When set to true, only validations (including IAM checks) will be // done for the request (service will not be updated). An OK response - // indicates the request is valid while an error response indicates the - // request is invalid. Note that a subsequent request to actually update the - // service could still fail because 1. the state could have changed (e.g. IAM - // permission lost) or - // 2. A failure occurred while trying to delete the module. + // indicates that the request is valid, while an error response indicates that + // the request is invalid. Note that a subsequent request to actually update + // the service could still fail for one of the following reasons: + // - The state could have changed (e.g. IAM permission lost). + // - A failure occurred while trying to delete the module. bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/java-shopping-merchant-accounts/README.md b/java-shopping-merchant-accounts/README.md index fda90499209b..20f1dce31ec4 100644 --- a/java-shopping-merchant-accounts/README.md +++ b/java-shopping-merchant-accounts/README.md @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.shopping/google-shopping-merchant-accounts.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-accounts/0.0.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-accounts/0.1.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-shopping-merchant-accounts/google-shopping-merchant-accounts/src/main/java/com/google/shopping/merchant/accounts/v1beta/UserServiceClient.java b/java-shopping-merchant-accounts/google-shopping-merchant-accounts/src/main/java/com/google/shopping/merchant/accounts/v1beta/UserServiceClient.java index 1e92637d9996..155beecac7b5 100644 --- a/java-shopping-merchant-accounts/google-shopping-merchant-accounts/src/main/java/com/google/shopping/merchant/accounts/v1beta/UserServiceClient.java +++ b/java-shopping-merchant-accounts/google-shopping-merchant-accounts/src/main/java/com/google/shopping/merchant/accounts/v1beta/UserServiceClient.java @@ -721,7 +721,7 @@ public final UnaryCallable updateUserCallable() { * } * * @param parent Required. The parent, which owns this collection of users. Format: - * `accounts/{account} + * `accounts/{account}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListUsersPagedResponse listUsers(AccountName parent) { @@ -751,7 +751,7 @@ public final ListUsersPagedResponse listUsers(AccountName parent) { * } * * @param parent Required. The parent, which owns this collection of users. Format: - * `accounts/{account} + * `accounts/{account}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListUsersPagedResponse listUsers(String parent) { diff --git a/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/BusinessInfo.java b/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/BusinessInfo.java index 9c43ecfc265f..910e7290d9c4 100644 --- a/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/BusinessInfo.java +++ b/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/BusinessInfo.java @@ -176,10 +176,10 @@ public com.google.type.PostalAddressOrBuilder getAddressOrBuilder() { * * *
-   * Optional. The phone number of the business.
+   * Output only. The phone number of the business.
    * 
* - * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the phone field is set. @@ -192,10 +192,10 @@ public boolean hasPhone() { * * *
-   * Optional. The phone number of the business.
+   * Output only. The phone number of the business.
    * 
* - * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The phone. @@ -208,10 +208,10 @@ public com.google.type.PhoneNumber getPhone() { * * *
-   * Optional. The phone number of the business.
+   * Output only. The phone number of the business.
    * 
* - * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override @@ -1137,10 +1137,11 @@ public com.google.type.PostalAddressOrBuilder getAddressOrBuilder() { * * *
-     * Optional. The phone number of the business.
+     * Output only. The phone number of the business.
      * 
* - * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the phone field is set. @@ -1152,10 +1153,11 @@ public boolean hasPhone() { * * *
-     * Optional. The phone number of the business.
+     * Output only. The phone number of the business.
      * 
* - * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The phone. @@ -1171,10 +1173,11 @@ public com.google.type.PhoneNumber getPhone() { * * *
-     * Optional. The phone number of the business.
+     * Output only. The phone number of the business.
      * 
* - * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setPhone(com.google.type.PhoneNumber value) { @@ -1194,10 +1197,11 @@ public Builder setPhone(com.google.type.PhoneNumber value) { * * *
-     * Optional. The phone number of the business.
+     * Output only. The phone number of the business.
      * 
* - * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setPhone(com.google.type.PhoneNumber.Builder builderForValue) { @@ -1214,10 +1218,11 @@ public Builder setPhone(com.google.type.PhoneNumber.Builder builderForValue) { * * *
-     * Optional. The phone number of the business.
+     * Output only. The phone number of the business.
      * 
* - * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder mergePhone(com.google.type.PhoneNumber value) { @@ -1242,10 +1247,11 @@ public Builder mergePhone(com.google.type.PhoneNumber value) { * * *
-     * Optional. The phone number of the business.
+     * Output only. The phone number of the business.
      * 
* - * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearPhone() { @@ -1262,10 +1268,11 @@ public Builder clearPhone() { * * *
-     * Optional. The phone number of the business.
+     * Output only. The phone number of the business.
      * 
* - * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.type.PhoneNumber.Builder getPhoneBuilder() { @@ -1277,10 +1284,11 @@ public com.google.type.PhoneNumber.Builder getPhoneBuilder() { * * *
-     * Optional. The phone number of the business.
+     * Output only. The phone number of the business.
      * 
* - * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.type.PhoneNumberOrBuilder getPhoneOrBuilder() { @@ -1294,10 +1302,11 @@ public com.google.type.PhoneNumberOrBuilder getPhoneOrBuilder() { * * *
-     * Optional. The phone number of the business.
+     * Output only. The phone number of the business.
      * 
* - * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< diff --git a/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/BusinessInfoOrBuilder.java b/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/BusinessInfoOrBuilder.java index f7ffec91bce3..7653dadbc7cb 100644 --- a/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/BusinessInfoOrBuilder.java +++ b/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/BusinessInfoOrBuilder.java @@ -96,10 +96,10 @@ public interface BusinessInfoOrBuilder * * *
-   * Optional. The phone number of the business.
+   * Output only. The phone number of the business.
    * 
* - * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the phone field is set. @@ -109,10 +109,10 @@ public interface BusinessInfoOrBuilder * * *
-   * Optional. The phone number of the business.
+   * Output only. The phone number of the business.
    * 
* - * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The phone. @@ -122,10 +122,10 @@ public interface BusinessInfoOrBuilder * * *
-   * Optional. The phone number of the business.
+   * Output only. The phone number of the business.
    * 
* - * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional .google.type.PhoneNumber phone = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ com.google.type.PhoneNumberOrBuilder getPhoneOrBuilder(); diff --git a/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/BusinessInfoProto.java b/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/BusinessInfoProto.java index 4242bfff49b0..00164cfb03b6 100644 --- a/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/BusinessInfoProto.java +++ b/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/BusinessInfoProto.java @@ -63,7 +63,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "address.proto\"\214\004\n\014BusinessInfo\022\021\n\004name\030\001" + " \001(\tB\003\340A\010\0225\n\007address\030\002 \001(\0132\032.google.type" + ".PostalAddressB\003\340A\001H\000\210\001\001\0221\n\005phone\030\003 \001(\0132" - + "\030.google.type.PhoneNumberB\003\340A\001H\001\210\001\001\022l\n\030p" + + "\030.google.type.PhoneNumberB\003\340A\003H\001\210\001\001\022l\n\030p" + "hone_verification_state\030\004 \001(\0162@.google.s" + "hopping.merchant.accounts.v1beta.PhoneVe" + "rificationStateB\003\340A\003H\002\210\001\001\022]\n\020customer_se" diff --git a/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/ListUsersRequest.java b/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/ListUsersRequest.java index 7f5b5e4cc0b4..f00add30095f 100644 --- a/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/ListUsersRequest.java +++ b/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/ListUsersRequest.java @@ -73,7 +73,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The parent, which owns this collection of users.
-   * Format: `accounts/{account}
+   * Format: `accounts/{account}`
    * 
* * @@ -99,7 +99,7 @@ public java.lang.String getParent() { * *
    * Required. The parent, which owns this collection of users.
-   * Format: `accounts/{account}
+   * Format: `accounts/{account}`
    * 
* * @@ -598,7 +598,7 @@ public Builder mergeFrom( * *
      * Required. The parent, which owns this collection of users.
-     * Format: `accounts/{account}
+     * Format: `accounts/{account}`
      * 
* * @@ -623,7 +623,7 @@ public java.lang.String getParent() { * *
      * Required. The parent, which owns this collection of users.
-     * Format: `accounts/{account}
+     * Format: `accounts/{account}`
      * 
* * @@ -648,7 +648,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The parent, which owns this collection of users.
-     * Format: `accounts/{account}
+     * Format: `accounts/{account}`
      * 
* * @@ -672,7 +672,7 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The parent, which owns this collection of users.
-     * Format: `accounts/{account}
+     * Format: `accounts/{account}`
      * 
* * @@ -692,7 +692,7 @@ public Builder clearParent() { * *
      * Required. The parent, which owns this collection of users.
-     * Format: `accounts/{account}
+     * Format: `accounts/{account}`
      * 
* * diff --git a/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/ListUsersRequestOrBuilder.java b/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/ListUsersRequestOrBuilder.java index 8443b0787133..320f88122a5f 100644 --- a/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/ListUsersRequestOrBuilder.java +++ b/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/java/com/google/shopping/merchant/accounts/v1beta/ListUsersRequestOrBuilder.java @@ -29,7 +29,7 @@ public interface ListUsersRequestOrBuilder * *
    * Required. The parent, which owns this collection of users.
-   * Format: `accounts/{account}
+   * Format: `accounts/{account}`
    * 
* * @@ -44,7 +44,7 @@ public interface ListUsersRequestOrBuilder * *
    * Required. The parent, which owns this collection of users.
-   * Format: `accounts/{account}
+   * Format: `accounts/{account}`
    * 
* * diff --git a/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/proto/google/shopping/merchant/accounts/v1beta/businessinfo.proto b/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/proto/google/shopping/merchant/accounts/v1beta/businessinfo.proto index 9190e6fb9458..f2cfed816d6c 100644 --- a/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/proto/google/shopping/merchant/accounts/v1beta/businessinfo.proto +++ b/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/proto/google/shopping/merchant/accounts/v1beta/businessinfo.proto @@ -72,9 +72,9 @@ message BusinessInfo { optional google.type.PostalAddress address = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The phone number of the business. + // Output only. The phone number of the business. optional google.type.PhoneNumber phone = 3 - [(google.api.field_behavior) = OPTIONAL]; + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The phone verification state of the business. optional PhoneVerificationState phone_verification_state = 4 diff --git a/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/proto/google/shopping/merchant/accounts/v1beta/user.proto b/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/proto/google/shopping/merchant/accounts/v1beta/user.proto index 842a46c8811f..7f4d2bb3cb84 100644 --- a/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/proto/google/shopping/merchant/accounts/v1beta/user.proto +++ b/java-shopping-merchant-accounts/proto-google-shopping-merchant-accounts-v1beta/src/main/proto/google/shopping/merchant/accounts/v1beta/user.proto @@ -185,7 +185,7 @@ message UpdateUserRequest { // Request message for the `ListUsers` method. message ListUsersRequest { // Required. The parent, which owns this collection of users. - // Format: `accounts/{account} + // Format: `accounts/{account}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/java-shopping-merchant-datasources/README.md b/java-shopping-merchant-datasources/README.md index 7a1931d129c4..01acaee8ebb9 100644 --- a/java-shopping-merchant-datasources/README.md +++ b/java-shopping-merchant-datasources/README.md @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.shopping/google-shopping-merchant-datasources.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-datasources/0.0.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-datasources/0.1.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/java/com/google/shopping/merchant/datasources/v1beta/DataSourcesProto.java b/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/java/com/google/shopping/merchant/datasources/v1beta/DataSourcesProto.java index d070247ac14d..ebe052666d3d 100644 --- a/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/java/com/google/shopping/merchant/datasources/v1beta/DataSourcesProto.java +++ b/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/java/com/google/shopping/merchant/datasources/v1beta/DataSourcesProto.java @@ -161,15 +161,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".protobuf.Empty\"D\202\323\344\223\002>\"9/datasources/v1" + "beta/{name=accounts/*/dataSources/*}:fet" + "ch:\001*\032G\312A\032merchantapi.googleapis.com\322A\'h" - + "ttps://www.googleapis.com/auth/contentB\260" - + "\002\n/com.google.shopping.merchant.datasour" + + "ttps://www.googleapis.com/auth/contentB\276" + + "\003\n/com.google.shopping.merchant.datasour" + "ces.v1betaB\020DataSourcesProtoP\001ZWcloud.go" + "ogle.com/go/shopping/merchant/datasource" - + "s/apiv1beta/datasourcespb;datasourcespb\352" - + "A8\n\"merchantapi.googleapis.com/Account\022\022" - + "accounts/{account}\352AT\n%merchantapi.googl" - + "eapis.com/Datasource\022+accounts/{account}" - + "/dataSources/{datasource}b\006proto3" + + "s/apiv1beta/datasourcespb;datasourcespb\252" + + "\002+Google.Shopping.Merchant.DataSources.V" + + "1Beta\312\002+Google\\Shopping\\Merchant\\DataSou" + + "rces\\V1beta\352\002/Google::Shopping::Merchant" + + "::DataSources::V1beta\352A8\n\"merchantapi.go" + + "ogleapis.com/Account\022\022accounts/{account}" + + "\352AT\n%merchantapi.googleapis.com/Datasour" + + "ce\022+accounts/{account}/dataSources/{data" + + "source}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/java/com/google/shopping/merchant/datasources/v1beta/DatasourcetypesProto.java b/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/java/com/google/shopping/merchant/datasources/v1beta/DatasourcetypesProto.java index 029b07c9422d..69c51a20b7ea 100644 --- a/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/java/com/google/shopping/merchant/datasources/v1beta/DatasourcetypesProto.java +++ b/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/java/com/google/shopping/merchant/datasources/v1beta/DatasourcetypesProto.java @@ -79,12 +79,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "urce\022\032\n\nfeed_label\030\004 \001(\tB\006\340A\002\340A\005\022 \n\020cont" + "ent_language\030\005 \001(\tB\006\340A\002\340A\005\"W\n\023PromotionD" + "ataSource\022\036\n\016target_country\030\001 \001(\tB\006\340A\002\340A" - + "\005\022 \n\020content_language\030\002 \001(\tB\006\340A\002\340A\005B\242\001\n/" + + "\005\022 \n\020content_language\030\002 \001(\tB\006\340A\002\340A\005B\260\002\n/" + "com.google.shopping.merchant.datasources" + ".v1betaB\024DatasourcetypesProtoP\001ZWcloud.g" + "oogle.com/go/shopping/merchant/datasourc" + "es/apiv1beta/datasourcespb;datasourcespb" - + "b\006proto3" + + "\252\002+Google.Shopping.Merchant.DataSources." + + "V1Beta\312\002+Google\\Shopping\\Merchant\\DataSo" + + "urces\\V1beta\352\002/Google::Shopping::Merchan" + + "t::DataSources::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/java/com/google/shopping/merchant/datasources/v1beta/FileInputsProto.java b/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/java/com/google/shopping/merchant/datasources/v1beta/FileInputsProto.java index b275ef896e44..4c3d69193231 100644 --- a/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/java/com/google/shopping/merchant/datasources/v1beta/FileInputsProto.java +++ b/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/java/com/google/shopping/merchant/datasources/v1beta/FileInputsProto.java @@ -69,12 +69,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022\023\n\017FREQUENCY_DAILY\020\001\022\024\n\020FREQUENCY_WEEKL" + "Y\020\002\022\025\n\021FREQUENCY_MONTHLY\020\003\"Z\n\rFileInputT" + "ype\022\037\n\033FILE_INPUT_TYPE_UNSPECIFIED\020\000\022\n\n\006" - + "UPLOAD\020\001\022\t\n\005FETCH\020\002\022\021\n\rGOOGLE_SHEETS\020\003B\235" - + "\001\n/com.google.shopping.merchant.datasour" + + "UPLOAD\020\001\022\t\n\005FETCH\020\002\022\021\n\rGOOGLE_SHEETS\020\003B\253" + + "\002\n/com.google.shopping.merchant.datasour" + "ces.v1betaB\017FileInputsProtoP\001ZWcloud.goo" + "gle.com/go/shopping/merchant/datasources" - + "/apiv1beta/datasourcespb;datasourcespbb\006" - + "proto3" + + "/apiv1beta/datasourcespb;datasourcespb\252\002" + + "+Google.Shopping.Merchant.DataSources.V1" + + "Beta\312\002+Google\\Shopping\\Merchant\\DataSour" + + "ces\\V1beta\352\002/Google::Shopping::Merchant:" + + ":DataSources::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/proto/google/shopping/merchant/datasources/v1beta/datasources.proto b/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/proto/google/shopping/merchant/datasources/v1beta/datasources.proto index 16b114e1b59b..b5d3410f78ac 100644 --- a/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/proto/google/shopping/merchant/datasources/v1beta/datasources.proto +++ b/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/proto/google/shopping/merchant/datasources/v1beta/datasources.proto @@ -25,10 +25,13 @@ import "google/protobuf/field_mask.proto"; import "google/shopping/merchant/datasources/v1beta/datasourcetypes.proto"; import "google/shopping/merchant/datasources/v1beta/fileinputs.proto"; +option csharp_namespace = "Google.Shopping.Merchant.DataSources.V1Beta"; option go_package = "cloud.google.com/go/shopping/merchant/datasources/apiv1beta/datasourcespb;datasourcespb"; option java_multiple_files = true; option java_outer_classname = "DataSourcesProto"; option java_package = "com.google.shopping.merchant.datasources.v1beta"; +option php_namespace = "Google\\Shopping\\Merchant\\DataSources\\V1beta"; +option ruby_package = "Google::Shopping::Merchant::DataSources::V1beta"; option (google.api.resource_definition) = { type: "merchantapi.googleapis.com/Account" pattern: "accounts/{account}" diff --git a/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/proto/google/shopping/merchant/datasources/v1beta/datasourcetypes.proto b/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/proto/google/shopping/merchant/datasources/v1beta/datasourcetypes.proto index 885c9e0354dd..684c4b855f7e 100644 --- a/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/proto/google/shopping/merchant/datasources/v1beta/datasourcetypes.proto +++ b/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/proto/google/shopping/merchant/datasources/v1beta/datasourcetypes.proto @@ -18,10 +18,13 @@ package google.shopping.merchant.datasources.v1beta; import "google/api/field_behavior.proto"; +option csharp_namespace = "Google.Shopping.Merchant.DataSources.V1Beta"; option go_package = "cloud.google.com/go/shopping/merchant/datasources/apiv1beta/datasourcespb;datasourcespb"; option java_multiple_files = true; option java_outer_classname = "DatasourcetypesProto"; option java_package = "com.google.shopping.merchant.datasources.v1beta"; +option php_namespace = "Google\\Shopping\\Merchant\\DataSources\\V1beta"; +option ruby_package = "Google::Shopping::Merchant::DataSources::V1beta"; // The primary data source for local and online products. message PrimaryProductDataSource { diff --git a/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/proto/google/shopping/merchant/datasources/v1beta/fileinputs.proto b/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/proto/google/shopping/merchant/datasources/v1beta/fileinputs.proto index a2636b9cf030..25e01db7feca 100644 --- a/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/proto/google/shopping/merchant/datasources/v1beta/fileinputs.proto +++ b/java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/proto/google/shopping/merchant/datasources/v1beta/fileinputs.proto @@ -20,10 +20,13 @@ import "google/api/field_behavior.proto"; import "google/type/dayofweek.proto"; import "google/type/timeofday.proto"; +option csharp_namespace = "Google.Shopping.Merchant.DataSources.V1Beta"; option go_package = "cloud.google.com/go/shopping/merchant/datasources/apiv1beta/datasourcespb;datasourcespb"; option java_multiple_files = true; option java_outer_classname = "FileInputsProto"; option java_package = "com.google.shopping.merchant.datasources.v1beta"; +option php_namespace = "Google\\Shopping\\Merchant\\DataSources\\V1beta"; +option ruby_package = "Google::Shopping::Merchant::DataSources::V1beta"; // The data specific for file data sources. This field is empty for other // data source inputs.